@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&display=swap');

:root {
  --faqbot-navy: #1C1A32;
  --faqbot-navy-2: #34305a;
  --faqbot-cyan: #62E7DF;
  --faqbot-orange: #FD8107;
  --faqbot-bg: #f5f8f8;
  --faqbot-white: #ffffff;
  --faqbot-line: #dfe7e8;
  --faqbot-muted: #66747d;
  --faqbot-text: #25283a;
  --faqbot-soft-cyan: #ebfbfa;
  --faqbot-soft-orange: #fff4e8;
  --faqbot-whatsapp: #1faa59;
}

#faqbot-launcher,
#faqbot-panel,
#faqbot-panel * {
  box-sizing: border-box;
  font-family: 'Almarai', Arial, sans-serif !important;
}

#faqbot-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99998;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  padding: 0;
  border: 2px solid rgba(98, 231, 223, .42);
  border-radius: 23px;
  background: #1C1A32;
  box-shadow: 0 18px 42px rgba(28, 26, 50, .32);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

#faqbot-launcher:hover,
#faqbot-launcher:focus-visible {
  transform: translateY(-3px);
  border-color: var(--faqbot-cyan);
  box-shadow: 0 22px 50px rgba(28, 26, 50, .42);
  outline: none;
}

#faqbot-launcher img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

#faqbot-launcher::after {
  content: 'اسألني';
  position: absolute;
  top: 17px;
  right: 82px;
  padding: 9px 13px;
  border: 1px solid var(--faqbot-line);
  border-radius: 13px;
  background: #fff;
  color: var(--faqbot-navy);
  box-shadow: 0 10px 28px rgba(28, 26, 50, .12);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#faqbot-panel {
  position: fixed;
  right: 24px;
  bottom: 108px;
  z-index: 99999;
  display: none;
  width: min(430px, calc(100vw - 28px));
  height: min(735px, calc(100vh - 132px));
  overflow: hidden;
  border: 1px solid rgba(223, 231, 232, .95);
  border-radius: 28px;
  background: var(--faqbot-bg);
  color: var(--faqbot-text);
  box-shadow: 0 30px 80px rgba(28, 26, 50, .3);
}

#faqbot-panel.open {
  display: flex;
  flex-direction: column;
  animation: faqbot-open .22s ease-out;
}

@keyframes faqbot-open {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.faqbot-header {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--faqbot-navy), var(--faqbot-navy-2));
  color: #fff;
}

.faqbot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.faqbot-brand-mark {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--faqbot-cyan);
  color: var(--faqbot-navy);
  font-size: 18px;
  font-weight: 800;
}

.faqbot-brand > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.faqbot-brand strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faqbot-brand small {
  position: relative;
  padding-inline-start: 14px;
  color: #d8e1e1;
  font-size: 9px;
}

.faqbot-brand small::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faqbot-cyan);
  box-shadow: 0 0 0 3px rgba(98, 231, 223, .15);
  transform: translateY(-50%);
}

.faqbot-close {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.faqbot-close:hover,
.faqbot-close:focus-visible {
  background: rgba(255, 255, 255, .18);
  outline: none;
}

.faqbot-register {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  background: #fff;
}

.faqbot-register-intro {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 4px 8px 9px;
  text-align: center;
}

.faqbot-welcome-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--faqbot-soft-cyan);
  color: var(--faqbot-navy);
  font-size: 20px;
}

.faqbot-register-intro h2 {
  margin: 0;
  color: var(--faqbot-navy);
  font-size: 19px;
  font-weight: 800;
}

.faqbot-register-intro p {
  max-width: 340px;
  margin: 0;
  color: var(--faqbot-muted);
  font-size: 10.5px;
  line-height: 1.8;
}

.faqbot-field {
  display: grid;
  gap: 6px;
}

.faqbot-field > span {
  color: var(--faqbot-navy);
  font-size: 10px;
  font-weight: 800;
}

.faqbot-field input,
.faqbot-input-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9e2e4;
  border-radius: 13px;
  background: #fff;
  color: var(--faqbot-text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.faqbot-field input {
  min-height: 46px;
  padding: 11px 13px;
  font-size: 12px;
}

.faqbot-field input:focus,
.faqbot-input-row input:focus {
  border-color: var(--faqbot-cyan);
  box-shadow: 0 0 0 4px rgba(98, 231, 223, .18);
}

.faqbot-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--faqbot-muted);
  font-size: 9px;
  line-height: 1.75;
}

.faqbot-consent input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--faqbot-navy);
}

.faqbot-btn {
  min-height: 47px;
  padding: 12px 15px;
  border: 0;
  border-radius: 14px;
  background: var(--faqbot-cyan);
  color: var(--faqbot-navy);
  box-shadow: 0 12px 26px rgba(98, 231, 223, .25);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.faqbot-btn:disabled,
.faqbot-input-row button:disabled {
  cursor: wait;
  opacity: .55;
}

.faqbot-chat {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.faqbot-chat.active { display: flex; }

.faqbot-body {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 0 0, rgba(98, 231, 223, .09), transparent 28%),
    linear-gradient(180deg, #f8fbfb, #f3f7f7);
}

.faqbot-msg {
  width: fit-content;
  max-width: 89%;
  margin: 8px 0;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 15px rgba(28, 26, 50, .045);
}

.faqbot-msg.bot {
  border: 1px solid var(--faqbot-line);
  border-top-right-radius: 6px;
  background: #fff;
  color: var(--faqbot-text);
}

.faqbot-msg.user {
  margin-inline-start: auto;
  border-top-left-radius: 6px;
  background: var(--faqbot-navy);
  color: #fff;
}

.faqbot-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 60px;
  min-height: 39px;
}

.faqbot-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faqbot-cyan);
  animation: faqbot-dot 1s infinite ease-in-out;
}

.faqbot-typing span:nth-child(2) { animation-delay: .14s; }
.faqbot-typing span:nth-child(3) { animation-delay: .28s; }

@keyframes faqbot-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.faqbot-guided {
  flex: 0 0 auto;
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--faqbot-line);
  background: #edf8f7;
}

.faqbot-guided.faqbot-guided-hidden { display: none !important; }

.faqbot-guided-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.faqbot-guided-title {
  color: var(--faqbot-navy);
  font-size: 10.5px;
  font-weight: 800;
}

.faqbot-back {
  display: none;
  padding: 6px 8px;
  border: 1px solid var(--faqbot-line);
  border-radius: 9px;
  background: #fff;
  color: var(--faqbot-navy);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.faqbot-back.show { display: inline-flex; }

.faqbot-options {
  display: grid;
  gap: 7px;
}

.faqbot-category,
.faqbot-question {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9e6e7;
  border-radius: 12px;
  background: #fff;
  color: var(--faqbot-navy);
  text-align: start;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.65;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.faqbot-category::after,
.faqbot-question::after {
  content: '←';
  float: left;
  color: var(--faqbot-orange);
}

.faqbot-category:hover,
.faqbot-question:hover {
  transform: translateY(-1px);
  border-color: var(--faqbot-cyan);
  box-shadow: 0 7px 15px rgba(28, 26, 50, .06);
}

.faqbot-empty {
  padding: 8px;
  color: var(--faqbot-muted);
  font-size: 10px;
  line-height: 1.7;
}

.faqbot-human {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 800;
}

.faqbot-human::before { content: '☎'; }

.faqbot-human-light {
  min-height: 44px;
  border: 1px solid rgba(31, 170, 89, .32);
  border-radius: 13px;
  background: #fff;
  color: var(--faqbot-whatsapp);
}

.faqbot-human-bar {
  flex: 0 0 auto;
  min-height: 37px;
  padding: 8px 12px;
  border-top: 1px solid rgba(31, 170, 89, .13);
  background: #e9f8ef;
  color: #168a47;
}

.faqbot-input-row {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--faqbot-line);
  background: #fff;
}

.faqbot-input-row input {
  flex: 1 1 auto;
  min-height: 45px;
  padding: 10px 13px;
  font-size: 12px;
}

.faqbot-input-row button {
  display: grid;
  flex: 0 0 47px;
  place-items: center;
  width: 47px;
  height: 45px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: #62E7DF;
  color: #1C1A32;
  font-size: 18px;
  cursor: pointer;
  transform: rotate(180deg);
}

.faqbot-note {
  flex: 0 0 auto;
  padding: 0 12px 9px;
  background: #fff;
  color: var(--faqbot-muted);
  text-align: center;
  font-size: 8px;
  line-height: 1.7;
}

.faqbot-media {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.faqbot-image-link {
  display: grid;
  min-height: 110px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--faqbot-line);
  border-radius: 14px;
  background: #fff;
}

.faqbot-media img {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: contain;
}

.faqbot-image-failed::before,
.faqbot-med-image.no-image::before {
  content: 'صورة الدواء';
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 62px;
  place-items: center;
  background: #f5f8f8;
  color: var(--faqbot-muted);
  font-size: 8px;
}

.faqbot-answer-link {
  display: block;
  padding: 9px 11px;
  border: 1px solid #b9efec;
  border-radius: 11px;
  background: var(--faqbot-soft-cyan);
  color: #176d68;
  text-align: center;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
}

.faqbot-answer-link:hover { background: var(--faqbot-cyan); color: var(--faqbot-navy); }

.faqbot-action-cards,
.faqbot-medication-selection,
.faqbot-clarification-list {
  display: grid;
  gap: 9px;
  width: 96%;
  margin: 9px 0 15px;
}

.faqbot-action-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--faqbot-line);
  border-radius: 16px;
  background: #fff;
  color: var(--faqbot-navy);
  text-align: start;
  box-shadow: 0 6px 16px rgba(28, 26, 50, .05);
}

button.faqbot-action-card {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

button.faqbot-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--faqbot-cyan);
  box-shadow: 0 10px 22px rgba(28, 26, 50, .09);
}

.faqbot-action-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(98, 231, 223, .25);
  color: var(--faqbot-navy);
  font-size: 16px;
  font-weight: 800;
}

.faqbot-action-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.faqbot-action-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.faqbot-action-content strong {
  color: var(--faqbot-navy);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.6;
}

.faqbot-action-content small {
  color: var(--faqbot-muted);
  font-size: 9px;
  line-height: 1.7;
}

.faqbot-action-arrow { color: var(--faqbot-orange); font-size: 17px; }

.faqbot-action-button,
.faqbot-action-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--faqbot-cyan);
  color: var(--faqbot-navy);
  text-decoration: none;
  font-size: 9px;
  font-weight: 800;
}

.faqbot-action-links { display: flex; flex-wrap: wrap; gap: 5px; }
.faqbot-action-card.whatsapp .faqbot-action-icon { background: #ddf6e7; color: #168a47; }
.faqbot-action-card.whatsapp .faqbot-action-button { background: var(--faqbot-whatsapp); color: #fff; }
.faqbot-action-card.navy .faqbot-action-icon { background: var(--faqbot-navy); color: var(--faqbot-cyan); }
.faqbot-action-card.googlemaps .faqbot-action-icon { background: #eef4ff; }
.faqbot-action-card.googlemaps .faqbot-action-button { background: #1a73e8; color: #fff; }
.faqbot-action-card.insurance { grid-template-columns: 64px minmax(0, 1fr) auto; }
.faqbot-action-card.insurance .faqbot-action-icon {
  width: 62px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--faqbot-line);
  padding: 6px;
}
.faqbot-action-card.insurance .faqbot-action-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.faqbot-action-card.insurance .faqbot-action-button {
  background: var(--faqbot-navy);
  color: #fff;
}


.faqbot-med-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--faqbot-line);
  border-radius: 16px;
  background: #fff;
  color: var(--faqbot-navy);
  text-align: start;
  box-shadow: 0 6px 16px rgba(28, 26, 50, .05);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.faqbot-med-card:hover {
  transform: translateY(-2px);
  border-color: var(--faqbot-cyan);
  box-shadow: 0 10px 22px rgba(28, 26, 50, .09);
}

.faqbot-med-image {
  display: grid;
  width: 74px;
  height: 74px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--faqbot-line);
  border-radius: 13px;
  background: #fff;
}

.faqbot-med-image img { display: block; width: 100%; height: 100%; object-fit: contain; }

.faqbot-med-names {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.faqbot-med-names strong { color: var(--faqbot-navy); font-size: 12px; font-weight: 800; line-height: 1.5; }
.faqbot-med-names small { color: var(--faqbot-muted); direction: ltr; text-align: start; font-size: 9px; overflow-wrap: anywhere; }
.faqbot-med-names em { color: #5a6c73; font-size: 8px; font-style: normal; }

/* Procedure instructions: one clear card per instruction, using the same
   navy/cyan/orange visual language as turki.doctor. */
.faqbot-instruction-grid {
  display: grid;
  gap: 9px;
  width: 97%;
  margin: 8px 0 14px;
}

.faqbot-instruction-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--faqbot-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(28, 26, 50, .055);
}

.faqbot-instruction-card::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--faqbot-cyan);
}

.faqbot-instruction-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--faqbot-soft-cyan);
  color: var(--faqbot-navy);
  font-size: 12px;
  font-weight: 800;
}

.faqbot-instruction-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--faqbot-navy);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
}

.faqbot-instruction-card p {
  margin: 0;
  color: #52636b;
  font-size: 9.5px;
  line-height: 1.85;
}

.faqbot-instruction-card.tone-navy::before { background: var(--faqbot-navy); }
.faqbot-instruction-card.tone-navy .faqbot-instruction-number { background: var(--faqbot-navy); color: var(--faqbot-cyan); }
.faqbot-instruction-card.tone-orange::before { background: var(--faqbot-orange); }
.faqbot-instruction-card.tone-orange .faqbot-instruction-number { background: var(--faqbot-soft-orange); color: var(--faqbot-orange); }

.faqbot-clarification-card {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 40px 11px 12px;
  border: 1px solid var(--faqbot-line);
  border-radius: 14px;
  background: #fff;
  color: var(--faqbot-navy);
  text-align: start;
  box-shadow: 0 5px 14px rgba(28, 26, 50, .045);
  cursor: pointer;
}

.faqbot-clarification-card:hover { border-color: var(--faqbot-cyan); }
.faqbot-clarification-card small { color: var(--faqbot-orange); font-size: 8px; font-weight: 800; }
.faqbot-clarification-card strong { font-size: 10.5px; font-weight: 800; line-height: 1.7; }
.faqbot-clarification-card > span { position: absolute; inset-inline-end: 14px; top: 50%; color: var(--faqbot-orange); transform: translateY(-50%); }

@media (max-width: 520px) {
  #faqbot-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  #faqbot-launcher {
    right: 15px;
    bottom: 15px;
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }

  #faqbot-launcher img { width: 35px; height: 35px; }
  #faqbot-launcher::after { display: none; }
  .faqbot-header { padding-top: max(14px, env(safe-area-inset-top)); }
  .faqbot-guided { max-height: 29vh; }
  .faqbot-input-row { padding-bottom: max(11px, env(safe-area-inset-bottom)); }
  .faqbot-note { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .faqbot-med-card { grid-template-columns: 66px minmax(0, 1fr); }
  .faqbot-med-image { width: 66px; height: 66px; }
  .faqbot-action-card { grid-template-columns: 41px minmax(0, 1fr) auto; }
  .faqbot-action-icon { width: 39px; height: 39px; }
}

@media (prefers-reduced-motion: reduce) {
  #faqbot-panel.open,
  .faqbot-typing span { animation: none; }
  #faqbot-launcher,
  .faqbot-category,
  .faqbot-question,
  .faqbot-action-card,
  .faqbot-med-card { transition: none; }
}

/* Mobile parity: keep answer cards visible, tappable, and inside the scrolling chat body. */
@media (max-width: 520px) {
  .faqbot-body { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .faqbot-action-cards,
  .faqbot-instruction-grid,
  .faqbot-medication-selection,
  .faqbot-clarification-list {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-width: 0;
    flex: 0 0 auto;
  }
  .faqbot-action-card,
  .faqbot-instruction-card,
  .faqbot-med-card,
  .faqbot-clarification-card {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 58px;
  }
  .faqbot-action-button,
  .faqbot-action-links a { min-height: 36px; padding: 9px 11px; }
}

/* Cards are part of the answer on every viewport. Keep them in normal flow and visible. */
.faqbot-action-cards,
.faqbot-instruction-grid,
.faqbot-medication-selection,
.faqbot-clarification-list {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-width: 0;
  flex: 0 0 auto;
}

.faqbot-action-card,
.faqbot-instruction-card,
.faqbot-med-card,
.faqbot-clarification-card {
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 520px) {
  .faqbot-action-cards { grid-template-columns: minmax(0, 1fr) !important; }
  .faqbot-action-card { width: 100% !important; max-width: 100%; }
}

/* Mobile answer delivery and layout compatibility (iOS Safari + Android WebView). */
@media (max-width: 520px) {
  #faqbot-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .faqbot-chat.active {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .faqbot-body {
    display: block !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  .faqbot-msg,
  .faqbot-msg-text,
  .faqbot-action-cards,
  .faqbot-action-card,
  .faqbot-instruction-grid,
  .faqbot-instruction-card,
  .faqbot-medication-selection,
  .faqbot-med-card,
  .faqbot-clarification-list,
  .faqbot-clarification-card {
    visibility: visible !important;
    opacity: 1 !important;
  }

  .faqbot-action-cards,
  .faqbot-instruction-grid,
  .faqbot-medication-selection,
  .faqbot-clarification-list {
    position: static !important;
    z-index: auto !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
}

/* v21: dashboard-created FAQ cards */
.faqbot-action-card.custom-faq-card {
  border-color: rgba(98, 231, 223, .48);
  background: linear-gradient(180deg, #ffffff 0%, #f8fffe 100%);
}

.faqbot-action-card.has-card-image {
  grid-template-columns: 68px minmax(0, 1fr) auto;
}

.faqbot-action-card.has-card-image .faqbot-action-icon {
  width: 66px;
  height: 66px;
  padding: 0;
  overflow: hidden;
  border-radius: 15px;
  background: #f4f7f8;
}

.faqbot-action-card.has-card-image .faqbot-action-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faqbot-card-label {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(98, 231, 223, .22);
  color: var(--faqbot-navy);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 720px) {
  .faqbot-action-cards,
  .faqbot-medication-selection,
  .faqbot-clarification-list {
    display: grid !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .faqbot-action-card {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .faqbot-action-card.has-card-image {
    grid-template-columns: 60px minmax(0, 1fr) auto;
  }

  .faqbot-action-card.has-card-image .faqbot-action-icon {
    width: 58px;
    height: 58px;
  }
}


/* v22: mobile-safe floating chat and wheelchair emoji fallback. */
.faqbot-action-icon.faqbot-action-icon-emoji {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  background: linear-gradient(145deg, #ecfbf9, #ffffff);
  color: var(--faqbot-navy);
}

.faqbot-action-emoji {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.faqbot-action-emoji-badge {
  display: block;
  color: #168a47;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.faqbot-action-card.wheelchair-level-card .faqbot-action-icon {
  border: 1px solid rgba(31, 170, 89, .18);
  background: #effaf3;
}

html.faqbot-mobile-open,
body.faqbot-mobile-open {
  overscroll-behavior: none !important;
}

@media (max-width: 900px) {
  html.faqbot-mobile-open,
  body.faqbot-mobile-open {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  #faqbot-panel {
    position: fixed !important;
    top: var(--faqbot-mobile-top, 0px) !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: var(--faqbot-mobile-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--faqbot-mobile-height, 100dvh) !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  #faqbot-panel.open {
    display: flex !important;
    flex-direction: column !important;
  }

  .faqbot-header {
    padding-top: max(14px, env(safe-area-inset-top)) !important;
  }

  .faqbot-chat.active,
  .faqbot-register {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .faqbot-register {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .faqbot-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding-inline: 12px !important;
  }

  .faqbot-human-bar,
  .faqbot-input-row,
  .faqbot-note {
    position: relative !important;
    z-index: 6 !important;
    flex: 0 0 auto !important;
  }

  .faqbot-input-row {
    padding-bottom: max(11px, env(safe-area-inset-bottom)) !important;
  }

  .faqbot-note {
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  .faqbot-action-cards,
  .faqbot-medication-selection,
  .faqbot-clarification-list,
  .faqbot-instruction-grid {
    width: 100% !important;
    max-width: 100% !important;
  }

  .faqbot-action-card {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  .faqbot-action-card.has-card-image {
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
  }

  .faqbot-action-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }

  .faqbot-action-card.has-card-image .faqbot-action-icon {
    width: 56px !important;
    height: 56px !important;
  }
}
