/* Rashad chatbot (2026-10-31, static/website/chatbot.js). Website identity: deep green + gold, Readex Pro
   (inherited), 3D card shadow, gold line. Uses the colour tokens of site.css. Phones (<=640px): a bottom sheet. */
.w-chat { position: fixed; z-index: 90; inset-inline-end: 20px; bottom: 20px; font-family: inherit;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px }
.w-chat-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px }

.w-chat-btn { display: inline-flex; align-items: center; gap: 10px; padding: 5px 18px 5px 5px; border-radius: 999px;
  border: 1px solid rgba(201,165,76,.55); background: var(--green-900, #0B3D2E); color: #fff; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 14px 30px -12px rgba(7,42,31,.65), inset 0 -3px 0 rgba(0,0,0,.18);
  transition: transform .15s ease, box-shadow .15s ease }
html[dir="rtl"] .w-chat-btn { padding: 5px 5px 5px 18px }
.w-chat-btn img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 2px var(--gold-400, #C9A54C) }
.w-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(7,42,31,.7), inset 0 -3px 0 rgba(0,0,0,.18) }
.w-chat-btn:focus-visible, .w-chat button:focus-visible, .w-chat a:focus-visible, .w-chat-input:focus-visible,
.w-chat-log:focus-visible { outline: 3px solid var(--gold-400, #C9A54C); outline-offset: 2px }
.w-chat.is-open .w-chat-btn-text { display: none }
.w-chat.is-open .w-chat-btn { padding: 5px }

.w-chat-panel { width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); display: flex;
  flex-direction: column; background: var(--surface, #fff); color: var(--ink, #10231B); border-radius: 20px;
  border: 1px solid var(--line, #E6E1D4); overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(7,42,31,.55), 0 2px 0 rgba(255,255,255,.6) inset; animation: w-chat-in .18s ease-out both }
.w-chat-panel[hidden] { display: none }
@keyframes w-chat-in { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

.w-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px;
  background: linear-gradient(135deg, var(--green-950, #072A1F), var(--green-800, #0F5132)); color: #fff;
  border-bottom: 3px solid var(--gold-400, #C9A54C) }
html[dir="rtl"] .w-chat-head { padding: 12px 14px 12px 12px }
.w-chat-hface img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 2px var(--gold-300, #E2C77E) }
.w-chat-htext { flex: 1; min-width: 0; display: flex; flex-direction: column }
.w-chat-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; color: #fff }
.w-chat-sub { font-size: 12.5px; color: var(--muted-on-dark, #C8DCD0) }
.w-chat-tool { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 999px;
  padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap }
.w-chat-tool:hover { background: rgba(255,255,255,.12) }
.w-chat-close { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer }
.w-chat-close:hover { background: rgba(255,255,255,.2) }

/* 2026-11-04 "Rashad is taking a moment to check data privacy", pinned under the header (not in the scroll) */
.w-chat-privacy { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  color: var(--green-950, #072A1F); background: var(--gold-100, #F6EDD3); border-bottom: 1px solid var(--gold-300, #E2C77E) }
.w-chat-privacy[hidden] { display: none }
.w-chat-privacy img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #fff; flex: none }
.w-chat-log { flex: 1; overflow-y: auto; padding: 14px; background: var(--paper, #FAF8F3); display: flex;
  flex-direction: column; gap: 10px; overscroll-behavior: contain }
.w-chat-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100% }
.w-chat-user { justify-content: flex-end }
.w-chat-mface img { display: block; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 1.5px var(--gold-300, #E2C77E) }
.w-chat-bubble { max-width: 85%; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.6;
  overflow-wrap: anywhere }
.w-chat-bubble p { margin: 0 0 6px } .w-chat-bubble p:last-child { margin-bottom: 0 }
.w-chat-bubble ul { margin: 4px 0 6px; padding-inline-start: 20px }
.w-chat-bot .w-chat-bubble { background: #fff; border: 1px solid var(--line, #E6E1D4); border-end-start-radius: 4px;
  box-shadow: 0 6px 14px -10px rgba(7,42,31,.35) }
.w-chat-user .w-chat-bubble { background: var(--green-900, #0B3D2E); color: #fff; border-end-end-radius: 4px }
.w-chat-bubble a { color: var(--green-700, #15803D); font-weight: 600 }
a.w-chat-cite { display: inline-block; min-width: 18px; padding: 0 5px; margin-inline-start: 2px; border-radius: 999px;
  background: var(--gold-50, #FBF6EA); border: 1px solid var(--gold-300, #E2C77E); color: var(--gold-700, #7D5F17);
  font-size: 11.5px; line-height: 17px; text-align: center; text-decoration: none; vertical-align: 2px }
.w-chat-sources { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line-2, #D3CCB8); font-size: 13px }
.w-chat-sources-h { display: block; font-weight: 700; color: var(--ink-2, #4A5B52); font-size: 12px; margin-bottom: 2px }
.w-chat-sources ol { margin: 0; padding-inline-start: 20px }
.w-chat-sources li { margin: 2px 0 }

.w-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; background: var(--paper, #FAF8F3) }
.w-chat-chips[hidden] { display: none }
.w-chat-chip { border: 1px solid var(--gold-300, #E2C77E); background: #fff; color: var(--green-900, #0B3D2E);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer }
.w-chat-chip:hover { background: var(--gold-50, #FBF6EA) }

.w-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: #fff;
  border-top: 1px solid var(--line, #E6E1D4) }
.w-chat-input { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--field, #8C9A92); font: inherit; font-size: 15px; line-height: 1.4; color: var(--ink, #10231B);
  background: #fff }
.w-chat-send { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--green-800, #0F5132); color: #fff; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.2) }
html[dir="rtl"] .w-chat-send svg { transform: scaleX(-1) }
.w-chat-send:hover { background: var(--green-700, #15803D) }
.w-chat-send:disabled { opacity: .55; cursor: wait }
.w-chat-foot { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11.5px; line-height: 1.5;
  color: var(--ink-2, #4A5B52) }
.w-chat-foot a { color: var(--green-700, #15803D); font-weight: 600 }

/* the "thinking" indicator inside the chat (site.css .w-think, kept in the log on every screen size) */
.w-chat .w-chat-think { position: static; inset: auto; margin: 0; align-self: flex-start; width: auto; height: auto;
  padding: 5px 14px 5px 5px; font-size: 14px; box-shadow: 0 8px 22px -12px rgba(7,42,31,.45) }
html[dir="rtl"] .w-chat .w-chat-think { padding: 5px 5px 5px 14px }

@media (max-width: 640px) {
  .w-chat { inset-inline-end: 12px; bottom: 12px }
  .w-chat-btn { padding: 4px; font-size: 0 }
  html[dir="rtl"] .w-chat-btn { padding: 4px }
  .w-chat-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
  .w-chat-btn img { width: 50px; height: 50px }
  .w-chat.is-open { inset: auto 0 0 0; align-items: stretch; gap: 0 }
  .w-chat.is-open .w-chat-btn { display: none }
  .w-chat-panel { width: 100%; height: min(86vh, calc(100dvh - 40px)); border-radius: 20px 20px 0 0;
    border-inline: 0; border-bottom: 0 }
  .w-chat-tool { padding: 5px 8px }
}
@media (prefers-reduced-motion: reduce) {
  .w-chat-panel { animation: none }
  .w-chat-btn { transition: none } .w-chat-btn:hover { transform: none }
}
@media print { .w-chat { display: none } }
