/* Touch-friendly controls (~2× default control height on tablets) */
.pos-ui .btn {
    min-height: 4.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pos-ui .btn-sm {
    min-height: 3.75rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

/* Cart − / + : extra width (~2×) on top of touch-tall .btn-sm */
.pos-ui .pos-cart-btn.btn-sm {
    min-width: 5.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.pos-ui .btn-lg {
    min-height: 5.5rem;
    font-size: 1.25rem;
}

.pos-ui .navbar .btn,
.pos-ui .navbar .btn-sm {
    min-height: 3.25rem;
}

/* Product tiles — background by category */
.pos-tile {
    min-height: 7.5rem;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.pos-ui .pos-tile-name {
    font-size: 1.35rem;
    line-height: 1.25;
}

button.pos-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.35rem 0.75rem rgba(0, 0, 0, 0.12);
}

.pos-tile-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.pos-tile-pizza {
    background: linear-gradient(135deg, #ffe4e1 0%, #ffd4ce 100%);
}

.pos-tile-antipasti {
    background: linear-gradient(135deg, #e8f5e9 0%, #d7efd9 100%);
}

.pos-tile-drinks {
    background: linear-gradient(135deg, #e3f2fd 0%, #d4eafc 100%);
}

.pos-tile-other {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.pos-cart {
    max-height: calc(100vh - 5rem);
    overflow: auto;
}

a.text-decoration-none:hover .pos-station-card {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
}

.pos-station-card {
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    min-height: 8.5rem;
}

/* Quantity readout between +/− aligned to tall buttons */
.pos-ui .pos-qty-pill {
    min-height: 3.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/*
 * Kitchen station 2/3 — line tiles (tablet, read from distance).
 * Scoped with #pos-live-orders (poll fragment root) so rules match the live DOM after AJAX swaps —
 * do not require .pos-ui on an ancestor. Sizes use px inside clamp() so root rem / Bootstrap cannot shrink them.
 */
#pos-live-orders .kitchen-line-tile {
    --kitchen-line-name-fs: clamp(16px, 1.85vw + 1.35vh, 54px);
    min-height: clamp(94px, 16vmin, 240px);
}

#pos-live-orders .kitchen-line-tile .card-body {
    position: relative;
    padding: clamp(8px, 1vmin, 12px);
}

#pos-live-orders .kitchen-line-tile .kitchen-product-name {
    font-size: var(--kitchen-line-name-fs) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
    hyphens: auto;
    font-weight: 700 !important;
}

#pos-live-orders .kitchen-line-tile .kitchen-line-qty {
    font-size: var(--kitchen-line-name-fs) !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.04em;
}

#pos-live-orders .kitchen-line-tile .kitchen-cooking-btn.btn,
#pos-live-orders .kitchen-line-tile .kitchen-cooking-btn-visual.btn {
    font-size: clamp(12px, 0.93vmin + 0.4vw, 14px) !important;
    min-height: clamp(24px, 4.7vmin, 40px) !important;
    font-weight: 600 !important;
}

/* Full-tile submit target; visual label is .kitchen-cooking-btn-visual (pointer-events: none). */
#pos-live-orders .kitchen-line-tile .kitchen-cooking-hitarea {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
    opacity: 0;
}

#pos-live-orders .kitchen-line-tile .kitchen-cooking-btn-visual {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

#pos-live-orders .kitchen-line-tile:has(.kitchen-cooking-hitarea:focus-visible) {
    outline: 3px solid var(--bs-warning);
    outline-offset: 2px;
}

#pos-live-orders .kitchen-line-text-done {
    opacity: 0.72;
}

/*
 * Handout station 4 — line tiles (poll root #pos-live-orders).
 * ~1.5× over prior Bootstrap fs-5 / body for coordinator readability.
 */
#pos-live-orders .handout-line-tile {
    --handout-line-tile-fs: clamp(1.2rem, 2.2vmin + 1.8vw, 1.95rem);
    min-height: clamp(9rem, 20vmin, 12rem);
}

#pos-live-orders .handout-line-tile .handout-product-name {
    font-size: var(--handout-line-tile-fs) !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
}

#pos-live-orders .handout-line-tile .handout-line-qty {
    font-size: var(--handout-line-tile-fs) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}
