/* select_booth.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #36454F 0%, #2F3C48 100%);
    color: #f0f0f0;
    min-height: 100vh;
    padding: 10px;
}
body {
    background-image: url('../KULON.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Properti ini yang mengunci gambar */
    font-family: Arial, sans-serif;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.container {
    background: rgba(47, 60, 72, 0.8);
    backdrop-filter: blur(1px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
container {
    /* Use rgba() for transparency: The last value is the alpha channel (0.0 to 1.0) */
    background-color: rgba(47, 60, 72, 0.8); /* 80% opaque dark gray */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1 {
    color: #ADD8E6;
    margin-bottom: 15px;
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.welcome-info {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 20px;
    color: #D3D3D3;
    text-align: center;
    padding: 0 10px;
}

.message {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.filter-group { /* Mengandung filter kategori dan blok */
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(62, 74, 87, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Jarak antar grup filter */
}

.category-filter, .block-filter { /* Perbarui selektor ini */
    text-align: center;
    color: #D3D3D3;
    flex: 1; /* Agar mengambil ruang yang tersedia */
    min-width: 250px; /* Lebar minimum agar tidak terlalu sempit di mobile */
}

.filter-label { /* Ubah nama kelas */
    display: block;
    margin-bottom: 10px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.filter-btn {
    background-color: #6495ED;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #4169E1;
    transform: translateY(-2px);
}

/* Styling for the image container */
.map-image-container {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 30px;
}
.map-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.map-image:hover {
    transform: scale(1.02);
}
.map-caption {
    color: #D3D3D3;
    font-size: 0.9em;
    margin-top: 10px;
}


.booth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(62, 74, 87, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .booth-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 10px;
    }
    .filter-group {
        flex-direction: column; /* Tumpuk filter di mobile */
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .booth-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
}

.booth-item {
    background: linear-gradient(145deg, #778899, #696969); /* Default/fallback color */
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-align: center;
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.booth-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.1), transparent);
    border-radius: 12px;
    pointer-events: none;
}

/* ---------- DIHAPUS / DIKOMENTARI ATURAN BERDASARKAN KATEGORI INI ---------- */
/*
.booth-item.VVIP {
    background: linear-gradient(145deg, #FFD700, #FFA500);
}

.booth-item.VIP {
    background: linear-gradient(145deg, #C0C0C0, #A0A0A0);
}

.booth-item.Reguler {
    background: linear-gradient(145deg, #CD7F32, #B8860B);
}
*/
/* ------------------------------------------------------------------------ */

/* ---------- ATURAN WARNA BERDASARKAN BLOK DENGAN KODE YANG ANDA BERIKAN ---------- */
/* Pastikan warna teks cocok dengan background, tambahkan color: white/black/etc; */
.booth-item.block-A { background: linear-gradient(145deg, #E62129 ) !important; color: white; } /* Merah */
.booth-item.block-B { background: linear-gradient(145deg, #FF8000) !important; color: black; } /* Putih */
.booth-item.block-C { background: linear-gradient(145deg, #FEFEFE) !important; color: black; } /* Pink */
.booth-item.block-D { background: linear-gradient(145deg, #00B3FF) !important; color: white; } /* Biru Muda */
.booth-item.block-E { background: linear-gradient(145deg, #720aaaff) !important; color: white; } /* Biru Muda */

/* --------------------------------------------------------------------------------- */


.booth-item.booked_pending {
    background: linear-gradient(145deg, #FFEA00, #FFD700) !important; /* Tambahkan !important juga di sini */
    cursor: not-allowed;
    opacity: 0.8;
    color: #333;
}

.booth-item.booked_paid {
    background: linear-gradient(145deg, #FF6347, #DC143C) !important; /* Tambahkan !important juga di sini */
    cursor: not-allowed;
    opacity: 0.6;
    color: white;
}

.booth-item.selected {
    border: 3px solid #00BFFF;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.8);
    transform: scale(1.05);
}

.booth-item:not(.booked_pending):not(.booked_paid):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.booth-item .booth-number {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    font-weight: bold;
    margin-bottom: 5px;
}

.booth-info {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    margin-top: 5px;
}

.booth-info .price {
    font-weight: normal;
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    opacity: 0.9;
}

.status-text {
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    margin-top: 5px;
    color: rgba(0,0,0,0.8);
}

.booth-item.booked_paid .status-text {
    color: white;
}

.terms-checkbox-group {
    margin: 25px 0;
    text-align: center;
    color: #D3D3D3;
    padding: 0 10px;
}

.terms-checkbox-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.terms-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.terms-checkbox-group a {
    color: #ADD8E6;
    text-decoration: none;
}

.terms-checkbox-group a:hover {
    text-decoration: underline;
}

.submit-btn-container {
    margin-top: 30px;
    text-align: center;
}

.btn-confirm {
    background: linear-gradient(145deg, #32CD32, #228B22);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.3);
    width: 100%;
    max-width: 300px;
}

.btn-confirm:hover:not(:disabled) {
    background: linear-gradient(145deg, #228B22, #006400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 205, 50, 0.4);
}

.btn-confirm:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 5px;
        border-radius: 10px;
    }

    .booth-item {
        min-height: 80px;
        padding: 8px;
    }

    .filter-buttons {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .btn-confirm {
        padding: 12px 24px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 10px;
    }

    .booth-item {
        min-height: 70px;
        padding: 6px;
    }

    .terms-checkbox-group {
        margin: 20px 0;
    }

    .terms-checkbox-group label {
        font-size: 0.8rem;
    }

    .btn-confirm {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .booth-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .booth-item {
        min-height: 70px;
    }
}

/* --- Loading Overlay Styles --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Pastikan di atas semua elemen */
    opacity: 0; /* Awalnya tersembunyi */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    border: 6px solid #f3f3f3; /* Light grey */
    border-top: 6px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style untuk booth yang terkunci */
booth-item.locked {
    background-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
    border: 1px solid #c0c0c0;
}

.booth-item.locked .status-text {
    color: #000000ff;
    font-weight:normal;
}