@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ==========================================================================
   Tokens
   Christmas red and green on a warm pale ground. The two greens are kept
   apart on purpose: the lighter one is for menu buttons, the darker one for
   confirming an action. Change a colour here and it changes everywhere.
   ========================================================================== */

:root {
    --meat-red: #c62828;
    --meat-red-ink: #a01f1f;
    --meat-green: #41741a; /* menu / secondary */
    --meat-green-deep: #314f1a; /* confirm / success */

    --surface: #faf4e0; /* page */
    --surface-raised: #fffdf7; /* cards, tables, panels */
    --surface-sunken: #ece5cf; /* disabled / unavailable */

    --ink: #333;
    --ink-muted: #6b6455;
    --line: #d9cfb2;

    --radius-pill: 50px;
    --radius-input: 10px;
    --radius-card: 14px;

    /* Minimum comfortable target for a busy pair of hands on a touchscreen. */
    --touch: 3rem;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--surface);
    color: var(--ink);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    transition: none;
}

.btn-primary, .btn-primary:hover {
    color: #fff;
    background-color: var(--meat-red) !important;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-secondary, .btn-secondary:hover {
    color: #fff;
    background-color: var(--meat-green) !important;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-outline-primary, .btn-outline-primary:hover {
    color: var(--meat-red) !important;
    background-color: inherit;
    border-color: var(--meat-red) !important;
    border-width: 2px;
    border-radius: var(--radius-pill);
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

/* Root-menu "+ AMEND ORDER +": same size as the menu buttons, outlined so it reads as a
   different kind of action from the products above it. */
.btn-amend {
    color: var(--meat-green) !important;
    background-color: transparent;
    border: 2px solid var(--meat-green) !important;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-amend:hover, .btn-amend:active {
    color: #fff !important;
    background-color: var(--meat-green) !important;
}

.btn-group > .btn-ouline-primary {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.btn-check:checked + .btn {
    background-color: var(--meat-red) !important;
    border-color: var(--meat-red) !important;
    color: #fff !important;
}

.btn-success {
    color: #fff;
    background-color: var(--meat-green-deep);
    border-color: var(--meat-green-deep);
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-install {
    color: #fff;
    background-color: var(--meat-red);
    border-color: #fff;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus {
    outline: none;
    box-shadow: none;
}

.btn:active,
.btn.active {
    background-color: inherit;
    border-color: inherit;
    box-shadow: none;
}

/* ==========================================================================
   Forms
   Sized for a touchscreen being used quickly, not a desktop being used
   carefully: taller fields, larger text, borders heavy enough to find at a
   glance across a counter.
   ========================================================================== */

.form-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    min-height: var(--touch);
    font-size: 1.15rem;
    padding: 0.6rem 0.9rem;
    color: var(--ink);
    background-color: #fff;
    border: 2px solid var(--line);
    border-radius: var(--radius-input);
}

    .form-control:focus, .form-select:focus {
        border-color: var(--meat-red);
        box-shadow: 0 0 0 0.2rem rgba(198, 40, 40, 0.18);
    }

    .form-control::placeholder {
        color: #a49c88;
    }

    /* Unavailable, and clearly so — used for sold-out stock counts, which
       staff must be able to read as "you cannot put this in an order". */
    .form-control:disabled, .form-control[readonly] {
        background-color: var(--surface-sunken);
        border-style: dashed;
        border-color: var(--line);
        color: var(--ink-muted);
        font-weight: 700;
    }

.validation-message, .invalid-feedback {
    color: var(--meat-red);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.35rem;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: var(--meat-green);
}

.invalid {
    outline: none;
    border-color: var(--meat-red) !important;
}

/* Collection date picker — a row on a tablet, a stack on a phone, rather
   than three squashed buttons fighting for the same line. */
.date-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

    .date-choices .btn {
        width: 100%;
        padding: 0.75rem 0.5rem;
        font-size: 1.05rem;
    }

@media (min-width: 540px) {
    .date-choices {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Quantity stepper — the most-tapped control in the ordering flow, so it
   gets full-size circular targets rather than default Bootstrap chrome. */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-qty {
    flex: 0 0 auto;
    width: var(--touch);
    height: var(--touch);
    border-radius: 50%;
    border: 2px solid var(--meat-green);
    background-color: #fff;
    color: var(--meat-green);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .btn-qty:active {
        background-color: var(--meat-green);
        color: #fff;
    }

.qty-value {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
}

.qty-stepper-sm {
    gap: 0.4rem;
}

    .qty-stepper-sm .btn-qty {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

.qty-count {
    min-width: 2rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Search bar buttons — these were non-clickable spans; now real buttons,
   using the same green-to-act / red-outline-to-step-back pairing the rest of
   the app uses, at a scale that matches the field they sit against. */
.btn-search, .btn-search-clear {
    min-height: var(--touch);
    padding: 0 1.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-width: 2px;
    border-style: solid;
}

.btn-search {
    background-color: var(--meat-green-deep);
    border-color: var(--meat-green-deep);
    color: #fff;
}

    .btn-search:hover, .btn-search:focus {
        background-color: var(--meat-green);
        border-color: var(--meat-green);
        color: #fff;
    }

.btn-search-clear {
    background-color: transparent;
    border-color: var(--meat-red);
    color: var(--meat-red);
}

    .btn-search-clear:hover, .btn-search-clear:focus {
        background-color: var(--meat-red);
        color: #fff;
    }

/* Bootstrap squares off the ends of an input group; round them back to match
   the inputs everywhere else. */
.input-group > :first-child {
    border-top-left-radius: var(--radius-input) !important;
    border-bottom-left-radius: var(--radius-input) !important;
}

.input-group > :last-child {
    border-top-right-radius: var(--radius-input) !important;
    border-bottom-right-radius: var(--radius-input) !important;
}

/* Collect — red, because the palette is red and green and green already means
   "collected" on the pill this turns into. The word carries the meaning; no
   icon, since a tick here would read as "already done". */
.btn-collect {
    background-color: var(--meat-red);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    white-space: nowrap;
}

    .btn-collect:hover, .btn-collect:focus {
        background-color: var(--meat-red-ink);
        color: #fff;
    }

/* ==========================================================================
   Cards and panels
   ========================================================================== */

.card {
    border: none;
    border-radius: var(--radius-card);
    background-color: var(--surface-raised);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: var(--meat-red);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
    padding: 0.85rem 1.1rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--line);
    padding: 1rem 1.1rem;
}

.card-body h5 {
    font-weight: 700;
    margin-bottom: 1.1rem;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    background-color: var(--surface-raised);
    margin-bottom: 0;
}

    .table thead th {
        background-color: var(--meat-green-deep);
        color: #fff;
        font-size: 0.9rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border: none;
        padding: 0.75rem;
        white-space: nowrap;
    }

    .table tbody td {
        padding: 0.7rem 0.75rem;
        border-color: var(--line);
    }

.table-responsive {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
}

/* Orders are grouped with rowspan, which left one order running straight
   into the next. This rules off the start of each order. */
.table-orders tbody tr.order-start > td {
    border-top: 3px solid var(--meat-red);
}

.table-orders tbody tr:first-child > td {
    border-top: none;
}

.nav-tabs .nav-link {
    color: var(--ink-muted);
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    padding: 0.75rem 1.25rem;
}

    .nav-tabs .nav-link.active {
        color: var(--meat-red);
        background-color: transparent;
        border-bottom: 3px solid var(--meat-red);
    }

.badge.bg-success {
    background-color: var(--meat-green-deep) !important;
    font-size: 0.9rem;
    padding: 0.5rem 0.65rem;
}

.content {
    padding-top: 1.1rem;
}

/* ==========================================================================
   Framework plumbing
   ========================================================================== */

#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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wN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gMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ==========================================================================
   Amend order
   ========================================================================== */

.amend-btn { min-height: var(--touch); min-width: 6.5rem; }

.amend-banner {
    position: sticky; top: 0; z-index: 10;
    background: var(--surface-sunken);
    border-left: 6px solid var(--meat-red);
    border-radius: var(--radius-card);
    padding: 0.75rem 1rem; margin-bottom: 1rem;
}

.btn-qty:disabled {
    border-color: var(--line);
    color: var(--ink-muted);
    background-color: var(--surface-sunken);
}
