/* IlajIndia Live Chat — premium medical messenger (frontend only) */
.ilaj-chat {
  --ilaj-chat-brand: #0d5c52;
  --ilaj-chat-brand-mid: #0f6b60;
  --ilaj-chat-brand-deep: #0a4a42;
  --ilaj-chat-soft: #e8f5f2;
  --ilaj-chat-surface: #f5f7f9;
  --ilaj-chat-panel: #ffffff;
  --ilaj-chat-ink: #1a2b33;
  --ilaj-chat-muted: #6b7c86;
  --ilaj-chat-online: #22c55e;
  --ilaj-chat-away: #d4a017;
  --ilaj-chat-support-bubble: #dce8f6;
  --ilaj-chat-visitor-bubble: #d8f3dc;
  --ilaj-chat-radius: 22px;
  --ilaj-chat-shadow: 0 22px 48px rgba(13, 92, 82, 0.28), 0 4px 14px rgba(15, 39, 68, 0.1);
  position: relative;
  z-index: 70;
  font-family: "Plus Jakarta Sans", "Noto Sans Arabic", system-ui, sans-serif;
}

.ilaj-chat[hidden] { display: none !important; }
.ilaj-chat:not([hidden]) { display: block; }

/* —— Flutter-style extended FAB: icon + “Live Chat” (English) —— */
.ilaj-chat__launcher {
  position: fixed;
  inset-inline-end: 0.85rem;
  bottom: 1.15rem;
  z-index: 74;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 0 1.1rem 0 0.85rem !important;
  border: 0;
  border-radius: 16px !important;
  background: #0f766e;
  color: #fff;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(15, 118, 110, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.ilaj-chat__launcher:hover {
  background: #0d9488;
  transform: translateY(-2px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(15, 118, 110, 0.4);
}
.ilaj-chat__launcher:active { transform: scale(0.97); }
.ilaj-chat__launcher:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.55);
  outline-offset: 3px;
}
.ilaj-chat__launcher.is-pulse {
  animation: ilaj-chat-pulse 1.6s ease-out 1;
}
.ilaj-chat__launcher-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
}
.ilaj-chat__launcher-icon img {
  width: 22px;
  height: 22px;
  filter: none;
  display: block;
}
.ilaj-chat__launcher-text {
  display: block !important;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}
.ilaj-chat__launcher-dot { display: none; }
.ilaj-chat__launcher-copy,
.ilaj-chat__launcher-hi { display: none !important; }

.ilaj-chat__badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px #fff;
}

@media (min-width: 768px) {
  .ilaj-chat__launcher { display: inline-flex; }
  .ilaj-chat.is-open .ilaj-chat__launcher { display: none; }
}

@media (max-width: 767.98px) {
  body.ilaj-chat-open { overflow: auto; }
  .ilaj-chat__launcher {
    display: inline-flex;
    bottom: calc(var(--mobile-bar-h, 64px) + 14px + env(safe-area-inset-bottom, 0px));
  }
  .ilaj-chat.is-open .ilaj-chat__launcher { display: none; }
}

/* —— Overlay —— */
.ilaj-chat__overlay {
  position: fixed;
  inset: 0;
  z-index: 72;
  background: rgba(8, 28, 36, 0.28);
  border: 0;
  padding: 0;
  cursor: pointer;
  animation: ilaj-chat-fade-in 0.22s ease;
}
.ilaj-chat__overlay[hidden] { display: none !important; }

/* —— Compact floating panel (reference Steps 2–3) —— */
.ilaj-chat,
.ilaj-chat * {
  box-sizing: border-box;
  min-width: 0;
}

.ilaj-chat__panel {
  position: fixed;
  z-index: 73;
  display: flex;
  flex-direction: column;
  left: 12px;
  right: 12px;
  width: auto;
  max-width: none;
  margin: 0;
  transform: none;
  height: clamp(420px, 68dvh, 680px);
  max-height: min(68dvh, 680px);
  bottom: calc(var(--mobile-action-bar-height, var(--mobile-bar-h, 64px)) + 12px + env(safe-area-inset-bottom, 0px));
  background: var(--ilaj-chat-panel);
  color: var(--ilaj-chat-ink);
  box-shadow: var(--ilaj-chat-shadow);
  overflow: hidden;
  border-radius: 20px;
  border: 0;
  animation: ilaj-chat-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.ilaj-chat__panel[hidden] { display: none !important; }

html[dir="rtl"] .ilaj-chat__panel,
.ilaj-chat__panel[dir="rtl"] {
  left: 12px;
  right: 12px;
  transform: none;
}

@media (min-width: 481px) and (max-width: 767.98px) {
  .ilaj-chat__panel {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    margin: 0;
    transform: none;
  }
}

@media (min-width: 768px) {
  .ilaj-chat__panel {
    width: 410px;
    max-width: 430px;
    height: min(680px, calc(100vh - 2.5rem));
    max-height: 680px;
    left: auto;
    right: 1.25rem;
    bottom: 1.25rem;
    transform: none;
    border-radius: 22px;
  }
  html[dir="rtl"] .ilaj-chat__panel,
  .ilaj-chat__panel[dir="rtl"] {
    left: 1.25rem;
    right: auto;
    transform: none;
  }
}

/* —— Header —— */
.ilaj-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.78rem 0.85rem;
  background: linear-gradient(135deg, #0f6b60 0%, #0d5c52 52%, #0a4a42 100%);
  color: #fff;
  flex-shrink: 0;
}
.ilaj-chat__identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.ilaj-chat__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.ilaj-chat__avatar--logo {
  object-fit: contain;
  padding: 4px;
  background: #fff;
}
.ilaj-chat__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.ilaj-chat__role { display: none; }
.ilaj-chat__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  opacity: 0.96;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-weight: 500;
}
.ilaj-chat__subtitle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ilaj-chat-online);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}
.ilaj-chat__subtitle.is-away::before { background: var(--ilaj-chat-away); }
.ilaj-chat__subtitle.is-offline::before { background: #94a3b8; }
.ilaj-chat__subtitle.is-ready::before { background: #4ade80; }

.ilaj-chat__header-actions {
  display: flex;
  gap: 0.28rem;
  flex-shrink: 0;
}
.ilaj-chat__icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, transform 0.12s ease;
}
.ilaj-chat__icon-btn:hover { background: rgba(255, 255, 255, 0.24); }
.ilaj-chat__icon-btn:active { transform: scale(0.92); }
.ilaj-chat__icon-btn.is-lang {
  min-width: 34px;
  letter-spacing: 0.02em;
}
.ilaj-chat__icon-btn:focus-visible,
.ilaj-chat__primary:focus-visible,
.ilaj-chat__secondary:focus-visible,
.ilaj-chat__send:focus-visible,
.ilaj-chat__chip:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* —— Body —— */
.ilaj-chat__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--ilaj-chat-surface);
}
.ilaj-chat__view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.75rem;
  overflow: auto;
}
.ilaj-chat__view[data-ilaj-view="chat"] {
  overflow: hidden;
  padding: 0.55rem 0.65rem 0.35rem;
  position: relative;
}
.ilaj-chat__view[hidden] { display: none !important; }
.ilaj-chat__view--dialog {
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
}

.ilaj-chat__intro h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--ilaj-chat-brand-deep);
}
.ilaj-chat__intro p {
  margin: 0 0 0.85rem;
  color: var(--ilaj-chat-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.ilaj-chat__quick-start {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.ilaj-chat__muted {
  margin: 0;
  color: var(--ilaj-chat-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.ilaj-chat__profile-card {
  flex: 0 0 auto;
  margin: 0 0 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(15, 76, 92, 0.16);
  border-radius: 10px;
  background: #f7fbfc;
  max-height: 38%;
  overflow: auto;
  z-index: 2;
}
.ilaj-chat__profile-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  color: var(--ilaj-chat-brand-deep);
}
.ilaj-chat__profile-dl {
  margin: 0;
  display: grid;
  gap: 0.2rem;
}
.ilaj-chat__profile-dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.35rem;
  font-size: 0.78rem;
}
.ilaj-chat__profile-dl dt {
  margin: 0;
  color: var(--ilaj-chat-muted);
  font-weight: 500;
}
.ilaj-chat__profile-dl dd {
  margin: 0;
  color: #16353d;
  word-break: break-word;
}
.ilaj-chat__profile-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}
.ilaj-chat__profile-actions .ilaj-chat__primary,
.ilaj-chat__profile-actions .ilaj-chat__secondary {
  flex: 1 1 auto;
  min-height: 2rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
}
[dir="rtl"] .ilaj-chat__profile-dl > div {
  grid-template-columns: 1fr 5.5rem;
}
[dir="rtl"] .ilaj-chat__profile-dl dt {
  text-align: left;
}
[dir="rtl"] .ilaj-chat__profile-dl dd {
  text-align: right;
}

.ilaj-chat__form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.ilaj-chat__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ilaj-chat-ink);
}
.ilaj-chat__field input,
.ilaj-chat__field select,
.ilaj-chat__field textarea,
.ilaj-chat__input {
  width: 100%;
  border: 1px solid #d5e3e6;
  border-radius: 14px;
  padding: 0.62rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--ilaj-chat-ink);
}
.ilaj-chat__field textarea { resize: vertical; min-height: 56px; }
.ilaj-chat__consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ilaj-chat-muted);
}
.ilaj-chat__consent input { margin-top: 0.2rem; }
.ilaj-chat__legal { margin: 0; font-size: 0.72rem; }
.ilaj-chat__legal a { color: var(--ilaj-chat-brand); }

.ilaj-chat__primary,
.ilaj-chat__secondary,
.ilaj-chat__ghost {
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.ilaj-chat__primary {
  background: linear-gradient(135deg, var(--ilaj-chat-brand-mid), var(--ilaj-chat-brand-deep));
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 84, 83, 0.25);
}
.ilaj-chat__primary:disabled { opacity: 0.6; cursor: wait; }
.ilaj-chat__secondary {
  background: var(--ilaj-chat-soft);
  color: var(--ilaj-chat-brand-deep);
}
.ilaj-chat__ghost {
  background: transparent;
  color: var(--ilaj-chat-muted);
}
.ilaj-chat__error {
  margin: 0;
  color: #b42318;
  font-size: 0.8rem;
}

/* —— Messages —— */
.ilaj-chat__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.25rem 0.1rem 0.45rem;
  -webkit-overflow-scrolling: touch;
}
.ilaj-chat__msg {
  max-width: 88%;
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  animation: ilaj-chat-msg-in 0.28s ease;
}
.ilaj-chat__msg--visitor {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.ilaj-chat__msg--admin,
.ilaj-chat__msg--bot,
.ilaj-chat__msg--static {
  align-self: flex-start;
}
.ilaj-chat__msg--system {
  align-self: center;
  max-width: 94%;
}
.ilaj-chat__msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #dce8f6;
  box-shadow: 0 1px 4px rgba(15, 39, 68, 0.12);
}
.ilaj-chat__msg-col {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}
.ilaj-chat__bubble {
  padding: 0.72rem 0.9rem;
  border-radius: 18px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.48;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.07);
}
.ilaj-chat__msg--visitor .ilaj-chat__bubble {
  background: var(--ilaj-chat-visitor-bubble);
  color: #163528;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 10px rgba(13, 92, 82, 0.1);
}
html[dir="rtl"] .ilaj-chat__msg--visitor .ilaj-chat__bubble,
.ilaj-chat__panel[dir="rtl"] .ilaj-chat__msg--visitor .ilaj-chat__bubble {
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 6px;
}
.ilaj-chat__msg--admin .ilaj-chat__bubble,
.ilaj-chat__msg--bot .ilaj-chat__bubble,
.ilaj-chat__bubble.is-bot {
  background: var(--ilaj-chat-support-bubble);
  border: 0;
  color: var(--ilaj-chat-ink);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 10px rgba(40, 70, 110, 0.1);
}
html[dir="rtl"] .ilaj-chat__msg--admin .ilaj-chat__bubble,
html[dir="rtl"] .ilaj-chat__msg--bot .ilaj-chat__bubble,
.ilaj-chat__panel[dir="rtl"] .ilaj-chat__msg--admin .ilaj-chat__bubble,
.ilaj-chat__panel[dir="rtl"] .ilaj-chat__msg--bot .ilaj-chat__bubble {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}
.ilaj-chat__msg--system .ilaj-chat__bubble {
  background: transparent;
  color: var(--ilaj-chat-muted);
  font-size: 0.74rem;
  text-align: center;
  padding: 0.2rem 0.45rem;
  box-shadow: none;
  border: 0;
}
.ilaj-chat__bubble-time,
.ilaj-chat__meta {
  font-size: 0.66rem;
  color: var(--ilaj-chat-muted);
  padding-inline: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ilaj-chat__bubble-time {
  margin-top: 0.35rem;
  justify-content: flex-end;
  opacity: 0.9;
}
.ilaj-chat__msg--visitor .ilaj-chat__meta {
  justify-content: flex-end;
  text-align: end;
}
.ilaj-chat__seen {
  color: #16a34a;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: -0.12em;
  font-weight: 700;
}

.ilaj-chat__jump {
  align-self: center;
  border: 0;
  border-radius: 999px;
  background: var(--ilaj-chat-brand-deep);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 0.35rem 0.8rem;
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.ilaj-chat__offline-banner {
  margin: 0 0 0.45rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
}

/* —— Compact initial suggestions (not the full Quick Menu) —— */
.ilaj-chat__chips {
  flex: 0 0 auto;
  margin: 0.1rem 0 0.35rem;
  max-height: none;
  overflow: visible;
}
.ilaj-chat__chips[hidden] { display: none !important; }
.ilaj-chat__chips-label {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--ilaj-chat-muted);
}
.ilaj-chat__chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.ilaj-chat__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #d8e6e8;
  background: #fff;
  color: var(--ilaj-chat-brand-deep);
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  font-size: 0.68rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.25;
  text-align: start;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  max-width: 100%;
}
.ilaj-chat__chip:hover {
  border-color: color-mix(in srgb, var(--ilaj-chat-brand) 40%, #d8e6e8);
  box-shadow: 0 3px 10px rgba(6, 84, 83, 0.1);
}
.ilaj-chat__chip:active { transform: scale(0.98); }
.ilaj-chat__chip-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ilaj-chat-soft);
  color: var(--ilaj-chat-brand);
  font-size: 0.7rem;
}
.ilaj-chat__chip--more {
  background: var(--ilaj-chat-soft);
  border-color: color-mix(in srgb, var(--ilaj-chat-brand) 25%, white);
  color: var(--ilaj-chat-brand-deep);
}

/* —— Closed bar —— */
.ilaj-chat__closed-bar {
  flex-shrink: 0;
  margin: 0.25rem 0 0.4rem;
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  text-align: center;
}
.ilaj-chat__closed-bar[hidden] { display: none !important; }
.ilaj-chat__closed-title {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b42318;
}
.ilaj-chat__closed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}
.ilaj-chat__closed-actions .ilaj-chat__primary,
.ilaj-chat__closed-actions .ilaj-chat__secondary,
.ilaj-chat__closed-actions .ilaj-chat__ghost {
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  font-size: 0.76rem;
  border-radius: 12px;
}

/* —— Composer (messenger style) —— */
.ilaj-chat__composer {
  flex-shrink: 0;
  border-top: 1px solid #e4eef0;
  padding: 0.5rem 0.15rem 0.35rem;
  background: #fff;
  position: sticky;
  bottom: 0;
}
.ilaj-chat__composer.is-closed { display: none; }
.ilaj-chat__composer.is-drag {
  outline: 2px dashed var(--ilaj-chat-brand);
  outline-offset: -4px;
}
.ilaj-chat__attach-tray {
  margin: 0 0 0.4rem;
  padding: 0.5rem 0.6rem;
  background: var(--ilaj-chat-soft);
  border-radius: 12px;
  font-size: 0.76rem;
  color: var(--ilaj-chat-muted);
}
.ilaj-chat__attach-hint { margin: 0 0 0.3rem; color: var(--ilaj-chat-ink); font-weight: 600; }
.ilaj-chat__attach-meta,
.ilaj-chat__attach-privacy { margin: 0 0 0.2rem; }
.ilaj-chat__attach-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid var(--ilaj-chat-brand);
  background: #fff;
  color: var(--ilaj-chat-brand);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.ilaj-chat__attach-browse:hover {
  background: var(--ilaj-chat-soft);
}
.ilaj-chat__attach-list { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.ilaj-chat__attach-item {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; align-items: center;
  padding: 0.3rem 0.4rem; background: #fff; border-radius: 8px;
}
.ilaj-chat__attach-name {
  flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ilaj-chat-ink);
}
.ilaj-chat__attach-err { color: #b42318; width: 100%; }
.ilaj-chat__attach-item button {
  border: 0; background: transparent; color: var(--ilaj-chat-brand); cursor: pointer; font-size: 0.75rem; padding: 0;
}
.ilaj-chat__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ilaj-chat__bubble--file { padding: 0.55rem 0.65rem; max-width: min(100%, 280px); }
.ilaj-chat__file-card { display: flex; gap: 0.55rem; align-items: flex-start; }
.ilaj-chat__file-icon {
  flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 8px; display: grid; place-items: center;
  background: var(--ilaj-chat-soft); color: var(--ilaj-chat-brand-deep);
  font-size: 0.65rem; font-weight: 700;
}
.ilaj-chat__file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.ilaj-chat__file-sub { font-size: 0.72rem; opacity: 0.85; }
.ilaj-chat__file-dl {
  margin-top: 0.25rem; border: 0; background: transparent; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.78rem;
}
.ilaj-chat__inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.ilaj-chat__inline-actions--mrev {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  max-width: 100%;
}
.ilaj-chat__inline-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #4a5d66;
  font-weight: 550;
}
.ilaj-chat__inline-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #d5e3e6;
  background: #fff;
  color: var(--ilaj-chat-brand-deep);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}
.ilaj-chat__inline-action--mrev {
  justify-content: center;
  border-radius: 12px;
  border-color: #0d8a6a;
  background: linear-gradient(180deg, #12a57a 0%, #0d8a6a 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 0.55rem 0.9rem;
  box-shadow: 0 4px 12px rgba(13, 138, 106, 0.22);
}

.ilaj-chat__composer-row {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}
.ilaj-chat__plus-wrap {
  position: relative;
  flex-shrink: 0;
}
.ilaj-chat__menu-btn {
  flex-shrink: 0;
  height: 40px;
  min-width: 40px;
  padding: 0 0.55rem;
  border: 1px solid #dbe4ea;
  border-radius: 999px;
  background: #fff;
  color: var(--ilaj-chat-brand-deep);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.ilaj-chat__menu-btn:hover {
  background: var(--ilaj-chat-soft);
  border-color: color-mix(in srgb, var(--ilaj-chat-brand) 30%, #d5e3e6);
}
.ilaj-chat__menu-btn:active { transform: scale(0.96); }
.ilaj-chat__menu-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ilaj-chat__menu-btn[aria-expanded="true"] {
  background: var(--ilaj-chat-soft);
  border-color: var(--ilaj-chat-brand);
}
.ilaj-chat__attach,
.ilaj-chat__plus-wrap .ilaj-chat__attach {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.ilaj-chat__attach:hover { background: #eef3f6; color: var(--ilaj-chat-brand-deep); }
.ilaj-chat__attach:active { transform: scale(0.94); }
.ilaj-chat__attach:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ilaj-chat__input-shell {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}
.ilaj-chat__input {
  flex: 1;
  width: 100%;
  min-height: 42px;
  max-height: 100px;
  resize: none;
  border-radius: 999px !important;
  padding: 0.58rem 2.35rem 0.58rem 0.95rem !important;
  background: #fff !important;
  border: 1px solid #dbe4ea !important;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.04);
  color: var(--ilaj-chat-ink);
}
.ilaj-chat__emoji {
  position: absolute;
  inset-inline-end: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.ilaj-chat__emoji:hover { color: var(--ilaj-chat-brand); }
.ilaj-chat__send {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f6b60, #0d5c52);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(13, 92, 82, 0.3);
  position: relative;
  flex-shrink: 0;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.ilaj-chat__send::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2L11 13'/%3E%3Cpath d='M22 2L15 22l-4-9-9-4 20-7z'/%3E%3C/svg%3E");
}
.ilaj-chat__panel[dir="rtl"] .ilaj-chat__send::before,
html[dir="rtl"] .ilaj-chat__send::before {
  transform: scaleX(-1);
}
.ilaj-chat__send:hover { transform: scale(1.04); }
.ilaj-chat__send:active { transform: scale(0.94); }
.ilaj-chat__send:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.ilaj-chat__composer-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--ilaj-chat-muted);
  min-height: 0.9rem;
}

.ilaj-chat__plus-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 6;
  min-width: 188px;
  max-width: min(260px, 78vw);
  max-height: 220px;
  overflow: auto;
  padding: 0.35rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d7e6f0;
  box-shadow: 0 12px 28px rgba(8, 79, 112, 0.18);
  animation: ilaj-chat-fade-in 0.16s ease;
}
.ilaj-chat__plus-menu[hidden] { display: none !important; }
.ilaj-chat__plus-menu button {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ilaj-chat-ink);
  cursor: pointer;
}
.ilaj-chat__plus-menu button:hover {
  background: var(--ilaj-chat-soft);
}

/* —— Quick Menu: internal bottom sheet (never full-screen) —— */
.ilaj-chat__sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4.7rem; /* keep sticky composer + Menu/Send visible */
  z-index: 8;
  display: flex;
  flex-direction: column;
  max-height: 50%;
  min-height: 0;
  padding: 0.35rem 0.55rem 0.55rem;
  border-radius: 18px 18px 14px 14px;
  background: #fff;
  border: 1px solid #dce8eb;
  box-shadow: 0 -8px 28px rgba(8, 28, 36, 0.16);
  animation: ilaj-chat-sheet-up 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.ilaj-chat__sheet[hidden] { display: none !important; }
.ilaj-chat__sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #d0dce0;
  margin: 0.15rem auto 0.35rem;
}
.ilaj-chat__sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}
.ilaj-chat__sheet-head strong {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--ilaj-chat-brand-deep);
}
.ilaj-chat__sheet-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: #f1f5f7;
  color: var(--ilaj-chat-ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.ilaj-chat__sheet-close:hover { background: #e4ecee; }
.ilaj-chat__sheet-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
  min-height: 0;
}
.ilaj-chat__sheet-body button {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  text-align: start;
  border: 1px solid #e1ebed;
  background: #f8fbfb;
  border-radius: 12px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ilaj-chat-ink);
  cursor: pointer;
  line-height: 1.25;
  min-height: 40px;
}
.ilaj-chat__sheet-body button:hover {
  background: var(--ilaj-chat-soft);
  border-color: color-mix(in srgb, var(--ilaj-chat-brand) 28%, #e1ebed);
}
.ilaj-chat__sheet-body button[data-persist-action="end"] {
  grid-column: 1 / -1;
  justify-content: center;
  color: #b42318;
  background: #fff5f5;
  border-color: #fecaca;
}

@keyframes ilaj-chat-sheet-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ilaj-chat__support-typing {
  padding: 0.1rem 0.25rem 0.35rem;
  font-size: 0.74rem;
  color: #64748b;
  font-style: italic;
  min-height: 1.1rem;
}
.ilaj-chat__typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: 0.35rem;
}
.ilaj-chat__typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
  animation: ilaj-chat-dot 1.1s ease-in-out infinite;
}
.ilaj-chat__typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ilaj-chat__typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ilaj-chat-pulse {
  0% { box-shadow: 0 0 0 0 rgba(10, 107, 106, 0.45); }
  100% { box-shadow: 0 0 0 16px rgba(10, 107, 106, 0); }
}
@keyframes ilaj-chat-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
@keyframes ilaj-chat-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ilaj-chat-slide-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ilaj-chat-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ilaj-chat__launcher,
  .ilaj-chat__launcher.is-pulse,
  .ilaj-chat__panel,
  .ilaj-chat__overlay,
  .ilaj-chat__msg,
  .ilaj-chat__typing-dots span {
    animation: none !important;
    transition: none !important;
  }
}

.chat-panel { display: none !important; }
