/* Customer pager page — mobile first, RTL */
:root {
    --brand: #13B8B4;
    --bg: #f6f6f8;
    --card: #fff;
    --text: #1b1e27;
    --muted: #737887;
    --line: #ececf1;
    --ok: #16a34a;
    --warn: #f59e0b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
    font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.5; font-size: 16px;
    min-height: 100vh; min-height: 100dvh;
}
button { font: inherit; }
.wrap { max-width: 480px; margin: 0 auto; padding: 0 16px 40px; }

/* header */
.hero {
    background: var(--brand); color: #fff; padding: 22px 16px 70px; text-align: center;
    border-radius: 0 0 28px 28px; position: relative;
}
.hero .restaurant-brand { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; max-width:100%; margin:0 auto; }
.hero .restaurant-brand.has-logo .rname { max-width:calc(100% - 76px); }
.hero .logo { display:block; width:auto; height:auto; max-width:64px; max-height:56px; border-radius:12px; object-fit:contain; background:#fff; padding:3px; margin:0; flex:0 0 auto; }
.hero .rname { font-weight: 800; font-size: clamp(1rem, 4vw, 1.2rem); opacity: .95; min-width:0; overflow-wrap:anywhere; line-height:1.35; }
.hero .num-label { margin-top: 14px; font-size: .85rem; opacity: .85; }
.hero .num { font-size: 3.2rem; font-weight: 900; letter-spacing: 1px; line-height: 1.1; }
.hero .oname { font-size: 1.15rem; font-weight: 700; margin-top: 2px; }

.card { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: 0 6px 24px rgba(20, 20, 40, .06); margin-top: 14px; }
.card.lift { margin-top: -52px; position: relative; z-index: 2; }
.card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* countdown ring */
.ring-wrap { position: relative; width: 210px; height: 210px; margin: 6px auto 4px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .track { stroke: #f0f0f4; }
.ring-wrap .prog { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center .time { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; }
.ring-center .sub { font-size: .85rem; color: var(--muted); }
.eta-line { text-align: center; font-weight: 700; }
.msg { text-align: center; color: var(--muted); font-size: .95rem; margin: 6px 0 0; }

/* steps */
.steps { display: flex; justify-content: space-between; margin: 18px 4px 4px; position: relative; }
.steps::before { content: ""; position: absolute; top: 15px; right: 16%; left: 16%; height: 3px; background: var(--line); }
.step { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; }
.step .dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; margin: 0 auto 4px; font-size: .9rem; }
.step.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.now .dot { border-color: var(--brand); animation: beat 1.4s infinite; }
.step.done, .step.now { color: var(--text); font-weight: 700; }
@keyframes beat { 50% { transform: scale(1.12); } }

/* alert enable */
.enable {
    background: #fff8e6; border: 2px dashed var(--warn); border-radius: 18px; padding: 16px; text-align: center; margin-top: 14px;
}
.enable p { margin: 0 0 10px; font-size: .95rem; }
.enable.on { background: #ecfdf3; border: 2px solid #86efac; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
    padding: 14px 18px; font-weight: 800; cursor: pointer; background: #eef0f4; color: var(--text); font-size: 1rem;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 18px; font-size: 1.15rem; }

/* items */
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items .q { background: var(--bg); border-radius: 8px; min-width: 34px; text-align: center; font-weight: 800; color: var(--brand); height: 28px; line-height: 28px; }
.items .n small { display: block; color: var(--muted); }

/* READY full screen */
.ready-screen {
    position: fixed; inset: 0; z-index: 50; display: none; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: #fff; padding: 24px; background: var(--brand);
}
.ready-screen.show { display: flex; animation: flashbg 1s infinite; }
@keyframes flashbg { 0%, 100% { background: var(--brand); } 50% { background: #111827; } }
.ready-screen .bell { font-size: 5rem; animation: shake .5s infinite; display: inline-block; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(18deg); } 75% { transform: rotate(-18deg); } }
.ready-screen h1 { font-size: 2.4rem; margin: 10px 0 0; }
.ready-screen .num { font-size: 4.4rem; font-weight: 900; line-height: 1; margin: 6px 0; }
.ready-screen p { font-size: 1.1rem; opacity: .95; margin: 6px 0 26px; max-width: 360px; }
.ready-screen .btn { background: #fff; color: #111; min-width: 260px; padding: 20px; font-size: 1.2rem; }
.ready-screen .later { background: transparent; color: #fff; margin-top: 10px; font-weight: 600; font-size: .95rem; text-decoration: underline; }

.ready-banner { background: #ecfdf3; border: 2px solid #86efac; color: #14532d; border-radius: 18px; padding: 16px; text-align: center; margin-top: 14px; }
.ready-banner b { font-size: 1.3rem; }

/* feedback */
.stars-input { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; }
.stars-input.sm { justify-content: flex-start; gap: 2px; }
.stars-input button { background: none; border: 0; font-size: 2.4rem; color: #d7d9e0; cursor: pointer; padding: 0 2px; line-height: 1; transition: transform .1s; }
.stars-input.sm button { font-size: 1.7rem; }
.stars-input button.on { color: #f5b301; }
.stars-input button:active { transform: scale(1.25); }
.rate-label { text-align: center; font-weight: 700; min-height: 1.5em; color: var(--muted); }
.fb-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-top: 10px; }
.fb-item .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-item .name { font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: .88rem; cursor: pointer; }
.chip.on { background: #fee2e2; border-color: #fca5a5; color: #991b1b; font-weight: 700; }
.problem-toggle { background: none; border: 0; color: var(--brand); font-weight: 700; cursor: pointer; padding: 6px 0 0; font-size: .9rem; }
textarea, input[type=text] {
    width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; font: inherit; resize: vertical; background: #fff;
}
textarea:focus, input:focus { outline: none; border-color: var(--brand); }
.mini-rates { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mini-rates .r { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yn { display: flex; gap: 8px; }
.yn button { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; font-weight: 700; cursor: pointer; }
.yn button.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.anon { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .85rem; color: var(--muted); margin-top: 10px; }

.thanks { text-align: center; padding: 26px 10px; }
.thanks .big { font-size: 4rem; }
.err { color: #b91c1c; text-align: center; font-size: .9rem; margin-top: 8px; min-height: 1.2em; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 22px; }
.foot .najiz-brand { display:inline-flex; align-items:center; justify-content:center; gap:8px; color:inherit; text-decoration:none; font-size:16px; line-height:1.3; font-weight:600; }
.foot .najiz-brand img { display:block; width:28px; height:28px; object-fit:contain; flex:0 0 auto; }
.offline { position: fixed; top: 0; left: 0; right: 0; background: #111827; color: #fff; text-align: center; padding: 6px; font-size: .85rem; z-index: 60; display: none; }
.offline.show { display: block; }
.hidden { display: none !important; }

