/* ===================================
   Salon Calendar - Dark Theme (All in Media Style)
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --primary: #794696;
    --primary-dark: #5a3470;
    --primary-light: #8a57a7;
    --bg-dark: #1a1a1a;
    --bg-card: #2d2d2d;
    --bg-card-hover: #3d3d3d;
    --text-primary: #ffffff;
    --text-secondary: #888;
    --border-color: #3d3d3d;
    --radius: 12px;
    --shadow-purple: 0 8px 20px rgba(121, 70, 150, 0.3);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body,
.salon-calendar-wrapper {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-primary);
}

/* === Wrapper === */
.salon-calendar-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 15px;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    min-height: 100vh;
}

/* === Header === */
.salon-calendar-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-purple);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* === Shop Selection === */
.shop-selection-section {
    padding: 15px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.shop-button {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-button:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(121, 70, 150, 0.4);
}

.shop-button.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    box-shadow: var(--shadow-purple);
}

.shop-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.shop-button.selected .shop-name {
    color: white;
}

/* === Calendar Section === */
.calendar-section {
    padding: 15px;
}

.calendar-view-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow-purple);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

#calendar-view-type {
    font-size: 16px;
    font-weight: 600;
}

#calendar-date-range {
    font-size: 14px;
    opacity: 0.9;
}

/* === FullCalendar Overrides === */
.fc {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: var(--shadow-card);
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: var(--border-color);
}

.fc-toolbar {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 15px !important;
}

.fc-toolbar-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.fc-button {
    background: var(--bg-card) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.fc-button:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--primary) !important;
    transform: scale(1.02) !important;
}

.fc-button-active,
.fc-button-active:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: var(--shadow-purple) !important;
}

/* Calendar Headers */
.fc-col-header-cell {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-color) !important;
}

.fc-col-header-cell-cushion {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    padding: 10px 4px !important;
}

.fc-timegrid-slot-label {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    font-size: 11px !important;
}

.fc-day-today {
    background: rgba(121, 70, 150, 0.1) !important;
}

/* Events */
.fc-event {
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 8px rgba(121, 70, 150, 0.3) !important;
}

.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(121, 70, 150, 0.5) !important;
}

.fc-event-title {
    font-weight: 600 !important;
    font-size: 12px !important;
    color: white !important;
}

.fc-event-time {
    font-size: 11px !important;
    opacity: 0.9;
    color: white !important;
}

/* Grid Lines */
.fc-timegrid-divider,
.fc-scrollgrid-section-body > td {
    border-color: var(--border-color) !important;
}

/* === Loading === */
.loading-message {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* === Customer Details (Custom User CSS Class) === */
.customer-details {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.customer-details .btn {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 768px) {
    .customer-details {
        flex-direction: column;
    }
    
    .customer-details .btn {
        width: 100%;
    }
}

/* === Modal === */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.booking-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(121, 70, 150, 0.5);
    border: 2px solid var(--border-color);
}

.booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.booking-modal-header h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
    .salon-calendar-wrapper {
        padding: 10px;
    }
    
    .salon-calendar-header {
        padding: 12px;
        flex-direction: row;
    }
    
    .calendar-title {
        font-size: 16px;
    }
    
    .home-button {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .shops-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .shop-button {
        padding: 12px;
    }
    
    .fc {
        padding: 10px;
    }
    
    .fc-button {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    .fc-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 430px) {
    .calendar-title {
        font-size: 14px;
    }
    
    .home-button {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .shop-button {
        padding: 10px;
    }
    
    .shop-name {
        font-size: 12px;
    }
    
    .fc-button {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }
    
    .fc-toolbar-title {
        font-size: 14px !important;
    }
}