/* --- Booking Form Styles (Standard) --- */
#adonai-booking-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Time Slot Styles (Booking form) */
#adonai-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.time-slot {
    padding: 10px 15px;
    border: 1px solid #0073aa;
    background-color: #ffffff;
    color: #0073aa;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
}
.time-slot.available:hover,
.time-slot.selected {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #005177;
}
.time-slot.booked {
    background-color: #ffcccc;
    color: #cc0000;
    border-color: #cc0000;
    cursor: not-allowed;
    opacity: 0.6;
}
#adonai-booking-form input[type="text"],
#adonai-booking-form input[type="email"],
#adonai-booking-form input[type="tel"],
#adonai-booking-form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* =============================================== */
/* --- STAFF DASHBOARD PREMIUM LOOK (Mobile First) --- */
/* =============================================== */

/* CRITICAL FIX: Ensure Admin Bar is removed and margin is cleared */
html {
    margin-top: 0px !important;
}
#wpadminbar {
    display: none !important;
}

/* Base Dashboard Container (Mobile First) */
.mobile-friendly-dashboard {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa; /* Light Gray background for the body area */
    padding: 15px 10px; /* Less padding on mobile */
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Section Styling */
.dashboard-header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 15px 10px;
    margin: -15px -10px 15px -10px; /* Extend to cover full width of Elementor section */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column; /* Mobile: Stacked */
    gap: 10px;
}

.mobile-friendly-dashboard h2 {
    color: #0073aa;
    font-size: 24px;
    margin: 0;
    border-left: none; /* Mobile clean look */
    padding-left: 0;
}

.dashboard-logout-btn {
    background-color: #dc3545;
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none !important;
    font-size: 14px;
    width: 100%; /* Mobile full width button */
    text-align: center;
}

.dashboard-subtitle {
    display: none; /* Hide subtitle on mobile for cleaner look */
}

/* --- CALENDAR SECTION --- */
.dashboard-calendar-area {
    margin-bottom: 25px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background-color: #ffffff; /* White card for Calendar */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-calendar-area h3 {
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.ui-datepicker {
    width: 100%; 
    max-width: 300px; /* Calendar size limit */
    margin: 0 auto; 
    font-size: 14px;
    background: #ffffff;
    border: none;
    padding: 5px;
    box-shadow: none;
}
.ui-datepicker-header {
    background: #0073aa;
    color: white;
    padding: 10px 0;
    border: none;
    border-radius: 4px;
    margin-bottom: 5px;
}
.ui-state-highlight, .ui-state-active, .ui-state-hover {
    background: #ff9900 !important;
    color: white !important;
    border: 1px solid #cc7a00 !important;
    border-radius: 50% !important;
}
.ui-datepicker table {
    width: 100%;
}
.ui-datepicker th {
    font-size: 12px;
    color: #0073aa;
}
.ui-datepicker td span, .ui-datepicker td a {
    text-align: center;
    padding: 8px;
    border-radius: 50%;
    display: block;
}


/* --- APPOINTMENT LIST AND FILTERS --- */
.filter-heading {
    margin-top: 10px;
    font-size: 18px;
    color: #333;
    border-left: 3px solid #ff9900;
    padding-left: 8px;
}

.appointment-filters {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping on mobile */
    gap: 6px;
    margin-bottom: 15px;
    padding: 8px 0;
    overflow-x: auto; /* Allow horizontal scrolling on mobile */
    -webkit-overflow-scrolling: touch; /* Smoother scrolling */
    border-bottom: 1px solid #f0f0f0;
}

.filter-btn {
    padding: 8px 12px;
    border-radius: 20px; 
    background-color: #e9ecef;
    color: #495057 !important;
    font-size: 13px;
    flex-shrink: 0; /* Important: prevents shrinking */
}

.filter-btn.active {
    background-color: #0073aa;
    color: white !important;
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.3);
}

/* --- Mobile Card View (Appointments List) --- */
.appointments-desktop-view { 
    display: none; 
}
.appointments-mobile-view {
    display: block; 
    padding: 0; 
}

.appointment-card {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.appointment-card.confirmed { border-left: 5px solid #28a745; }
.appointment-card.attended { border-left: 5px solid #007bff; }
.appointment-card.no-show { border-left: 5px solid #dc3545; }
.appointment-card.cancelled { border-left: 5px solid #6c757d; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px dashed #dee2e6;
    padding-bottom: 8px;
}

.card-header h4 {
    font-size: 16px;
    color: #0073aa;
}
.card-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
}
.appointment-card p {
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.4;
}
.appointment-card strong {
    font-weight: 600;
    color: #333;
    display: inline-block;
    min-width: 80px;
}

.dashboard-action-btn.full-width-btn {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    background-color: #ff9900; 
    color: white !important;
}

.loading-message {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}


/* --- Desktop/Tablet Overrides --- */
@media (min-width: 768px) {
    .mobile-friendly-dashboard {
        padding: 30px; 
        background-color: #ffffff; /* Revert to white background on desktop */
    }
    .dashboard-header {
        flex-direction: row; /* Desktop: Side-by-side */
        padding: 0;
        margin: 0 0 20px 0;
        box-shadow: none;
        border-bottom: 1px solid #e9ecef;
    }
    .dashboard-logout-btn {
        width: auto;
    }
    .dashboard-subtitle {
        display: block; /* Show subtitle */
    }
    .dashboard-calendar-area {
        max-width: 350px; /* Calendar area chota rakho */
        float: left;
        margin-right: 30px;
        position: sticky;
        top: 30px; /* Scroll ke saath stick rahe */
    }
    .filter-heading {
        margin-top: 0;
    }
    .appointment-filters {
        flex-wrap: wrap; /* Wrap allowed on desktop */
        overflow-x: hidden; /* Hide scrollbar */
    }
    .filter-btn {
        flex-shrink: 1; 
    }
    
    .appointments-desktop-view {
        display: block; /* Table dikhao */
        overflow: hidden;
    }
    .appointments-mobile-view {
        display: none; /* Cards chupa do */
    }
}