/* Thai Street POS — tablet-first */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

html, body.pos-root {
    height: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.pos-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #131313;
}

.pos-topbar {
    background: rgba(19, 19, 19, 0.95);
    border-bottom: 1px solid #524535;
    backdrop-filter: blur(8px);
    z-index: 40;
}

.pos-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #d6c3af;
    border: 1px solid transparent;
    border-radius: 4px;
    white-space: nowrap;
}

.pos-tab-active {
    color: #ffb957;
    border-color: #ffb957;
    background: rgba(255, 185, 87, 0.1);
}

.pos-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

@media (min-width: 900px) {
    .pos-layout {
        flex-direction: row;
    }
    .pos-floor-wrap {
        flex: 1.4;
        min-width: 0;
    }
    .pos-panel-wrap {
        width: 360px;
        max-width: 38vw;
        border-left: 1px solid #524535;
    }
}

.pos-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #1f1f1f;
    border-bottom: 1px dashed rgba(159, 142, 123, 0.35);
}

.pos-field {
    background: #2a2a2a;
    border: 1px solid #524535;
    color: #e2e2e2;
    padding: 10px 12px;
    min-height: 44px;
    font-size: 16px;
    border-radius: 4px;
}

.pos-field:focus {
    outline: none;
    border-color: #ffb957;
}

.pos-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #d6c3af;
}

.pos-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pos-legend i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.pos-floor-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px;
}

.pos-floor {
    position: relative;
    flex: 1;
    min-height: 280px;
    background:
        linear-gradient(180deg, rgba(31, 31, 31, 0.9), rgba(19, 19, 19, 0.95)),
        repeating-linear-gradient(90deg, rgba(82, 69, 53, 0.15) 0, rgba(82, 69, 53, 0.15) 1px, transparent 1px, transparent 24px),
        repeating-linear-gradient(0deg, rgba(82, 69, 53, 0.12) 0, rgba(82, 69, 53, 0.12) 1px, transparent 1px, transparent 24px);
    border: 1px dashed rgba(159, 142, 123, 0.45);
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.pos-zone-label {
    position: absolute;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(214, 195, 175, 0.45);
    pointer-events: none;
}

.pos-zone-bar { left: 6%; top: 4%; }
.pos-zone-window { left: 6%; top: 24%; }
.pos-zone-main { left: 34%; top: 22%; }
.pos-zone-booth { right: 6%; top: 26%; }
.pos-zone-patio { left: 8%; bottom: 22%; }
.pos-zone-private { left: 34%; bottom: 8%; }

.pos-entrance {
    position: absolute;
    left: 42%;
    bottom: 2%;
    width: 16%;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffb957;
    border-top: 2px solid #ffb957;
    padding-top: 4px;
    pointer-events: none;
}

.pos-kitchen {
    position: absolute;
    left: 38%;
    top: 2%;
    width: 24%;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(214, 195, 175, 0.5);
    border-bottom: 1px dashed #524535;
    padding-bottom: 4px;
    pointer-events: none;
}

.pos-table-btn {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    min-width: 44px;
    min-height: 44px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    z-index: 2;
}

.pos-table-btn:active {
    transform: scale(0.96);
}

.pos-table-round {
    border-radius: 50%;
}

.pos-table-rect {
    border-radius: 6px;
}

.pos-table-available {
    background: rgba(76, 175, 80, 0.2);
    border-color: #6fcf97;
    color: #e2e2e2;
}

.pos-table-reserved {
    background: rgba(255, 185, 87, 0.25);
    border-color: #ffb957;
    color: #ffb957;
}

.pos-table-occupied {
    background: rgba(206, 1, 15, 0.25);
    border-color: #ce010f;
    color: #ffb4aa;
}

.pos-table-selected {
    box-shadow: 0 0 0 3px #ffb957, 0 0 20px rgba(255, 185, 87, 0.35);
    z-index: 5;
}

.pos-table-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.pos-table-seats {
    font-size: 9px;
    opacity: 0.85;
}

.pos-panel-wrap {
    display: flex;
    flex-direction: column;
    background: #1f1f1f;
    min-height: 0;
    overflow: hidden;
}

.pos-panel {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.pos-panel h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: #ffb957;
    margin-bottom: 4px;
}

.pos-panel-card {
    border: 1px dashed rgba(159, 142, 123, 0.35);
    background: #353535;
    padding: 14px;
    margin-bottom: 12px;
}

.pos-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d6c3af;
    margin-bottom: 6px;
}

.pos-input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #524535;
    color: #e2e2e2;
    padding: 12px;
    min-height: 48px;
    font-size: 16px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.pos-input:focus {
    outline: none;
    border-color: #ffb957;
}

.pos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.pos-btn:active {
    opacity: 0.85;
}

.pos-btn-primary {
    background: #ffb957;
    color: #462b00;
    border: none;
}

.pos-btn-outline {
    background: transparent;
    color: #ffb957;
    border: 1px solid #ffb957;
}

.pos-btn-danger {
    background: transparent;
    color: #ffb4aa;
    border: 1px solid #ce010f;
}

.pos-btn-secondary {
    background: #2a2a2a;
    color: #e2e2e2;
    border: 1px solid #524535;
}

.pos-status-pill {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    margin-bottom: 10px;
}

.pos-status-available { background: rgba(76, 175, 80, 0.2); color: #6fcf97; }
.pos-status-reserved { background: rgba(255, 185, 87, 0.2); color: #ffb957; }
.pos-status-occupied { background: rgba(206, 1, 15, 0.2); color: #ffb4aa; }

.pos-empty-hint {
    color: #d6c3af;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    padding: 24px 12px;
}

.pos-toast {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: 90%;
    padding: 12px 20px;
    background: #353535;
    border: 1px solid #ffb957;
    color: #e2e2e2;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: none;
}

.pos-toast.show {
    display: block;
}

.pos-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(19, 19, 19, 0.7);
    z-index: 10;
    font-size: 14px;
    color: #d6c3af;
}

.pos-res-list {
    max-height: 140px;
    overflow-y: auto;
    margin-top: 8px;
}

.pos-res-item {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(82, 69, 53, 0.5);
    font-size: 13px;
    cursor: pointer;
}

.pos-res-item:hover,
.pos-res-item.active {
    background: rgba(255, 185, 87, 0.1);
}

/* POS staff menu */
.pos-menu-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #1f1f1f;
    border-bottom: 1px dashed rgba(159, 142, 123, 0.35);
    position: sticky;
    top: 0;
    z-index: 30;
}

.pos-menu-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #ffb957;
    border: 1px solid #524535;
    border-radius: 4px;
    flex-shrink: 0;
}

.pos-menu-bar-info {
    flex: 1;
}

.pos-menu-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 14px;
    background: rgba(255, 185, 87, 0.15);
    border: 1px solid #ffb957;
    color: #ffb957;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.pos-menu-cart-count {
    background: #ffb957;
    color: #462b00;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 999px;
    font-size: 12px;
    padding: 0 6px;
}

/* POS cart drawer */
.pos-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pos-cart-overlay.show {
    opacity: 1;
}

.pos-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 90vw);
    background: #1b1b1b;
    border-left: 1px solid #524535;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.pos-cart-drawer.show {
    transform: translateX(0);
}

.pos-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #524535;
    background: #1f1f1f;
}

.pos-cart-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #d6c3af;
    border: 1px solid #524535;
    border-radius: 4px;
    flex-shrink: 0;
}

.pos-cart-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px;
}

.pos-cart-empty {
    color: #9f8e7b;
    font-size: 14px;
    text-align: center;
    padding: 40px 16px;
}

.pos-cart-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(82, 69, 53, 0.5);
}

.pos-cart-line-name {
    color: #e2e2e2;
    font-weight: 600;
    font-size: 14px;
}

.pos-cart-line-sub {
    color: #9f8e7b;
    font-size: 12px;
    margin-top: 2px;
}

.pos-cart-line-meta {
    color: #d6c3af;
    font-size: 12px;
    margin-top: 4px;
}

.pos-cart-line-total {
    color: #ffb957;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.pos-cart-qty {
    display: inline-block;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 999px;
    background: rgba(255, 185, 87, 0.15);
    color: #ffb957;
    font-weight: 700;
    font-size: 12px;
    margin-right: 8px;
}

.pos-cart-foot {
    border-top: 1px solid #524535;
    background: #1f1f1f;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pos-cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: #ffb957;
}

.pos-category-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #1b1b1b;
    border-bottom: 1px solid #524535;
    flex-shrink: 0;
}

.pos-cat-tab {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #d6c3af;
    border: 1px solid #524535;
    border-radius: 999px;
    background: #2a2a2a;
}

.pos-cat-tab-active {
    color: #462b00;
    background: #ffb957;
    border-color: #ffb957;
}

.pos-menu-main {
    -webkit-overflow-scrolling: touch;
}

.pos-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
}

@media (min-width: 768px) {
    .pos-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    .pos-menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pos-menu-card {
    border: 1px dashed rgba(159, 142, 123, 0.35);
    border-radius: 6px;
    overflow: hidden;
    background: #353535;
}

.pos-menu-card-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
    border: none;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.pos-menu-card-inner:active {
    opacity: 0.92;
}

.pos-menu-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: #1f1f1f;
}

.pos-menu-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.pos-menu-card-inner:active .pos-menu-img {
    transform: scale(1.03);
}

.pos-menu-body {
    padding: 10px 10px 12px;
}

.pos-menu-name {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    line-height: 1.25;
    color: #e2e2e2;
    margin-bottom: 2px;
}

.pos-menu-sub {
    font-size: 11px;
    color: #d6c3af;
    margin-bottom: 6px;
    line-height: 1.3;
}

.pos-menu-price {
    font-size: 16px;
    font-weight: 700;
    color: #ffb957;
    margin-bottom: 8px;
}

.pos-menu-add-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #d6c3af;
}

.pos-menu-adding {
    opacity: 0.6;
    pointer-events: none;
}

.pos-menu-added .pos-menu-add-label {
    color: #6fcf97;
}

.pos-order-line:last-child {
    border-bottom: none;
}

.pos-order-page {
    -webkit-overflow-scrolling: touch;
}
