/* ===== BOOKING PAGE SEAT LAYOUT (MODERN SQUIRCLE) ===== */

/* Layout container */
.layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    margin-bottom: 20px;
    background: var(--neu-bg);
    border-radius: 24px;
    box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px var(--neu-light-shadow);
    max-width: 100%;
    box-sizing: border-box;
    align-items: center;
}

/* Reduce gap for the last row  */
.layout .layout-row:last-child {
    margin-top: 4px;
}

/* Each row in the layout - dynamic columns */
.layout-row {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 14px;
    justify-items: center;
    align-items: center;
}

/* Override for bagasi rows to be full width */
.layout-row.bagasi-row {
    display: flex !important;
    width: 100% !important;
    grid-template-columns: none !important;
    padding: 0;
}

.layout-row.bagasi-row .bagasi {
    width: 100% !important;
    flex: 1;
}

/* Base Seat Styling - Squircle Shape */
.layout-row .seat {
    width: 100%;
    max-width: 60px;
    aspect-ratio: 1;
    border-radius: 14px;
    /* Squircle radius */
    background: var(--neu-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 5px 10px var(--neu-dark-shadow), -5px -5px 10px var(--neu-light-shadow);
    color: var(--neu-text-dark);
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* Seat Hover Effect */
.layout-row .seat:hover {
    transform: translateY(-2px);
    box-shadow: 7px 7px 14px var(--neu-dark-shadow), -7px -7px 14px var(--neu-light-shadow);
    color: var(--neu-primary);
}

/* Booked Seat (Unavailable) */
/* Booked Seat (Unavailable) */
.layout-row .seat.booked {
    background: #f59e0b;
    /* Orange base */
    box-shadow: inset 2px 2px 4px rgba(180, 83, 9, 0.2), inset -2px -2px 4px rgba(252, 211, 77, 0.3);
    color: #78350f;
    /* Dark orange text */
    cursor: not-allowed;
    opacity: 1;
    /* Full opacity */
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.layout-row .seat.booked:hover {
    transform: none;
    color: #78350f;
}

/* Selected Seat (Active) */
.layout-row .seat.selected {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Driver styling */
.layout-row .driver {
    width: 100%;
    max-width: 60px;
    aspect-ratio: 1;
    border-radius: 14px;
    background: var(--neu-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    box-shadow: inset 2px 2px 5px var(--neu-dark-shadow), inset -2px -2px 5px var(--neu-light-shadow);
    opacity: 0.7;
}

.layout-row .driver svg {
    width: 24px;
    height: 24px;
    color: inherit;
}

/* Empty cell styling */
.layout-row .empty-cell {
    width: 100%;
    max-width: 60px;
    aspect-ratio: 1;
    background: transparent;
}

/* Bagasi full row */
.layout-row .bagasi {
    grid-column: span 3;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: #94a3b8;
    box-shadow: none;
    letter-spacing: 1px;
}

/* Small bagasi (single cell) */
.layout-row .bagasi-small {
    width: 100%;
    max-width: 60px;
    aspect-ratio: 1;
    border-radius: 14px;
    background: var(--neu-bg);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 4px 4px 8px var(--neu-dark-shadow), -4px -4px 8px var(--neu-light-shadow);
}

/* Tablet and desktop adjustments */
@media (min-width: 421px) {

    .layout-row .seat,
    .layout-row .driver,
    .layout-row .empty-cell,
    .layout-row .bagasi-small {
        max-width: 70px;
        font-size: 18px;
    }

    .layout-row .driver svg {
        width: 28px;
        height: 28px;
    }
}

/* Mobile responsive */
@media (max-width: 420px) {
    .layout {
        padding: 16px;
        gap: 12px;
    }

    .layout-row {
        gap: 10px;
    }

    .layout-row .seat,
    .layout-row .driver,
    .layout-row .empty-cell,
    .layout-row .bagasi-small {
        max-width: 55px;
        /* Slightly larger on mobile for touch */
        border-radius: 12px;
        font-size: 15px;
    }

    .layout-row .bagasi {
        height: 40px;
        font-size: 11px;
    }
}

/* Compact phones */
@media (max-width: 360px) {
    .layout-row {
        gap: 8px;
    }

    .layout-row .seat,
    .layout-row .driver,
    .layout-row .empty-cell {
        max-width: 48px;
        font-size: 14px;
    }
}