/**
 * Frontend Booking Styles
 */

/* Booking Form Container */
.wc-instructor-booking-form {
    margin: 30px 0;
    padding: 25px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wc-instructor-booking-form h3 {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-size: 20px;
}

/* Form Sections */
.booking-form-section {
    margin-bottom: 25px;
}

.booking-form-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.booking-form-section .required {
    color: #d32f2f;
    margin-left: 3px;
}

.booking-form-section input[type="text"],
.booking-form-section select {
    width: 100%;
    max-width: 450px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.booking-form-section input[type="text"]:focus,
.booking-form-section select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.booking-form-section select:disabled,
.booking-form-section input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading Indicator */
.booking-loading {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 0;
    color: #0073aa;
    font-style: italic;
    font-size: 14px;
}

/* Datepicker Customization */
.ui-datepicker {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ui-datepicker .ui-datepicker-header {
    background: #0073aa;
    color: white;
    border-radius: 6px 6px 0 0;
    padding: 10px;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
}

.ui-datepicker .ui-state-default {
    text-align: center;
    padding: 8px;
    border-radius: 4px;
}

.ui-datepicker .ui-state-active {
    background: #0073aa;
    color: white;
}

.ui-datepicker .ui-state-disabled {
    opacity: 0.3;
}

/* Instructor Info Section */
.booking-instructor-info {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instructor-profile {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.instructor-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0073aa;
    flex-shrink: 0;
}

.instructor-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #0073aa;
}

.instructor-info p {
    margin: 8px 0;
    line-height: 1.6;
    color: #666;
}

.instructor-info p strong {
    color: #333;
}

/* Booking Summary */
.booking-summary {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 2px solid #4caf50;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.booking-summary h4 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.booking-summary h4:before {
    content: "✓";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background: #4caf50;
    color: white;
    text-align: center;
    line-height: 24px;
    border-radius: 50%;
    font-weight: bold;
}

.booking-summary .summary-content {
    margin: 0;
    line-height: 1.8;
    color: #2e7d32;
}

.booking-summary .summary-content strong {
    color: #1b5e20;
}

/* Calendar Styles */
.instructor-booking-calendar {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #0073aa;
    color: white;
}

.calendar-header h3 {
    margin: 0;
    font-size: 20px;
}

.calendar-header button {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.calendar-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    text-align: center;
}

.calendar-table td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: top;
    min-height: 80px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.calendar-table td.empty {
    background: #fafafa;
    cursor: default;
}

.calendar-table td.past {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-table td.today {
    background: #e3f2fd;
    font-weight: bold;
}

.calendar-table td.available:hover {
    background: #f0f8ff;
}

.calendar-table td.unavailable {
    background: #ffebee;
    color: #c62828;
}

.calendar-table .day-number {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-table .slots {
    display: block;
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-instructor-booking-form {
        padding: 20px 15px;
    }
    
    .booking-form-section input[type="text"],
    .booking-form-section select {
        max-width: 100%;
    }
    
    .instructor-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .instructor-photo {
        width: 80px;
        height: 80px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-table td {
        padding: 10px 5px;
        font-size: 14px;
    }
}