/* Page-specific styles: reviews, checkout, order tracking, account, review invitation. Uses app.css tokens. */
.stars { color: var(--gold); letter-spacing: .05em; font-size: .95rem; }
.muted { color: var(--muted); font-size: .82rem; }
.reviews-list { display: grid; gap: 14px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; display: grid; gap: 8px; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-reply { border-inline-start: 3px solid var(--accent); padding: 8px 14px; background: var(--accent-soft); border-radius: var(--radius-s); font-size: .92rem; }
.review-form { margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; }
.review-form h3 { font-size: 1.3rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 1.8rem; }
html[dir="rtl"] .star-input { flex-direction: row; }
.star-input label { cursor: pointer; color: var(--line); }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ span, .star-input label:has(input:checked), .star-input label:has(input:checked) ~ label { color: var(--gold); }
html[dir="rtl"] .star-input label:hover ~ label, html[dir="rtl"] .star-input label:has(input:checked) ~ label { color: var(--line); }
html[dir="rtl"] .star-input label:has(~ label:hover), html[dir="rtl"] .star-input label:has(~ label input:checked) { color: var(--gold); }
.form-error { color: var(--danger); font-size: .9rem; }
.form .field-error { border-color: var(--danger) !important; }
.form .hint { color: var(--danger); font-size: .8rem; font-weight: 400; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; display: grid; gap: 14px; margin: 0; }
.form legend { padding: 0 8px; font-weight: 600; }
.radio-list { display: grid; gap: 10px; }
.radio-list label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-weight: 400; }
.radio-list label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-list input { margin-top: 4px; accent-color: var(--accent); }
.radio-list small { display: block; color: var(--text-2); }

/* checkout */
.checkout-layout { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: var(--section-gap); }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } .checkout-layout .summary { position: static; } }
.summary { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; display: grid; gap: 12px; }
.summary h3 { font-size: 1.3rem; }
.summary .line { display: flex; gap: 12px; align-items: center; font-size: .92rem; }
.summary .line img { width: 48px; height: 48px; object-fit: contain; background: var(--surface-2); border-radius: 8px; padding: 4px; }
.summary .line .grow { flex: 1; }
.summary .row { display: flex; justify-content: space-between; color: var(--text-2); }
.summary .row.total { color: var(--text); font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 10px; }
.map { height: 260px; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.map-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: .85rem; color: var(--text-2); }
.problems { display: grid; gap: 6px; }

/* order tracking */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 4px; }
.timeline .step { text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 18px; }
.timeline .step::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.timeline .step.done { color: var(--text); } .timeline .step.done::before { background: var(--success); }
.timeline .step.current::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 30px); display: grid; gap: 16px; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .order-grid { grid-template-columns: 1fr; } .timeline { grid-template-columns: repeat(5, 1fr); } .timeline .step { font-size: .66rem; } }
.kv { display: grid; gap: 4px; } .kv small { color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .kv small { letter-spacing: 0; }
.status-pill { display: inline-flex; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--surface-2); }
.status-pill.ok { background: rgba(79,127,90,.14); color: var(--success); } .status-pill.warn { background: rgba(201,164,106,.2); color: #8a6a2e; } .status-pill.bad { background: rgba(176,74,59,.12); color: var(--danger); }
html[data-theme="dark"] .status-pill.warn { color: var(--gold); }
.recipient { background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; display: grid; gap: 4px; font-size: .95rem; }
.recipient b { user-select: all; }

/* assistant widget (themed with shared tokens; calm on checkout) */
.as-fab { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px 0 14px; height: 52px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
html[dir="rtl"] .as-fab { padding: 0 14px 0 18px; }
.as-fab:hover { transform: translateY(-2px); }
.as-fab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linejoin: round; }
.as-panel { position: fixed; bottom: 86px; inset-inline-start: 22px; z-index: 61; width: min(94vw, 400px); height: min(70vh, 620px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.as-panel[hidden] { display: none; }
.as-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.as-sub { font-size: .72rem; color: var(--muted); line-height: 1.35; max-width: 34ch; }
.as-tools { display: flex; gap: 6px; } .as-tools .icon-btn { width: 36px; height: 36px; font-size: .95rem; }
.as-log { flex: 1; overflow: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.as-msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.5; }
.as-msg.bot { background: var(--bg); border: 1px solid var(--line); border-start-start-radius: 4px; justify-self: start; }
.as-msg.me { background: var(--accent); color: var(--accent-ink); border-start-end-radius: 4px; justify-self: end; }
.as-msg p { margin: 0; } .as-typing { color: var(--muted); font-style: italic; }
.as-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .as-quick .chip { font-size: .8rem; padding: 6px 12px; }
.as-card { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; font-size: .88rem; }
.as-card ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; } .as-card.done { color: var(--success); }
.as-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.as-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.as-form textarea { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg); resize: none; max-height: 120px; font-size: .93rem; min-width: 0; }
.as-mic.on { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(176,74,59,.35); } 50% { box-shadow: 0 0 0 8px rgba(176,74,59,0); } }
@media (prefers-reduced-motion: reduce) { .as-mic.on { animation: none; } }
@media (max-width: 560px) { .as-panel { inset-inline-start: 3vw; width: 94vw; height: 72vh; bottom: 80px; } .as-fab span { display: none; } .as-fab { padding: 0; width: 52px; justify-content: center; } }
body[data-page="checkout"] .as-fab, body[data-page="checkout"] .as-panel { display: none; }   /* keep checkout calm */

/* account */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { padding: 10px 16px; border-radius: 999px 999px 0 0; color: var(--text-2); font-weight: 600; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom: 2px solid var(--accent); }
.list-table { width: 100%; border-collapse: collapse; }
.list-table th, .list-table td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.list-table th { font-size: .76rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .list-table th { letter-spacing: 0; }
.auth-card { max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; }
.narrow { max-width: 760px; }
.page-head { padding: clamp(28px, 4vw, 56px) 0 24px; }
