/* Cashier shell styles. Visual identity comes from the shared design-system foundation
   (pos-foundation.css: tokens, buttons, forms, cards, badges); this file only lays out the
   minimal Cashier shell. */

h1:focus { outline: none; }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.cashier-shell { display: flex; flex-direction: column; min-height: 100vh; background: var(--pos-bg); }

.cashier-shell__header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 3.5rem;
    padding: 0 1.5rem;
    background: var(--pos-surface);
    border-bottom: 1px solid var(--pos-border);
}

.cashier-shell__brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--pos-text); text-decoration: none; }
.cashier-shell__brand-mark { width: 1.4rem; height: 1.4rem; border-radius: 6px; object-fit: contain; }
.cashier-shell__brand-name { font-size: 1.05rem; letter-spacing: -0.01em; }
.cashier-shell__brand-app { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pos-text-muted); }

.cashier-shell__nav { display: flex; gap: 0.25rem; flex: 1; }
.cashier-shell__link { padding: 0.35rem 0.7rem; border-radius: var(--pos-radius-sm); color: var(--pos-text-muted); text-decoration: none; font-weight: 500; }
.cashier-shell__link:hover { background: var(--pos-surface-alt); color: var(--pos-text); }
.cashier-shell__link.active { background: var(--pos-accent-soft); color: var(--pos-accent-text); }

.cashier-shell__meta { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.cashier-shell__branch { font-size: 0.85rem; color: var(--pos-text-muted); }
.cashier-shell__user { font-size: 0.9rem; font-weight: 500; }

.cashier-shell__content { flex: 1; min-width: 0; padding: 1.5rem; }

.cashier-page { max-width: 60rem; margin: 0 auto; }
/* The register uses the full viewport width; shared register CSS decides the columns and breakpoints. */
.cashier-sell { max-width: none; }
.cashier-page__title { font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; }

.cashier-bare { min-height: 100vh; background: var(--pos-bg); }
.cashier-bare__content { padding: 1rem; }

.cashier-login-logo { display: block; width: 100%; max-width: 15rem; height: auto; margin-inline: auto; object-fit: contain; }

/* Printing a receipt from the Cashier host: only the receipt itself goes to paper — no header, navigation,
   branch banner or buttons. (The receipt's own width/typography rules are the shared receipt.css.) */
@media print {
    .cashier-shell__header,
    [data-branch-access-lost],
    #blazor-error-ui { display: none !important; }

    .cashier-shell,
    .cashier-shell__content {
        display: block !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
}

/* Price Check: the price is the point of the page. */
.pricecheck__price { font-size: 3.5rem; font-weight: 700; line-height: 1.1; }
.pricecheck__img { width: 8rem; height: 8rem; object-fit: contain; border-radius: .5rem; }

/* ==========================================================================
   Cashier shell around the Sell page. The register itself is laid out by the page's own scoped stylesheet
   (Components/Pages/Selling.razor.css), so the shared register CSS used by Back Office is untouched.
   ========================================================================== */
.cashier-shell__link.active { font-weight: 700; box-shadow: inset 0 -2px 0 var(--pos-accent); }

.cashier-shell__content:has(.cashier-sell) { padding: 0.5rem; }

/* ==========================================================================
   Cashier design alignment (uses the shared design tokens only).
   ========================================================================== */
.cashier-page__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.9rem; }

/* Dense, consistent cards on Cashier screens (the shared card padding is sized for Back Office forms). */
.cashier-page .card { margin-bottom: 0.9rem; border-radius: var(--pos-radius); }
.cashier-page .card-body { padding: 1rem 1.25rem; }
.cashier-ready { border-color: var(--pos-success-border, var(--pos-border)); }
.cashier-ready__title { font-size: 1rem; font-weight: 700; margin: 0 0 0.6rem 0; }

.cashier-section-title {
    margin: 1.25rem 0 0.6rem 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--pos-text-faint);
}

/* Quick-access tiles on Home: operational shortcuts, compact and touch-friendly. */
.cashier-tiles { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.cashier-tile {
    display: flex; flex-direction: column; gap: 0.15rem; padding: 0.9rem 1rem; min-height: 4.5rem;
    background: var(--pos-surface); border: 1px solid var(--pos-border); border-radius: var(--pos-radius);
    color: var(--pos-text); text-decoration: none; box-shadow: var(--pos-shadow-sm);
}
.cashier-tile span { font-size: 0.85rem; color: var(--pos-text-muted); }
.cashier-tile:hover { border-color: var(--pos-accent); }
.cashier-tile--primary { background: var(--pos-accent-soft); border-color: var(--pos-accent-border); }

/* Sign-in and branch selection share one centred card. */
.cashier-auth { max-width: 26rem; margin: 10vh auto 0 auto; padding: 0 1rem; }
.cashier-auth .card { border-radius: var(--pos-radius); box-shadow: var(--pos-shadow); }
.cashier-auth .card-body { padding: 1.5rem; }

/* ==========================================================================
   Compact Cashier shell header and navigation (Selling.razor.css relies on this header height).
   ========================================================================== */
.cashier-shell__header { height: 3.25rem; }
.cashier-shell__link { border-radius: var(--pos-radius-pill); padding: 0.4rem 1rem; font-weight: 600; }
.cashier-shell__link.active { background: var(--pos-accent-soft); color: var(--pos-accent-text); box-shadow: none; }
