/* WP Room Booking - Calendar Styles */

/* Calendar Container */
.wrb-calendar-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 20px 0;
}

/* Calendar Header */
.wrb-calendar-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.wrb-calendar-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

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

.wrb-btn-prev,
.wrb-btn-next {
    background: #0073aa;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.wrb-btn-prev:hover,
.wrb-btn-next:hover {
    background: #005a87;
}

.wrb-current-date {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-width: 200px;
    text-align: center;
}

.wrb-view-controls {
    display: flex;
    gap: 5px;
}

.wrb-view-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.wrb-view-btn:hover {
    background: #f8f9fa;
    border-color: #0073aa;
}

.wrb-view-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Calendar Legend */
.wrb-calendar-legend {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.wrb-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.wrb-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}

.wrb-legend-color.wrb-available {
    background: #d4edda;
    border-color: #28a745;
}

.wrb-legend-color.wrb-booked {
    background: #f8d7da;
    border-color: #dc3545;
}

.wrb-legend-color.wrb-pending {
    background: #fff3cd;
    border-color: #ffc107;
}

/* Calendar Content */
.wrb-calendar-content {
    padding: 20px;
    min-height: 400px;
}

/* Month View */
.wrb-calendar-month {
    width: 100%;
    border-collapse: collapse;
}

.wrb-calendar-month th,
.wrb-calendar-month td {
    border: 1px solid #dee2e6;
    padding: 0;
    vertical-align: top;
    width: 14.28%;
    height: 120px;
}

.wrb-calendar-month th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    height: auto;
}

.wrb-calendar-day {
    position: relative;
    height: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wrb-calendar-day:hover {
    background: #f8f9fa;
}

.wrb-calendar-day.other-month {
    background: #f8f9fa;
    color: #6c757d;
}

.wrb-calendar-day.today {
    background: #e3f2fd;
}

.wrb-calendar-day.selected {
    background: #cce7f0;
}

.wrb-day-number {
    position: absolute;
    top: 5px;
    left: 8px;
    font-weight: 600;
    font-size: 14px;
}

.wrb-day-slots {
    margin-top: 25px;
    padding: 5px;
    height: calc(100% - 30px);
    overflow-y: auto;
}

.wrb-slot-indicator {
    display: block;
    padding: 2px 4px;
    margin: 1px 0;
    font-size: 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wrb-slot-indicator.available {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

.wrb-slot-indicator.booked {
    background: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.wrb-slot-indicator.pending {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}

.wrb-slot-indicator:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Week View */
.wrb-calendar-week {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
}

.wrb-week-time-header,
.wrb-week-day-header {
    background: #f8f9fa;
    padding: 10px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #dee2e6;
}

.wrb-week-time-slot {
    background: #f8f9fa;
    padding: 5px;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.wrb-week-day-slot {
    background: #fff;
    padding: 2px;
    min-height: 30px;
    border: 1px solid #dee2e6;
    position: relative;
    cursor: pointer;
}

.wrb-week-day-slot:hover {
    background: #f8f9fa;
}

.wrb-week-day-slot.available {
    background: #d4edda;
}

.wrb-week-day-slot.booked {
    background: #f8d7da;
}

.wrb-week-day-slot.pending {
    background: #fff3cd;
}

/* Day View */
.wrb-calendar-day-view {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1px;
    background: #dee2e6;
}

.wrb-day-time-header {
    background: #f8f9fa;
    padding: 10px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #dee2e6;
}

.wrb-day-time-slot {
    background: #f8f9fa;
    padding: 10px 5px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.wrb-day-slot {
    background: #fff;
    padding: 10px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    min-height: 50px;
}

.wrb-day-slot:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wrb-day-slot.available {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.wrb-day-slot.booked {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
    cursor: not-allowed;
}

.wrb-day-slot.pending {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
    cursor: not-allowed;
}

.wrb-day-slot.selected {
    background: #cce7f0;
    color: #004085;
    border-color: #0073aa;
}

/* Booking Details Popup */
.wrb-booking-details {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 300px;
}

.wrb-booking-details h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.wrb-booking-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.wrb-booking-details .wrb-booking-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wrb-booking-status.pending {
    background: #fff3cd;
    color: #856404;
}

.wrb-booking-status.approved {
    background: #d4edda;
    color: #155724;
}

.wrb-booking-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .wrb-calendar-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .wrb-calendar-controls {
        justify-content: center;
    }
    
    .wrb-view-controls {
        justify-content: center;
    }
    
    .wrb-calendar-month th,
    .wrb-calendar-month td {
        height: 80px;
    }
    
    .wrb-day-slots {
        margin-top: 20px;
        height: calc(100% - 25px);
    }
    
    .wrb-slot-indicator {
        font-size: 9px;
        padding: 1px 2px;
    }
    
    .wrb-calendar-week {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .wrb-calendar-day-view {
        grid-template-columns: 60px 1fr;
    }
    
    .wrb-week-time-slot,
    .wrb-day-time-slot {
        font-size: 10px;
        padding: 3px;
    }
    
    .wrb-calendar-legend {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .wrb-calendar-content {
        padding: 10px;
    }
    
    .wrb-calendar-month th,
    .wrb-calendar-month td {
        height: 60px;
    }
    
    .wrb-day-number {
        font-size: 12px;
    }
    
    .wrb-day-slots {
        margin-top: 18px;
        height: calc(100% - 22px);
    }
    
    .wrb-slot-indicator {
        font-size: 8px;
        padding: 1px;
    }
}

/* Animation */
@keyframes wrb-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wrb-calendar-content {
    animation: wrb-fade-in 0.3s ease-out;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .wrb-slot-indicator.available {
        background: #000;
        color: #fff;
        border-left-color: #000;
    }
    
    .wrb-slot-indicator.booked {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .wrb-slot-indicator.pending {
        background: #666;
        color: #fff;
        border-left-color: #666;
    }
}