/*
 * board.css -- the fullscreen kitchen layout, and nothing else.
 *
 * venues.css already styles .order-card, .order-btn, .pill and .empty-note, and
 * board.html loads it for exactly that reason: an order card is the same object
 * on both boards and a second set of card styles would drift the moment either
 * changed. What lives here is only what a propped-up phone on a counter needs
 * and a dashboard tab does not.
 *
 * SIZED FOR ARM'S LENGTH. Every measurement below is larger than its dashboard
 * equivalent on purpose -- this is read by somebody standing up, carrying
 * plates, in a room that is louder and worse lit than an office.
 */

.board-app {
    /* The board fills the device. safe-area-inset keeps the action bar clear of
       the iPhone home indicator, which otherwise sits on top of it. */
    min-height: 100dvh;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    margin: 0;
}

.board-centre {
    max-width: 26rem;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.board-centre h1 { margin: 0 0 0.25rem; }
.board-centre label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    opacity: 0.7;
}

.board-centre input {
    /*
     * 16px MINIMUM. Below it, iOS Safari zooms the page on focus and never
     * zooms back -- the board ends up permanently scrolled sideways. Already
     * learned once on venues.css; it applies with more force here, because this
     * is a phone-first page rather than a phone-tolerant one.
     */
    font-size: 16px;
    padding: 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.15));
    background: var(--surface, #fff);
    color: inherit;
    width: 100%;
}

.board-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    /* Opaque, not translucent: order cards scrolling under a blurred bar is
       pretty on a laptop and unreadable in a bright kitchen. */
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.12));
}

.board-bar h1 {
    margin: 0;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-bar__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.btn-ghost {
    /* 44px minimum touch target -- the figure venues.css already uses. */
    min-height: 44px;
    padding: 0 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.15));
    background: transparent;
    color: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.board-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin: 1.5rem 1rem 0.6rem;
}

.order-grid {
    display: grid;
    /*
     * One column on a phone, more as the screen allows. auto-fill rather than
     * auto-fit: with auto-fit a single waiting order stretches to the full
     * width of a counter tablet, which looks like a layout fault.
     */
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 0.75rem;
    padding: 0 1rem;
}

.call-strip {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
}

.call-row, .session-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
    background: var(--surface, #fff);
}

.call-row { border-left: 4px solid var(--accent, #8c5a2b); }

.call-row__table, .session-row__table { font-weight: 800; }
.call-row__kind { flex: 1; opacity: 0.75; font-size: 0.85rem; }
.session-row__total { flex: 1; text-align: right; font-variant-numeric: tabular-nums; }

.session-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem 2rem;
}

.board-error {
    margin: 0.75rem 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: rgba(180, 40, 40, 0.12);
    border: 1px solid rgba(180, 40, 40, 0.35);
    font-size: 0.85rem;
}

.small { font-size: 0.78rem; }

@media (min-width: 700px) {
    .board-bar { padding: 1rem 1.5rem; }
    .order-grid, .call-strip, .session-list { padding-left: 1.5rem; padding-right: 1.5rem; }
    .board-heading { margin-left: 1.5rem; margin-right: 1.5rem; }
}
