/* Beenhouwer Decupere brand kit (02 SCREEN). Primary red fails AA on beige below 24px, so small
   accents and actions use dark red. Bureau Grot is Decupere's licensed face, self-hosted. */
@font-face {
    font-family: 'Bureau Grot Condensed';
    src: url('fonts/bureau-grot-condensed-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/roboto-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/roboto-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/roboto-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('fonts/roboto-mono.woff2') format('woff2');
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --cream: #f5f0e5;
    --cream-deep: #ece5d2;
    --white: #ffffff;
    --ink: #202022;
    --ink-soft: #625b50;
    --orange: #e74609;
    --burgundy: #7d2121;
    --burgundy-deep: #5c1818;
    --sage: #4e6b4a;
    --mustard: #8a5f12;
    --line: #e2d9c3;
    --mono: 'Roboto Mono', ui-monospace, 'Cascadia Mono', monospace;
    --display: 'Bureau Grot Condensed', 'Arial Narrow', sans-serif;
    --body: 'Roboto', system-ui, sans-serif;

    /* Aliases consumed by component-scoped CSS (scoped :root does not work). */
    --pc-paper: var(--white);
    --pc-blush: var(--cream-deep);
    --pc-ink: var(--ink);
    --pc-soft: var(--ink-soft);
    --pc-red: var(--burgundy);
    --pc-red-deep: var(--burgundy-deep);
    --pc-line: var(--line);
    --pc-sage: var(--sage);
    --pc-mustard: var(--mustard);
    --pc-display: var(--display);
    --pc-display-weight: 500;
    --pc-display-case: uppercase;
    --pc-display-tracking: 0.01em;
    --pc-name: var(--body);
    --pc-name-weight: 500;
    --pc-heading: var(--orange);
    --pc-radius: 0;
    --pc-action: var(--burgundy);
    --pc-action-hover: var(--burgundy-deep);
    --pc-radius-button: 0;
}

html, body {
    background-color: var(--cream);
    font-family: var(--body);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* iOS Safari zooms the page into any focused field set below 16px. */
@media (pointer: coarse) {
    input, select, textarea {
        font-size: max(16px, 1em) !important;
    }
}

::selection {
    background: var(--burgundy);
    color: var(--white);
}

/* Monospaced operator data — PLU, codes, prices. */
.mono {
    font-family: var(--mono);
    font-feature-settings: "tnum" 1;
}

/* Branded boot splash */
#app {
    color: var(--ink);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ── Fatal-error overlay ───────────────────────────────────────────────────
   Blazor's framework-level handler for errors the in-app ErrorBoundary can't
   catch (runtime/dispatcher failures). Full-page paper takeover, same card
   language as the in-app ErrorPanel: burgundy spine, mono eyebrow, display
   title, dashed STORING stamp. Markup lives in index.html; the report text is
   filled by saFatal in site.js. Fonts fall back to system serifs/monos in case
   the crash happens before the webfonts arrive. */
#blazor-error-ui {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    overflow: auto;
    background-color: var(--cream, #fefdf9);
}

.fatal {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    font-family: var(--body);
}

.fatal__card {
    display: flex;
    width: 100%;
    max-width: 640px;
    background: var(--white, #fbf7ef);
    border: 1px solid var(--line, #ddd2c0);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 10px 34px rgba(28, 25, 22, 0.12);
}

/* The single loud note: a burgundy spine down the left edge. */
.fatal__rule {
    flex: 0 0 5px;
    background: var(--burgundy, #b0231d);
}

.fatal__body {
    padding: 1.9rem 2rem 2rem;
    min-width: 0;
}

.fatal__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
}

.fatal__eyebrow {
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--burgundy, #b0231d);
}

.fatal__stamp {
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    color: var(--burgundy, #b0231d);
    border: 1px dashed var(--burgundy, #b0231d);
    padding: 0.24rem 0.55rem;
    border-radius: 2px;
    transform: rotate(2deg);
}

.fatal__title {
    margin: 0.55rem 0 0;
    font-family: var(--display, Georgia, serif);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 1.9rem;
    line-height: 1.05;
    letter-spacing: -0.018em;
    color: var(--ink, #1c1916);
}

.fatal__lead {
    margin: 0.7rem 0 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink-soft, #6e6256);
}

.fatal__detail {
    margin-bottom: 1.4rem;
    border-top: 1px solid var(--line, #ddd2c0);
    padding-top: 0.9rem;
}

.fatal__detail summary {
    cursor: pointer;
    display: inline-block;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft, #6e6256);
    user-select: none;
}

.fatal__detail summary:hover {
    color: var(--ink, #1c1916);
}

.fatal__detail pre {
    margin: 0.7rem 0 0;
    padding: 0.8rem 0.9rem;
    max-height: 240px;
    overflow: auto;
    background: var(--cream, #f2ece0);
    border: 1px solid var(--line, #ddd2c0);
    border-radius: 2px;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.72rem;
    line-height: 1.5;
    color: #5a4f43;
    white-space: pre-wrap;
    word-break: break-word;
}

.fatal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.fatal__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    border-radius: 2px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.fatal__btn--primary {
    background: var(--burgundy, #b0231d);
    color: var(--white, #fbf7ef);
    border: 1px solid var(--burgundy-deep, #8a1814);
}

.fatal__btn--primary:hover {
    background: var(--burgundy-deep, #8a1814);
    color: var(--white, #fbf7ef);
}

.fatal__btn--ghost {
    background: transparent;
    color: var(--ink-soft, #6e6256);
    border: 1px solid var(--line, #ddd2c0);
    font-family: inherit;
}

.fatal__btn--ghost:hover {
    color: var(--ink, #1c1916);
    border-color: var(--ink-soft, #6e6256);
}

@media (max-width: 600px) {
    .fatal { padding: 1rem; }
    .fatal__body { padding: 1.4rem 1.3rem 1.6rem; }
    .fatal__title { font-size: 1.55rem; }
}

/* PLU-autocomplete dropdown (Replenishment config): the popover anchors to the
   narrow PLU cell, so widen it and keep each suggestion on one line. */
.rc-ac-pop.mud-popover {
    min-width: 24rem;
}

.rc-ac-pop .mud-list-item {
    white-space: nowrap;
}

.rc-ac-pop .rc-ac__plu {
    display: inline-block;
    min-width: 3.5rem;
    color: var(--butcher, #b0231d);
}

.rc-ac-pop .rc-ac__desc {
    margin-left: 0.4rem;
}
