/* Kauthar AI — rich answers (direction-neutral: logical properties only, works in RTL and LTR): rendered markdown + product cards (public chat, playground, inbox). Brand variables with fallbacks. */
.rc-cards {
  display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 8px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.rc-cards::-webkit-scrollbar { height: 6px; }
.rc-cards::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 6px; }
.rc-card {
  flex: 0 0 216px; max-width: 86%; display: flex; flex-direction: column; scroll-snap-align: start;
  background: #fff; color: #0f172a; border: 1px solid var(--line, #e2e8f0); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .06); text-align: start;
}
.rc-cards.one .rc-card { flex-basis: 300px; }
.rc-card-img { aspect-ratio: 4 / 3; background: #f1f5f9; overflow: hidden; display: block; position: relative; cursor: zoom-in; }
/* contain, not cover: screenshots and product photos are shown whole; tap opens the full-size viewer */
.rc-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rc-zoom-ic { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(15, 23, 42, .62);
  color: #fff; font-size: 14px; display: grid; place-items: center; pointer-events: none; }
.rc-viewer { position: fixed; inset: 0; z-index: 2147483000; background: rgba(2, 6, 23, .92); display: flex; align-items: center; justify-content: center; }
.rc-viewer-s { width: 100%; height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; -webkit-overflow-scrolling: touch; touch-action: pinch-zoom pan-x pan-y; }
.rc-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.rc-viewer.full .rc-viewer-s { display: block; }
.rc-viewer.full img { max-width: none; max-height: none; width: 200%; cursor: zoom-out; }
.rc-viewer-x { position: fixed; top: 12px; inset-inline-start: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16);
  color: #fff; font-size: 18px; cursor: pointer; z-index: 1; display: grid; place-items: center; }
.rc-card-b { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rc-card-t { font-weight: 700; font-size: 14px; line-height: 1.45; }
.rc-card-x { font-size: 12.5px; color: var(--muted, #64748b); line-height: 1.6; }
.rc-card-x strong { color: #0f172a; }
.rc-card-l { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.rc-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 10px; line-height: 1.4;
  background: var(--brand, #2563eb); color: var(--on-brand, #fff) !important; font-size: 12.5px; font-weight: 700; text-decoration: none !important;
}
.rc-btn:hover { filter: brightness(.95); }
.rc-btn.alt { background: #fff; color: var(--brand-ink, #2563eb) !important; border: 1.5px solid var(--brand-ink, #2563eb); }
/* rendered markdown inside dashboard bubbles */
.md { white-space: normal !important; }
.md p { margin: 0 0 .35rem; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: .2rem 0 .4rem; padding-inline-start: 1.25rem; }
.md li { margin: .1rem 0; }
.md a { font-weight: 600; word-break: break-all; }
.md code { font-size: .9em; background: rgba(100, 116, 139, .12); padding: 0 .3em; border-radius: 4px; }
[data-bs-theme=dark] .rc-card { background: #1f2937; color: #e5e7eb; border-color: #374151; }
[data-bs-theme=dark] .rc-card-x strong { color: #f3f4f6; }
[data-bs-theme=dark] .rc-card-img { background: #111827; }
@media print { .rc-cards { display: block; } .rc-card { display: inline-block; width: 45%; vertical-align: top; margin: 4px; } .rc-btn { display: none; } }
/* «اطلب الآن» on synced store product cards (public chat only — md.js cards opts.order) */
.rc-order { border: 0; cursor: pointer; font-family: inherit; }
