/* Tables Panel */
pos-tables {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

pos-tables .tables-header {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}

pos-tables .tables-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

pos-tables .tables-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    flex: 1;
    overflow: hidden;
}

pos-tables .tables-column {
    background: var(--bg-color);
    border-radius: 4px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

pos-tables .tables-column h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

pos-tables .tables-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

pos-tables .tables-list .empty-quarter {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem 0.5rem;
}

pos-tables .table-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

pos-tables .table-item {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    background: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    column-gap: 0.5rem;
}

pos-tables .table-item .table-name {
    font-weight: 500;
}

pos-tables .table-item .table-description {
    flex-basis: 100%;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

pos-tables .table-item .table-total {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (hover: hover) {
pos-tables .table-item:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}
}

/* Wachttijd-kleuren (Gizmo-conventie): wit zeer recent, groen 5+, oranje 30+, rood 60+ min */
pos-tables .table-item.wait-recent {
    background: white;
}
pos-tables .table-item.wait-soon {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}
pos-tables .table-item.wait-late {
    background: #ffedd5;
    border-color: #f97316;
    color: #9a3412;
}
pos-tables .table-item.wait-overdue {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Active overrulet de wait-kleuren (komt daarom hieronder) */
pos-tables .table-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

pos-tables .table-item.active .table-total {
    color: rgba(255, 255, 255, 0.8);
}
