/* Website live chat (ADR-0123): the bubble and the panel. Theme tokens from
   styles.css (light / dark), logical properties so Arabic mirrors itself. */
.sc-root { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 900; font-family: inherit; }
.sc-bubble {
  display: flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; border-radius: 999px; padding: 13px 18px 13px 15px;
  font: 600 15px/1 sans-serif; font-family: inherit; box-shadow: 0 6px 22px rgba(12, 100, 174, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.sc-bubble:hover { transform: translateY(-1px); box-shadow: 0 9px 26px rgba(12, 100, 174, .42); }
.sc-bubble:focus-visible { outline: 3px solid var(--accent-on-dark); outline-offset: 2px; }
.sc-bubble i { font-size: 19px; }
.sc-root.open .sc-bubble { display: none; }

.sc-panel {
  display: none; flex-direction: column; width: 370px; max-width: calc(100vw - 24px);
  height: 560px; max-height: calc(100vh - 36px); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.sc-root.open .sc-panel { display: flex; }
.sc-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px;
  background: var(--navy-900); color: #fff;
}
.sc-head .sc-dot { width: 9px; height: 9px; border-radius: 50%; background: #3fbf7f; flex: none; }
.sc-head .sc-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.sc-head .sc-sub { font-size: 12px; opacity: .8; margin-top: 2px; }
.sc-head .sc-call {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px;
  padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08); color: #fff; font: 600 13px/1 sans-serif; font-family: inherit; cursor: pointer;
}
.sc-head .sc-call:hover { background: rgba(255, 255, 255, .18); }
.sc-head .sc-call:disabled { opacity: .5; cursor: default; }
.sc-head .sc-call[hidden] { display: none; }
.sc-head .sc-call + .sc-x { margin-inline-start: 4px; }
.sc-msg.call { border-style: dashed; }
.sc-msg.me.call { background: color-mix(in srgb, var(--accent) 80%, #000); }
.sc-head .sc-x {
  margin-inline-start: auto; background: transparent; border: 0; color: #fff; cursor: pointer;
  font-size: 18px; width: 34px; height: 34px; border-radius: 8px;
}
.sc-head .sc-x:hover { background: rgba(255, 255, 255, .12); }

.sc-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.sc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.sc-msg a { color: inherit; text-decoration: underline; }
.sc-msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-end-start-radius: 4px; }
.sc-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-end-end-radius: 4px; }
.sc-msg.note { align-self: center; max-width: 100%; background: transparent; color: var(--muted);
  font-size: 12.5px; text-align: center; padding: 2px 6px; }
.sc-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; }
.sc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4;
  animation: sc-blink 1.2s infinite ease-in-out; }
.sc-typing span:nth-child(2) { animation-delay: .15s; }
.sc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: .9; } }

.sc-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 10px; }
.sc-chip { border: 1px solid var(--line); background: var(--card); color: var(--accent); border-radius: 999px;
  padding: 6px 11px; font: 500 13px/1.2 sans-serif; font-family: inherit; cursor: pointer; }
.sc-chip:hover { border-color: var(--accent); }

.sc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.sc-form textarea {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: 14.5px/1.4 sans-serif; font-family: inherit; max-height: 110px; min-height: 42px; background: var(--card); color: var(--ink);
}
.sc-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.sc-send { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--accent);
  color: #fff; cursor: pointer; font-size: 16px; }
.sc-send:disabled { opacity: .45; cursor: default; }
[dir="rtl"] .sc-send i { transform: scaleX(-1); }

.sc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 0 14px 11px; font-size: 12px; color: var(--muted); }
.sc-person { background: none; border: 0; padding: 0; color: var(--accent); font: 600 12.5px/1.3 sans-serif; font-family: inherit; cursor: pointer; }
.sc-person:hover { text-decoration: underline; }

.sc-hand { padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.sc-hand p { margin: 0; font-size: 13.5px; color: var(--ink); }
.sc-hand input, .sc-hand textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font: 14px/1.4 sans-serif; font-family: inherit; background: var(--card); color: var(--ink); }
.sc-hand textarea { resize: vertical; min-height: 60px; }
.sc-hand .sc-row { display: flex; gap: 8px; align-items: center; }
.sc-hand .btn { padding: 9px 14px; }
.sc-hand .sc-err { color: var(--danger); font-size: 12.5px; min-height: 1em; }

@media (max-width: 520px) {
  .sc-root.open { inset: 0; }
  .sc-root.open .sc-panel { width: 100vw; max-width: none; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .sc-bubble .sc-label { display: none; }
  .sc-bubble { padding: 15px; }
}
@media print { .sc-root { display: none; } }
@media (prefers-reduced-motion: reduce) { .sc-typing span { animation: none; } .sc-bubble { transition: none; } }
