html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0a7d2c;
}

.btn-primary {
    color: #fff;
    background-color: #0a7d2c;
    border-color: #086626;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary:disabled {
    color: #fff;
    background-color: #086626;
    border-color: #064d1c;
}

.btn-outline-primary {
    color: #0a7d2c;
    border-color: #0a7d2c;
}

.btn-outline-primary:hover, .btn-outline-primary:active, .btn-outline-primary.active {
    color: #fff;
    background-color: #0a7d2c;
    border-color: #0a7d2c;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #28a745;
}

/* Required-field marker: add class="… required" to a field's label. */
.form-label.required::after,
label.required::after {
    content: " *";
    color: var(--bs-danger, #dc3545);
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGV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NjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #0a7d2c;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Scroll container so a table's header freezes within it (not under the page's top bar) */
.table-scroll {
    max-height: 70vh;
    overflow: auto;
}

.table-scroll thead th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 2;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Totes draw entry list: alternating row stripes (cursor/won styles override). */
.tote-list .tote-row:nth-child(odd) {
    background-color: #f3f4f6;
}

/* Totes draw (drawing state): the list fills the viewport below the header with the Select button
   pinned directly beneath it, so you never have to scroll the page to reach Select. */
.tote-draw-stage {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: calc(100vh - 12rem);
    height: calc(100dvh - 12rem);
}

.tote-draw-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.tote-draw-footer {
    flex: 0 0 auto;
    text-align: center;
}

/* ---- Today's Event banner (committee, top of Home) ---- */
.pmc-today {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0 1.25rem;
}

.pmc-today-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.15rem;
    width: 100%;
    max-width: 520px;
    padding: 0.85rem 1rem;
    border: 1px solid #0a7d2c;
    border-radius: 0.75rem;
    background: #eaf6ee;
    color: #0a4d1c;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pmc-today-card:hover {
    background: #def0e5;
}

.pmc-today-card .pmc-icon {
    width: 1.6rem;
    height: 1.6rem;
}

.pmc-today-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.pmc-today-sub {
    font-size: 0.85rem;
    color: #3a6a48;
}

/* ---- Ticket assign: mobile focus ----
   When picking a ticket on the narrow layout (tickets stack below the members), hide the other
   members so the ticket list is right under the selected member. No effect on wide screens. */
.pmc-tassign-member {
    scroll-margin-top: 4rem;   /* clears the sticky app-bar when scrolled to the top */
}

@media (max-width: 767.98px) {
    .pmc-tassign-members.focus .pmc-tassign-member:not(.selected) {
        display: none;
    }
}

/* ---- Floating "new" action ----
   Wide screens: the button flows right under the list, but sticks to the bottom-right while the
   page scrolls — so it's never far from a short list yet stays in reach for a long one. The card
   layout (≤820px) turns it into a round (+) fixed in the corner (see the responsive block below). */
.pmc-fab-wrap {
    position: sticky;
    bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    pointer-events: none;   /* only the button itself is clickable, not the sticky band */
}

.pmc-fab {
    pointer-events: auto;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.25);
}

.pmc-fab .pmc-fab-plus {
    display: none;
}

/* Keeps the last list item clear of the floating button on the card layout (no-op on wide screens). */
.pmc-fab-spacer {
    display: none;
}

/* ---- Responsive admin tables ----
   On wide screens these render as normal tables. On narrow screens each row
   collapses into a labelled card (each cell shows its column header via data-label). */
@media (max-width: 820px) {
    /* Let the card list flow with the page instead of a nested 70vh scroll. */
    .table-scroll {
        max-height: none;
        overflow: visible;
    }

    table.pmc-cards thead {
        display: none;
    }

    table.pmc-cards,
    table.pmc-cards tbody,
    table.pmc-cards tr,
    table.pmc-cards td {
        display: block;
        width: 100%;
    }

    table.pmc-cards tr {
        border: 1px solid #e0e3e0;
        border-radius: 0.6rem;
        padding: 0.6rem 0.85rem;
        margin-bottom: 0.85rem;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    /* Alternate the mobile cards too (desktop is striped via .table-striped). */
    table.pmc-cards tbody tr:nth-of-type(even) {
        background: #edf6ee;
    }

    /* Neutralise Bootstrap row striping (drawn via an inset box-shadow) and any column
       max-width so every cell fills the card uniformly — no stray grey stripe or white gap. */
    table.pmc-cards td,
    table.pmc-cards th {
        background-color: transparent !important;
        box-shadow: none !important;
        max-width: none !important;
    }

    table.pmc-cards td {
        border: none;
        padding: 0.3rem 0;
    }

    /* Column header shown above each value. */
    table.pmc-cards td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        color: #6c757d;
        font-weight: 600;
        margin-bottom: 0.1rem;
    }

    /* Card title (e.g. the person's name) — no label, larger. */
    table.pmc-cards td.pmc-cardtitle {
        font-size: 1.05rem;
        font-weight: 700;
        color: #212529;
        padding-bottom: 0.35rem;
    }

    table.pmc-cards td.pmc-cardtitle::before {
        display: none;
    }

    /* Full-width cell (actions / decision controls) — no label, separated. */
    table.pmc-cards td.pmc-cardfull {
        margin-top: 0.4rem;
        padding-top: 0.55rem;
        border-top: 1px solid #f0f0f0;
    }

    table.pmc-cards td.pmc-cardfull::before {
        display: none;
    }

    table.pmc-cards td.pmc-cardfull .btn {
        margin: 0.25rem 0.4rem 0 0;
    }

    /* Centre the lone action (e.g. the Events status button) within the card. */
    table.pmc-cards td.pmc-cardcenter {
        text-align: center;
    }

    table.pmc-cards td.pmc-cardcenter .btn {
        margin: 0.25rem 0.2rem 0;
    }

    /* Card layout: neutralise the sticky wrap and pin the button as a round (+) in the corner. */
    .pmc-fab-wrap {
        position: static;
        display: block;
        margin-top: 0;
        pointer-events: none;
    }

    .pmc-fab {
        position: fixed;
        right: 1rem;
        bottom: 1rem;
        z-index: 1020;
        width: 3.25rem;
        height: 3.25rem;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.7rem;
        line-height: 1;
    }

    .pmc-fab .pmc-fab-text {
        display: none;
    }

    .pmc-fab .pmc-fab-plus {
        display: inline;
    }

    .pmc-fab-spacer {
        display: block;
        height: 4.5rem;
    }
}

/* ---- Scrollable pill tabs ----
   Add `pmc-tabscroll` to a Bootstrap `nav nav-tabs`. On wide screens it stays a normal
   tab strip; on narrow screens it becomes a single swipe-scrollable row of pills. */
@media (max-width: 820px) {
    .pmc-tabscroll {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 0;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
    }

    .pmc-tabscroll::-webkit-scrollbar {
        height: 0;
    }

    .pmc-tabscroll .nav-item {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .pmc-tabscroll .nav-link {
        white-space: nowrap;
        border: 1px solid #e0e3e0;
        border-radius: 999px;
        padding: 0.35rem 0.85rem;
    }

    .pmc-tabscroll .nav-link.active {
        background: #0a7d2c;
        color: #fff;
        border-color: #0a7d2c;
    }
}

/* ---- Bespoke card list ----
   A reusable card primitive for redesigns that aren't a plain table→card collapse.
   Matches the tile / pmc-cards look. */
.pmc-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 720px;
}

.pmc-card {
    border: 1px solid #e0e3e0;
    border-radius: 0.6rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0.9rem;
}

/* ---- Zebra striping (light green) for every list ----
   Card lists alternate; Bootstrap striped tables are recoloured to match; the responsive
   pmc-cards mobile cards alternate too (handled in the 820px media block below). */
.pmc-list > .pmc-card:nth-of-type(even) {
    background: #edf6ee;
}

.table-striped {
    --bs-table-striped-bg: #edf6ee;
}

/* Responsive helpers: show a dense table on wide screens, a 2-line card list on narrow ones. */
@media (max-width: 820px) {
    .pmc-wide-only { display: none !important; }
}
@media (min-width: 821px) {
    .pmc-narrow-only { display: none !important; }
}

.pmc-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
}

.pmc-card-title {
    font-weight: 700;
    color: #212529;
}

.pmc-muted {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Footer row for card actions — separated from the body, buttons wrap on narrow screens. */
.pmc-card-actions {
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Three-slot decision row: left action · centred toggle · right action — same on all widths. */
.pmc-card-actions.pmc-decide {
    flex-wrap: nowrap;
    align-items: center;
}

.pmc-decide-c {
    flex: 1;
    text-align: center;
}

/* Inline icon default size — sits on the text baseline. (Tile icons override this
   with a more specific selector, so the home tiles are unaffected.) */
.pmc-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

/* ---- Pickup-point stops (My Dashboard → Pickups) ---- */
.pmc-stops {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pmc-stop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid #eef0ee;
    border-radius: 0.5rem;
}

.pmc-stop-sel {
    border-color: #0a7d2c;
    background: #f3faf5;
}

.pmc-stop-name {
    font-weight: 600;
    color: #212529;
}

.pmc-stop-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.pmc-stop-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.pmc-stop-action {
    flex: 0 0 auto;
}
