/* Base Calendar Styles - Shared across all calendar views */

.rrs-calendar-container {
    max-width: 1400px;
    margin: 30px auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rrs-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.rrs-calendar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rrs-nav-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rrs-nav-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.rrs-date-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rrs-date-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    min-width: 160px;
}

.rrs-today-btn {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.rrs-calendar-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rrs-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.rrs-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Legend Colors */
.rrs-legend-color.rrs-available {
    background: #28a745;
}

.rrs-legend-color.rrs-selected {
    background: #0d6efd;
}

.rrs-legend-color.rrs-my-hold {
    background: #17a2b8;
}

.rrs-legend-color.rrs-held {
    background: #ffc107;
}

.rrs-legend-color.rrs-booked {
    background: #f8d7da;
}

/* Common Grid Styles */
.rrs-calendar-grid-container {
    position: relative;
    min-height: 200px;
}

.rrs-calendar-grid {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: block;
}

.rrs-calendar-row {
    display: grid;
    grid-template-columns: 100px repeat(auto-fit, minmax(120px, 1fr));
    border-bottom: 1px solid #e0e0e0;
}

.rrs-calendar-header-row {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.rrs-time-label {
    padding: 15px 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
}

.rrs-lane-header {
    padding: 15px 10px;
    text-align: center;
    font-size: 13px;
    border-right: 1px solid #e0e0e0;
}

.rrs-slot {
    padding: 12px;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    font-size: 12px;
}

/* Common States - CRITICAL COLOR DEFINITIONS */
.rrs-slot.unavailable { 
    background: #e9ecef; 
    cursor: not-allowed;
    color: #6c757d;
}

.rrs-slot.booked { 
    background: #f8d7da; 
    cursor: not-allowed; 
    color: #721c24;
}

.rrs-slot.available { 
    background: #28a745;
    border-color: #1e7e34;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
}

.rrs-slot.available:hover {
    background: #218838;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.rrs-slot.selected-slot,
.rrs-slot.selected {
    background: #0d6efd !important;
    border: 2px solid #0a58ca !important;
    color: #fff !important;
    font-weight: 600;
}

.rrs-slot.held {
    background: #ffc107;
    color: #856404;
    cursor: not-allowed;
}

.rrs-slot.my_hold {
    background: #17a2b8;
    color: #fff;
    cursor: pointer;
}

/* Selection Panel */
.rrs-selection-panel {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rrs-selection-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.rrs-selection-details {
    margin-bottom: 15px;
}

.rrs-selection-details p {
    margin: 5px 0;
    font-size: 14px;
}

.rrs-selection-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Loading */
.rrs-calendar-loading {
    padding: 40px;
    text-align: center;
    color: #666;
}

.rrs-calendar-loading .spinner {
    float: none;
    margin: 0 auto 10px;
}

/* Hold Timer Notice */
.rrs-hold-notice {
    margin-top: 15px;
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rrs-hold-notice .dashicons {
    color: #856404;
}

.rrs-hold-timer {
    color: #d9534f;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .rrs-calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rrs-calendar-controls {
        justify-content: center;
    }
    
    .rrs-calendar-legend {
        justify-content: center;
    }
    
    .rrs-calendar-row {
        grid-template-columns: 80px repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .rrs-slot {
        min-height: 50px;
        font-size: 11px;
        padding: 8px;
    }
}
