/* نافذة المساعد الذكي — تستخدم ألوان الموقع (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; }
/* كارت «ابعت طلبك على واتساب» */
.rqc-wa { align-self: stretch; background: #fff; border: 1px solid #b9e3c6; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 18px rgba(11, 34, 71, .08); }
.rqc-wa-h { display: flex; align-items: center; gap: 8px; color: #128c4b; font-size: 14px; }
.rqc-wa-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; color: var(--rqc-ink); background: #f3faf5; border-radius: 10px; padding: 10px 12px; max-height: 220px; overflow-y: auto; border: 1px dashed #b9e3c6; }
.rqc-wa-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; background: #1fa855; color: #fff !important; font-weight: 800; font-size: 15.5px; text-decoration: none !important; }
.rqc-wa-btn:active { filter: brightness(.95); }
.rqc-wa-btn:focus-visible { outline: 3px solid var(--rqc-gold); outline-offset: 2px; }
.rqc-wa-btn.is-sent { background: #e9f7ee; color: #12703d !important; border: 1px solid #b9e3c6; }
.rqc-wa-note { font-size: 11.5px; color: var(--rqc-muted); text-align: center; }
@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; } }

/* «خدمة العملاء»: زرار باسم + نقطة متاح + فقاعة بتعرض المساعدة أثناء التصفح (الحزمة بتفعّلها) */
.rqc-launch--cs { position: fixed; }
.rqc-online { position: absolute; top: 2px; inset-inline-start: 4px; width: 11px; height: 11px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 2px var(--rqc-navy); }
.rqc-launch--cs::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--rqc-gold); opacity: 0; pointer-events: none; }
.rqc-launch.rqc-idle::after { animation: rqcRing 2.6s ease-out 3s infinite; }
.rqc-launch.rqc-wiggle { animation: rqcWiggle .9s ease 2; }
.rqc-launch.rqc-wiggle::after { animation: rqcRing 1.4s ease-out 3; }
@keyframes rqcRing { 0% { opacity: .75; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.35); } }
@keyframes rqcWiggle { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-9deg) scale(1.06); } 30% { transform: rotate(8deg) scale(1.06); } 45% { transform: rotate(-6deg); } 60% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
.rqc-nudge { position: fixed; z-index: 61; bottom: calc(var(--rqc-lb, 22px) + 66px); inset-inline-end: 22px; width: min(320px, calc(100vw - 32px)); padding: 14px 14px 12px; background: #fff; color: var(--rqc-ink); border: 1px solid var(--rqc-line); border-radius: 16px; border-end-end-radius: 4px; box-shadow: 0 18px 44px rgba(11, 34, 71, .22); cursor: pointer; opacity: 0; transform: translateY(14px) scale(.96); transform-origin: bottom left; transition: opacity .28s ease, transform .38s cubic-bezier(.2, 1.4, .4, 1); }
.rqc-nudge:dir(ltr) { transform-origin: bottom right; }
.rqc-nudge[hidden] { display: none; }
.rqc-nudge.is-in { opacity: 1; transform: none; }
#rqChat.is-open .rqc-nudge { display: none; }
.rqc-nudge-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--rqc-muted); cursor: pointer; }
.rqc-nudge-x:hover { background: var(--rqc-soft, #f5f2ea); }
.rqc-nudge-x svg { width: 16px; height: 16px; }
.rqc-nudge-who { display: flex; align-items: center; gap: 10px; margin-inline-end: 30px; }
.rqc-nudge-av { position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--rqc-navy); color: var(--rqc-gold); }
.rqc-nudge-av::after { content: ""; position: absolute; bottom: 0; inset-inline-end: 0; width: 10px; height: 10px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 2px #fff; }
.rqc-nudge-name { display: flex; flex-direction: column; line-height: 1.3; }
.rqc-nudge-name b { font-size: 14.5px; }
.rqc-nudge-name small { font-size: 12px; color: #1f9a5a; font-weight: 600; }
.rqc-nudge-msg { margin-top: 10px; }
.rqc-nudge-typing { display: inline-flex; gap: 4px; padding: 10px 12px; background: var(--rqc-soft, #f5f2ea); border-radius: 12px; }
.rqc-nudge-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--rqc-muted); opacity: .4; animation: rqcDot 1.2s infinite; }
.rqc-nudge-typing span:nth-child(2) { animation-delay: .2s; }
.rqc-nudge-typing span:nth-child(3) { animation-delay: .4s; }
.rqc-nudge-body[hidden] { display: none; }
.rqc-nudge-body { animation: rqcPop .35s ease both; }
.rqc-nudge-body strong { display: block; font-size: 15.5px; margin-bottom: 2px; }
.rqc-nudge-body p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--rqc-ink); }
.rqc-nudge-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rqc-nudge-chip { min-height: 38px; border: 1px solid var(--rqc-gold); background: #fff; color: var(--rqc-ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.rqc-nudge-chip:hover, .rqc-nudge-chip:focus-visible { background: var(--rqc-gold); color: #fff; }
@keyframes rqcPop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  #rqChat { --rqc-lb: 16px; }
  body:has(.sk-mobilebar) #rqChat { --rqc-lb: 92px; }
  .rqc-nudge { inset-inline-end: 16px; bottom: calc(var(--rqc-lb, 16px) + 62px); }
}
@media (prefers-reduced-motion: reduce) {
  .rqc-launch.rqc-idle::after, .rqc-launch.rqc-wiggle, .rqc-launch.rqc-wiggle::after, .rqc-nudge-typing span, .rqc-nudge-body { animation: none; }
  .rqc-nudge { transition: opacity .2s ease; transform: none; }
}

/* كارت «اطلب عن طريق خدمة العملاء» بدل الفورم (الحزمة طالبة الطلبات عن طريق المساعد) */
.sk-chat-cta { text-align: center; }
.sk-chat-cta-p { margin: 0 auto 16px; max-width: 46ch; line-height: 1.8; opacity: .9; }
.sk-chat-cta-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding-inline: 22px; }
.sk-chat-cta-note { margin: 12px 0 0; font-size: .86rem; opacity: .75; }
/* كروت المساعد (منيو، تقدير، عرض سعر) + ردود سريعة */
.rqc-card { flex-shrink: 0; align-self: flex-start; width: 88%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rqc-line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--rqc-ink); font-size: 14px; }
a.rqc-card:hover { border-color: var(--rqc-gold); }
.rqc-card-img { width: 100%; height: 118px; object-fit: cover; display: block; }
.rqc-card-b { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.rqc-card-b strong { font-size: 15px; }
.rqc-card-sub { color: var(--rqc-muted); font-size: 13px; line-height: 1.6; }
.rqc-card-st { align-self: flex-start; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #eef2f7; color: #344; }
.rqc-card.is-ok .rqc-card-st { background: #e7f4ec; color: #136b3a; }
.rqc-card.is-wait .rqc-card-st { background: #fff4dc; color: #7a5300; }
.rqc-card-price { font-weight: 700; color: var(--rqc-ink); margin-top: 2px; }
.rqc-card-lines { display: grid; gap: 3px; margin: 4px 0; font-size: 12.5px; }
.rqc-card-lines div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--rqc-line); padding-bottom: 2px; }
.rqc-card-lines b { white-space: nowrap; font-weight: 600; }
.rqc-card-cta { align-self: flex-start; margin-top: 6px; background: var(--rqc-navy); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.rqc-qr { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
