/* ============================================================
   Path: src/RichRich.Web/wwwroot/css/customer-display.css
   Session: J-168 (D49)
   LastModified: 2026-10-05
   Module: M12 POS (Frontend) — the customer display
   ============================================================
   🆕 NEW FILE — J-168 (D49) «شاشة العميل عند الكاشير»
   شاشةٌ تُقرأ من مترين: خلفيّةٌ داكنة وأرقامٌ كبيرة، والعنوان الثاني (اللغة الأخرى) أصغر تحته.
   كلّ صنفٍ يبدأ بـ.cd- — تحت PosLayout (ملء الشاشة).
   ============================================================ */

.cd-screen {
    --cd-bg: #10241a;
    --cd-panel: #173426;
    --cd-ink: #f4f1ea;
    --cd-muted: #a9b8ae;
    --cd-accent: #7fd39b;
    --cd-line: rgba(244, 241, 234, .12);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--cd-bg);
    color: var(--cd-ink);
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.cd-screen small {
    display: block;
    font-size: .55em;
    font-weight: 500;
    color: var(--cd-muted);
}

/* ── Header ── */
.cd-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--cd-line);
}

.cd-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
}

.cd-brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #ffffff;
}

.cd-order-label {
    margin-inline-start: auto;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--cd-panel);
    font-size: 1.1rem;
    font-weight: 700;
}

.cd-fullscreen {
    margin-inline-start: auto;
    border: 0;
    background: transparent;
    color: var(--cd-muted);
    font-size: 1.2rem;
}

.cd-order-label + .cd-fullscreen { margin-inline-start: 0; }

/* ── Welcome ── */
.cd-idle,
.cd-thanks {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
}

.cd-idle-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--cd-bg);
    font-size: 64px;
    overflow: hidden;
}

.cd-idle-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cd-idle h1,
.cd-thanks h1 {
    margin: 8px 0 0;
    font-size: 3rem;
    font-weight: 800;
}

.cd-idle-name {
    margin: 0;
    font-size: 1.6rem;
    color: var(--cd-accent);
}

.cd-qr {
    margin: 16px 0 0;
}

.cd-qr img {
    width: 200px;
    height: 200px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    image-rendering: pixelated;
}

.cd-qr figcaption {
    margin-top: 10px;
    font-size: 1.15rem;
}

/* ── Order ── */
.cd-order {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 24px;
}

@media (min-width: 900px) {
    .cd-order { grid-template-columns: 3fr 2fr; }
}

.cd-lines ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cd-lines li {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: baseline;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--cd-line);
    font-size: 1.45rem;
}

.cd-qty {
    font-weight: 800;
    color: var(--cd-accent);
}

.cd-name { font-weight: 600; }

.cd-amount {
    font-weight: 700;
    white-space: nowrap;
}

.cd-totals {
    align-self: start;
    padding: 18px 22px;
    border-radius: 18px;
    background: var(--cd-panel);
}

.cd-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 1.35rem;
}

.cd-row > span:last-child {
    font-weight: 700;
    white-space: nowrap;
}

.cd-discount > span:last-child { color: var(--cd-accent); }

.cd-total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--cd-line);
    font-size: 2.1rem;
    font-weight: 800;
}

.cd-total small { display: inline; }

.cd-remaining > span:last-child {
    color: #ffd27a;
    font-size: 1.6rem;
}

/* ── Thank you ── */
.cd-thanks > i {
    font-size: 96px;
    color: var(--cd-accent);
}

.cd-thanks p {
    margin: 0;
    font-size: 1.5rem;
    color: var(--cd-muted);
}

.cd-thanks strong { color: var(--cd-ink); }
