/* WD Bar till — "operate dark", sized for iPad fingers (min 56px touch targets). */

.wdb-till {
    background: #14161a;
    color: #f2f2f2;
    border-radius: 12px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.wdb-till-gate { text-align: center; padding: 60px 20px; }

.wdb-till-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2e35;
}
.wdb-till-brand { font-weight: 800; letter-spacing: 1px; color: #EC6826; font-size: 18px; }
.wdb-till-user { margin-left: auto; color: #9aa0a8; font-size: 13px; }

.wdb-till-tabs { display: flex; gap: 6px; }
.wdb-till-tab {
    background: #1e2127;
    color: #cfd3d9;
    border: 0;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.wdb-till-tab.is-active { background: #EC6826; color: #fff; }

.wdb-till-panel { display: none; flex: 1; }
.wdb-till-panel.is-active { display: block; }

/* Sell layout: grid left, basket right */
.wdb-till-sell { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.wdb-till-catalogue { flex: 1.6; }
.wdb-till-basket {
    flex: 1;
    background: #1b1e24;
    border-radius: 12px;
    padding: 14px;
    position: sticky;
    top: 12px;
}

.wdb-till-cats { display: flex; gap: 6px; margin-bottom: 10px; }
.wdb-till-cat {
    background: #1e2127;
    color: #cfd3d9;
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 15px;
    cursor: pointer;
}
.wdb-till-cat.is-active { background: #3a3f48; color: #fff; }

.wdb-till-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.wdb-till-tile {
    position: relative;
    background: #232730;
    border: 0;
    border-radius: 12px;
    padding: 10px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wdb-till-tile:active { background: #2f3540; }
.wdb-till-tile img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}
.wdb-till-tile-name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.wdb-till-tile-abv { font-style: normal; color: #9aa0a8; font-size: 12px; }
.wdb-till-tile-price { color: #EC6826; font-weight: 700; font-size: 16px; }
.wdb-till-tile-stock {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #2f3540;
    color: #cfd3d9;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    padding: 2px 8px;
}
.wdb-till-tile-stock.is-low { background: #6b5200; color: #ffd866; }
.wdb-till-tile-stock.is-out { background: #71211f; color: #ff9f9c; }

/* Basket */
.wdb-till-basket h3 { margin: 0 0 10px; color: #fff; }
.wdb-till-empty { color: #8a8f97; text-align: center; padding: 14px 0; }
.wdb-till-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2e35;
}
.wdb-till-line-name { flex: 1; min-width: 0; font-size: 15px; }
.wdb-till-line-controls { display: flex; align-items: center; gap: 6px; }
.wdb-till-line-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #2f3540;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.wdb-till-line-btn:active { background: #EC6826; }
.wdb-till-line-qty { min-width: 22px; text-align: center; font-weight: 700; }
.wdb-till-line-total { min-width: 64px; text-align: right; font-weight: 600; }

.wdb-till-agecheck {
    margin-top: 10px;
    background: #4a3200;
    color: #ffd866;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.wdb-till-totalrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 18px;
}
.wdb-till-totalrow strong { font-size: 28px; color: #fff; }

.wdb-till-basket-actions { display: flex; gap: 10px; margin-top: 12px; }
.wdb-till-basket-actions .wdb-btn { flex: 1; padding: 16px 10px; font-size: 18px; }

.wdb-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.wdb-btn-primary { background: #EC6826; color: #fff; }
.wdb-btn-primary:disabled { background: #3a3f48; color: #8a8f97; cursor: default; }
.wdb-btn-ghost { background: #2f3540; color: #e8eaed; }

/* Lists (pre-orders, history) */
.wdb-till-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 14px 0;
}
.wdb-till-toolbar input {
    flex: 1;
    max-width: 420px;
    background: #1e2127;
    border: 1px solid #2f3540;
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    font-size: 16px;
}
.wdb-till-takings { color: #9aa0a8; font-weight: 600; }

.wdb-till-list { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.wdb-till-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #1e2127;
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    color: #f2f2f2;
    cursor: pointer;
}
.wdb-till-row:active { background: #262b33; }
.wdb-till-row.is-collected { opacity: .55; }
.wdb-till-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wdb-till-row-main strong { font-size: 16px; }
.wdb-till-row-sub { color: #9aa0a8; font-size: 13px; }
.wdb-till-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wdb-till-row-total { font-weight: 700; font-size: 16px; }
.wdb-till-row-badge { font-size: 12px; color: #9aa0a8; }

/* Modals */
.wdb-till-modal[hidden] { display: none !important; }
.wdb-till-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}
.wdb-till-modal-card {
    background: #1b1e24;
    color: #f2f2f2;
    border-radius: 14px;
    padding: 22px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.wdb-till-modal-card h3 { margin: 0 0 10px; color: #fff; }
.wdb-till-modal-card label { display: block; margin: 10px 0 6px; color: #cfd3d9; }
.wdb-till-modal-card input {
    width: 100%;
    background: #14161a;
    border: 1px solid #2f3540;
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    font-size: 16px;
}
.wdb-till-bigamount {
    font-size: 52px;
    font-weight: 800;
    color: #EC6826;
    text-align: center;
    margin: 10px 0;
}
.wdb-till-steps { color: #cfd3d9; padding-left: 20px; }
.wdb-till-steps li { margin-bottom: 6px; }
.wdb-till-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.wdb-till-modal-actions .wdb-btn { flex: 1; padding: 14px 10px; }

.wdb-till-detail-items { width: 100%; border-collapse: collapse; margin: 10px 0; }
.wdb-till-detail-items td { padding: 6px 4px; border-bottom: 1px solid #2a2e35; }
.wdb-till-detail-amount { text-align: right; white-space: nowrap; }
.wdb-till-detail-total td { font-weight: 700; border-bottom: 0; }

/* Toast */
.wdb-till-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a7f37;
    color: #fff;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 600;
    z-index: 100000;
    box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.wdb-till-toast.is-error { background: #b71c1c; }

/* Stack the sell layout on narrow screens (phone fallback) */
@media (max-width: 720px) {
    .wdb-till-sell { flex-direction: column; }
    .wdb-till-basket { position: static; width: 100%; box-sizing: border-box; }
}
