/* ============================================================
   Seat Selection Page Styles
   ============================================================ */

.seat-selection-page {
    padding: 32px 0 64px;
}

.seat-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

/* ── Bus Info Bar ─────────────────────────────────────── */
.bus-info-bar {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.bus-info-bar h2 {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.bus-info-bar .bus-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bus-info-bar .route-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* ── Seat Map Container ──────────────────────────────── */
.seat-map-container {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.seat-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.seat-map-header h3 {
    font-size: 1rem;
}

/* Deck Tabs (for sleeper) */
.deck-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 3px;
}

.deck-tab {
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.deck-tab.active {
    background: #fff;
    color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

/* Legend */
.seat-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.legend-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1.5px solid var(--gray-300);
}

.legend-swatch.available {
    background: #fff;
    border-color: var(--gray-300);
}

.legend-swatch.selected {
    background: var(--primary-500);
    border-color: var(--primary-600);
}

.legend-swatch.pending {
    background: #fef3c7;
    border-color: #f59e0b;
}

.legend-swatch.booked {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

/* ── Seat Grid (Seater) ──────────────────────────────── */
.seat-map {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
}

/* Driver icon */
.driver-area {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 16px;
    margin-bottom: 16px;
    border-bottom: 2px dashed var(--gray-200);
}

.driver-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.seat-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seat-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.seat-row .aisle {
    width: 30px;
    flex-shrink: 0;
}

/* Individual Seat */
.seat {
    width: 42px;
    height: 42px;
    border: 2px solid var(--gray-300);
    border-radius: 8px 8px 4px 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: all var(--transition-fast);
    position: relative;
}

.seat::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 4px;
    right: 4px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px 2px 0 0;
    transition: background var(--transition-fast);
}

.seat:hover:not(.booked) {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-600);
    transform: scale(1.08);
}

.seat:hover:not(.booked)::after {
    background: var(--primary-400);
}

.seat.selected {
    border-color: var(--primary-600);
    background: var(--primary-500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.seat.selected::after {
    background: var(--primary-600);
}

.seat.booked {
    border-color: var(--gray-200);
    background: var(--gray-100);
    color: var(--gray-300);
    cursor: not-allowed;
}

.seat.booked::after {
    background: var(--gray-200);
}

.seat.pending {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #d97706;
    cursor: not-allowed;
}

.seat.pending::after {
    background: #f59e0b;
}

/* Sleeper berth */
.berth {
    width: 100px;
    height: 42px;
    border-radius: 6px;
}

.berth::after {
    display: none;
}

/* ── Booking Summary Sidebar ─────────────────────────── */
.booking-summary {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.summary-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.summary-header h3 {
    font-size: 1rem;
}

.summary-body {
    padding: 20px 24px;
}

.summary-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.summary-empty i {
    display: block;
    margin: 0 auto 8px;
    color: var(--gray-300);
}

/* Selected seats list */
.selected-seats-list {
    margin-bottom: 20px;
}

.selected-seat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-50);
    font-size: 0.875rem;
}

.selected-seat-item:last-child {
    border-bottom: none;
}

.seat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.seat-label .seat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.seat-price {
    font-weight: 600;
    color: var(--gray-700);
}

/* Stops selection */
.stop-select-group {
    margin-bottom: 20px;
}

.stop-select-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stop-select-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--gray-700);
    background: #fff;
    outline: none;
}

.stop-select-group select:focus {
    border-color: var(--primary-500);
}

/* Total */
.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 2px solid var(--gray-100);
    margin-top: 8px;
}

.summary-total span:first-child {
    font-weight: 600;
    color: var(--gray-700);
}

.summary-total .total-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.summary-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 992px) {
    .seat-layout {
        grid-template-columns: 1fr;
    }

    .booking-summary {
        position: static;
    }

    .bus-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .seat {
        width: 36px;
        height: 36px;
        font-size: 0.65rem;
    }

    .berth {
        width: 80px;
        height: 36px;
    }
}
