/**
 * Activity Booking Frontend Styles
 * File: assets/css/frontend.css
 */

/* Calendar Container */
#activity-calendar,
#all-activities-calendar {
    max-width: 900px;
    margin: 20px 0;
}

.calendar-container,
.activities-calendar-container {
    padding: 20px;
    background: #fff;
    border-radius: 5px;
}

/* Activity Details */
.activity-details {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

/* Calendar Navigation */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.calendar-navigation button {
    padding: 8px 15px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
}

.calendar-navigation button:hover {
    background: #555;
}

.calendar-navigation h3 {
    margin: 0;
    font-size: 1.2em;
}

/* Calendar Grid */
#calendar-grid,
#all-calendar-grid {
    margin: 20px 0;
}

.calendar-grid,
.all-activities-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #ddd;
    padding: 2px;
    border-radius: 5px;
}

/* Calendar Days */
.calendar-day,
.all-calendar-day {
    padding: 10px 5px;
    min-height: 60px;
    text-align: center;
    border: 1px solid #ddd;
    cursor: pointer;
    background: #fff;
    position: relative;
}

.calendar-day.other-month,
.all-calendar-day.other-month {
    background: #fafafa;
    color: #ccc;
}

.calendar-day.available {
    background: #e8f5e9;
    border-color: #4caf50;
}

.calendar-day.available:hover {
    background: #c8e6c9;
}

.calendar-day.full {
    background: #ffebee;
    border-color: #f44336;
    cursor: not-allowed;
}

.calendar-day.waitlist {
    background: #fff3e0;
    border-color: #ff9800;
    cursor: pointer;
}

.calendar-day.waitlist:hover {
    background: #ffe0b2;
}

.calendar-spots.waitlist-text {
    color: #ff9800;
}

.calendar-day.excluded {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #2196f3;
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 2px solid #ff9800;
}

/* Calendar Header */
.calendar-header {
    font-weight: bold;
    background: #333;
    color: white;
    padding: 10px;
    text-align: center;
}

/* Calendar Content */
.calendar-day-number,
.day-number {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
}

.calendar-spots {
    font-size: 11px;
    color: #4caf50;
}

/* Activity Items (All Activities Calendar) */
.all-calendar-day.has-activities {
    background: #f0f8ff;
    cursor: pointer;
}

.all-calendar-day.has-activities:hover {
    background: #e0f0ff;
}

.activity-item {
    font-size: 11px;
    padding: 2px 4px;
    margin: 2px 0;
    background: #4caf50;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-item.full {
    background: #f44336;
}

.activity-item.limited {
    background: #ff9800;
}

.activity-item.waitlist-item {
    background: #ff9800;
    font-style: italic;
}

/* Book Now on Class Cards */
article.class .bottom .btn {
    margin-top: 10px;
}

/* Booking Button */
.booking-button {
    margin-top: 20px;
    padding: 12px 24px;
    background: #4caf50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    width: 100%;
}

.booking-button:hover {
    background: #45a049;
}

.booking-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Booking Form Container */
.booking-form-container {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    display: none;
}

.booking-form-container.active {
    display: block;
}

/* Booking Summary */
.booking-summary {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.booking-summary h4 {
    margin-top: 0;
}

/* Activity Details Modal */
#activity-details-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-grid,
    .all-activities-grid {
        gap: 1px;
    }
    
    .calendar-day,
    .all-calendar-day {
        padding: 5px 2px;
        min-height: 50px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-spots,
    .activity-item {
        font-size: 10px;
    }
    
    #activity-details-modal {
        width: 95%;
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .calendar-navigation button,
    .booking-button,
    .no-print {
        display: none !important;
    }
    
    .calendar-container {
        padding: 0;
    }
    
    .calendar-grid {
        gap: 0;
        padding: 0;
    }
}