/* ═══════════════════════════════════════════════════════════════
   RESTRO · FLOOR / TABLE GRID & OPERATIONS UI
   Used by RestroHomePage.razor. Reuses pos.css animations & glass.
   Edit here — do not duplicate pos.css classes.
═══════════════════════════════════════════════════════════════ */

/* ── Occupancy Summary Bar ───────────────────────────────────── */
.restro-occ-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.restro-occ-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.restro-occ-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* ── Table Grid ──────────────────────────────────────────────── */
.restro-floor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 0.5rem;
    align-content: start;
}

@media (min-width: 768px) {
    .restro-floor { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 0.6rem; }
}

/* ── Table Tile ──────────────────────────────────────────────── */
.restro-table {
    position: relative;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    border: 1.5px solid transparent;
    transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.14s ease, border-color 0.14s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 92px;
    display: flex;
    flex-direction: column;
}

.restro-table:hover:not(:active) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.restro-table:active,
.restro-table.is-pressed {
    transform: scale(0.9) !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.08s ease !important;
}

.restro-table.is-selected {
    box-shadow: 0 0 0 3px var(--bs-primary), 0 10px 26px rgba(var(--bs-primary-rgb), 0.3);
}

/* ── Table Status Colors (light tinted backgrounds) ─────────── */
.restro-table.s-open {
    background: rgba(25, 135, 84, 0.10);
    border-color: rgba(25, 135, 84, 0.35);
}
.restro-table.s-open .restro-table-icon { background: rgba(25, 135, 84, 0.18); color: #198754; }

.restro-table.s-occupied {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.40);
}
.restro-table.s-occupied .restro-table-icon { background: rgba(220, 53, 69, 0.18); color: #dc3545; }

.restro-table.s-reserved {
    background: rgba(255, 193, 7, 0.14);
    border-color: rgba(255, 193, 7, 0.45);
}
.restro-table.s-reserved .restro-table-icon { background: rgba(255, 193, 7, 0.22); color: #b8860b; }

.restro-table.s-unavailable,
.restro-table.s-maintenance,
.restro-table.s-locked {
    background: rgba(108, 117, 125, 0.12);
    border-color: rgba(108, 117, 125, 0.35);
    opacity: 0.85;
}
.restro-table.s-unavailable .restro-table-icon,
.restro-table.s-maintenance .restro-table-icon,
.restro-table.s-locked .restro-table-icon { background: rgba(108, 117, 125, 0.2); color: #6c757d; }

[data-bs-theme="dark"] .restro-table.s-open .restro-table-icon { color: #4ade80; }
[data-bs-theme="dark"] .restro-table.s-occupied .restro-table-icon { color: #f87171; }
[data-bs-theme="dark"] .restro-table.s-reserved .restro-table-icon { color: #fbbf24; }

/* ── Table Tile Inner ────────────────────────────────────────── */
.restro-table-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin: 0 auto 0.25rem;
}

.restro-table-name {
    font-weight: 700;
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.15;
}

.restro-table-meta {
    font-size: 0.66rem;
    opacity: 0.7;
    text-align: center;
    line-height: 1.1;
}

.restro-table-badge {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.1rem 0.36rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.restro-table-status-dot {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

/* Pulsing live indicator for occupied tables */
@keyframes restro-live-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 0 0 0 rgba(220,53,69,0.5); }
    50%      { box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 0 0 6px rgba(220,53,69,0); }
}
.restro-table.s-occupied .restro-table-status-dot {
    animation: restro-live-pulse 2s ease-in-out infinite;
    background: #dc3545;
}
.restro-table.s-open .restro-table-status-dot { background: #198754; }
.restro-table.s-reserved .restro-table-status-dot { background: #ffc107; }
.restro-table.s-unavailable .restro-table-status-dot,
.restro-table.s-maintenance .restro-table-status-dot,
.restro-table.s-locked .restro-table-status-dot { background: #6c757d; }

/* ── Drawer Batch Row ────────────────────────────────────────── */
.restro-batch-row {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    transition: background 0.13s, transform 0.12s, box-shadow 0.13s;
}

.restro-batch-row:hover {
    background: rgba(var(--bs-primary-rgb), 0.05);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.restro-batch-row:active { transform: scale(0.985); }

/* ── Empty State Card ────────────────────────────────────────── */
.restro-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    opacity: 0.6;
}

.restro-empty-icon {
    font-size: 2.6rem;
    opacity: 0.4;
}

/* ── Dense Pill Scroller reuse ───────────────────────────────── */
.restro-area-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s, transform 0.1s, box-shadow 0.12s;
}

.restro-area-pill:active { transform: scale(0.92); }

[data-bs-theme="light"] .restro-area-pill:not(.active) {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--bs-body-color);
}
[data-bs-theme="dark"] .restro-area-pill:not(.active) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-body-color);
}
.restro-area-pill.active {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 2px 10px rgba(var(--bs-primary-rgb), 0.4);
}
