/* css/booking-widget.css */
:root {
    --primary-color: #ffffff;
    --bg-dark: #111111;
    --bg-panel: #161616;
    --text-muted: #888888;
    --border-color: #333333;
    --hover-bg: #2a2a2a;
    --date-bg: #222222;
}

#booking-widget-container.dark-theme {
    background: var(--bg-dark);
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    overflow: hidden;
    position: relative;
    height: 550px;
    display: flex;
    font-family: 'Poppins', sans-serif;
    color: white;
    border: 1px solid #222;
}

.booking-sidebar {
    width: 250px;
    background: var(--bg-panel);
    padding: 30px 20px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 600;
}

.sidebar-logo { margin-bottom: 30px; }
.sidebar-logo img { max-width: 120px; }

.sidebar-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #bbb;
    font-size: 0.85rem;
    line-height: 1.4;
}

.sidebar-info-item i { margin-right: 10px; font-size: 1rem; color: #666; margin-top: 2px; }

.booking-content {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

/* Updated Steps Wrapper for Mobile Sliding */
.steps-wrapper {
    display: flex;
    width: 200%; /* Default desktop 2-step width */
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.step { width: 50%; height: 100%; overflow: hidden; } /* Desktop step width */

.split-view { display: flex; height: 100%; }

.calendar-section {
    width: 65%;
    padding: 30px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.section-heading {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.calendar-header h4 { font-size: 1.3rem; font-weight: 500; margin: 0; min-width: 180px; text-align: center; }

.btn-cal-nav {
    background: var(--date-bg);
    border: 1px solid var(--border-color);
    color: #aaa;
    width: 35px; height: 35px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 8px;
    transition: all 0.2s;
}
.btn-cal-nav:hover { background: white; color: black; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.calendar-day-label { text-align: center; color: #888; font-size: 0.75rem; font-weight: 700; padding-bottom: 8px; }

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    cursor: pointer; color: #ddd; font-size: 1rem; font-weight: 500;
    background-color: var(--date-bg); border: 1px solid transparent;
    transition: all 0.2s;
}

.calendar-day:hover:not(.disabled):not(.selected) { background-color: #444; border-color: #666; transform: scale(1.05); }
.calendar-day.selected { background-color: white !important; color: black !important; font-weight: 700; box-shadow: 0 0 10px rgba(255,255,255,0.2); }
.calendar-day.disabled { background-color: transparent; color: #333; cursor: not-allowed; }
.calendar-day.off-day { background-color: #1a1a1a; text-decoration: line-through; opacity: 0.5; color: #444; }

.slots-section {
    width: 35%;
    padding: 30px 20px;
    background: #131313;
    display: flex;
    flex-direction: column;
}

.slots-list {
    overflow-y: auto; padding-right: 5px;
    scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.slots-list::-webkit-scrollbar { width: 4px; }
.slots-list::-webkit-scrollbar-thumb { background-color: #333; border-radius: 4px; }

.time-slot {
    border: 1px solid var(--border-color);
    padding: 12px; border-radius: 8px; text-align: center;
    cursor: pointer; font-size: 0.9rem; color: #ccc;
    margin-bottom: 10px; background: var(--date-bg);
    transition: all 0.2s; position: relative;
}

.time-slot:hover:not(.booked) { border-color: white; background: white; color: black; }

.time-slot.booked {
    border-color: #332222; color: #555; text-decoration: line-through;
    cursor: not-allowed; background: rgba(50, 20, 20, 0.2);
}

.time-slot.booked::after {
    content: "BOOKED"; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); background: #111; padding: 0 6px;
    font-size: 0.6rem; color: #e74c3c; font-weight: 800;
    text-decoration: none; letter-spacing: 1px;
}

#step2 { padding: 40px; display: flex; flex-direction: column; }
.form-header { display: flex; align-items: center; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.btn-back-icon { background: transparent; border: none; color: #888; margin-right: 15px; cursor: pointer; font-size: 1.2rem; padding: 0; }
.btn-back-icon:hover { color: white; }
.form-header h3 { margin: 0; font-size: 1.2rem; font-weight: 500; }
.booking-form-group { margin-bottom: 15px; }
.booking-form-label { font-size: 0.8rem; color: #888; margin-bottom: 5px; display: block; }
.dark-input { background: var(--bg-panel); border: 1px solid var(--border-color); color: white; padding: 10px 12px; border-radius: 6px; width: 100%; font-size: 0.9rem; }
.dark-input:focus { border-color: #666; outline: none; background: #1a1a1a; }
.btn-submit { background: white; color: black; border: none; padding: 12px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; margin-top: auto; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: #e5e5e5; }

.success-popup {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 17, 17, 0.95); backdrop-filter: blur(5px);
    display: none; flex-direction: column; justify-content: center; align-items: center;
    z-index: 20; animation: fadeIn 0.3s;
}
.success-content { text-align: center; padding: 30px; background: #1a1a1a; border-radius: 12px; border: 1px solid #333; max-width: 300px; }
.check-icon { width: 50px; height: 50px; background: #2ecc71; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 20px; }
.btn-close-popup { background: transparent; border: 1px solid #444; color: white; padding: 8px 20px; border-radius: 6px; margin-top: 20px; cursor: pointer; font-size: 0.85rem; }
.btn-close-popup:hover { background: #333; }

.loader { border: 2px solid #333; border-top: 2px solid white; border-radius: 50%; width: 20px; height: 20px; animation: spin 0.8s linear infinite; margin: 20px auto; display: none; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- MOBILE SPECIFIC STYLES --- */
@media (max-width: 991px) {
    #booking-widget-container.dark-theme {
        flex-direction: column;
        height: auto; /* Allow flexible height */
        min-height: 600px;
    }
    
    .booking-sidebar {
        width: 100%;
        padding: 30px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        order: 2; /* Sidebar at Bottom */
        align-items: center; /* CENTRALIZED content */
        text-align: center; /* Center text */
    }
    
    .booking-sidebar .sidebar-info-item {
        justify-content: center; /* Center items flex-wise */
        width: 100%;
    }
    
    .sidebar-info-item i {
        margin-right: 10px;
    }
    
    .booking-content {
        height: 500px; /* Fixed viewport for content sliding */
        order: 1; /* Calendar/Content at Top */
    }

    /* 3-Step Slider logic for Mobile */
    .steps-wrapper {
        width: 300%; /* 3 Steps Wide */
    }
    
    .step {
        width: 33.333%; /* Each step 1/3 */
    }
    
    .split-view {
        display: flex;
        width: 200%; /* Calendar = 1 screen, Slots = 1 screen */
        height: 100%;
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .calendar-section {
        width: 50%; /* 1 Mobile Screen */
        border-right: none;
        padding: 20px;
        height: 100%;
    }
    
    .slots-section {
        width: 50%; /* 1 Mobile Screen */
        padding: 20px;
        background: var(--bg-dark); /* Match bg */
        border-left: none;
        height: 100%;
    }
    
    /* Back button for slots on mobile */
    .slots-header-mobile {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
    }
}