/* نافذة المساعد الذكي — تستخدم ألوان الموقع (site.css) مع قيم احتياطية */
#rqChat { --rqc-navy: var(--navy, #12305c); --rqc-gold: var(--gold, #c9962e); --rqc-ink: var(--ink, #1d2b45); --rqc-muted: var(--muted, #5b6b85); --rqc-line: var(--line, #e8dfc9); --rqc-bg: #fff; --rqc-soft: #f5f3ec; font-family: inherit; }
.rqc-launch { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 61; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--rqc-navy); color: #fff; font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 10px 26px rgba(11, 34, 71, .28); cursor: pointer; }
.rqc-launch:hover { filter: brightness(1.08); }
.rqc-launch:focus-visible, .rqc-panel button:focus-visible, .rqc-input:focus-visible { outline: 3px solid var(--rqc-gold); outline-offset: 2px; }
#rqChat.is-open .rqc-launch { display: none; }
.rqc-panel { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 62; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 44px)); display: flex; flex-direction: column; background: var(--rqc-bg); border-radius: 18px; box-shadow: 0 24px 60px rgba(11, 34, 71, .28); overflow: hidden; color: var(--rqc-ink); }
.rqc-panel[hidden] { display: none; }
.rqc-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--rqc-navy); color: #fff; }
.rqc-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rqc-title strong { font-size: 15.5px; }
.rqc-sub { font-size: 12px; opacity: .8; }
.rqc-human { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.rqc-human[hidden] { display: none; }
.rqc-x { border: 0; background: transparent; color: #fff; padding: 4px; cursor: pointer; border-radius: 8px; display: inline-flex; }
.rqc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--rqc-soft); }
.rqc-msg { max-width: 86%; padding: 9px 12px 6px; border-radius: 14px; font-size: 14.5px; line-height: 1.65; word-wrap: break-word; overflow-wrap: anywhere; }
.rqc-bot { align-self: flex-start; background: #fff; border: 1px solid var(--rqc-line); border-start-start-radius: 4px; }
.rqc-staff { align-self: flex-start; background: #fff8e6; border: 1px solid #efd9a0; border-start-start-radius: 4px; }
.rqc-me { align-self: flex-end; background: var(--rqc-navy); color: #fff; border-start-end-radius: 4px; }
.rqc-me a { color: #fff; }
.rqc-msg a { color: var(--rqc-navy); font-weight: 700; text-decoration: underline; }
.rqc-by { display: block; font-size: 11.5px; font-weight: 700; color: #8a6a1c; margin-bottom: 2px; }
.rqc-at { display: block; font-size: 10.5px; opacity: .55; text-align: end; margin-top: 2px; }
.rqc-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.rqc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--rqc-muted); opacity: .4; animation: rqcDot 1.2s infinite; }
.rqc-typing span:nth-child(2) { animation-delay: .2s; }
.rqc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes rqcDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.rqc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: var(--rqc-soft); }
.rqc-chips[hidden] { display: none; }
.rqc-chip { border: 1px solid var(--rqc-line); background: #fff; color: var(--rqc-ink); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.rqc-chip:hover { border-color: var(--rqc-gold); }
.rqc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rqc-line); background: #fff; }
.rqc-input { flex: 1; resize: none; border: 1px solid var(--rqc-line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14.5px; line-height: 1.5; max-height: 120px; color: var(--rqc-ink); background: #fff; }
.rqc-send { border: 0; background: var(--rqc-gold); color: #fff; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rqc-send:disabled { opacity: .5; cursor: wait; }
.rqc-foot { font-size: 11px; color: var(--rqc-muted); text-align: center; padding: 0 12px 8px; background: #fff; }
@media (max-width: 560px) {
  .rqc-launch { bottom: 16px; inset-inline-end: 16px; padding: 11px 14px; font-size: 14px; }
  body:has(.sk-mobilebar) .rqc-launch { bottom: 92px; }
  .rqc-panel { inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; bottom: 0; inset-inline-end: 0; }
}
@media (prefers-reduced-motion: reduce) { .rqc-typing span { animation: none; opacity: .6; } }
