/* Schedule Page Specific Styles */

/* Class Type Colors */
:root {
    --color-5k: #10b981;
    --color-half: #3b82f6;
    --color-marathon: #8b5cf6;
    --color-ultra: #f59e0b;
    --color-technique: #ec4899;
    --color-group: #6366f1;
}

/* Schedule Header */
.schedule-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 120px 24px 60px;
    text-align: center;
}

.schedule-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 16px;
}

.schedule-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.schedule-note {
    opacity: 0.7;
    font-size: 0.9375rem;
}

/* Schedule Layout */
.schedule-main {
    padding: 60px 0;
    background: var(--bg-alt);
    min-height: 60vh;
}

.schedule-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Filters Sidebar */
.schedule-filters {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filter-section h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.filter-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.filter-label {
    font-size: 0.9375rem;
    color: var(--text-light);
}

.filter-5k::before,
.filter-half::before,
.filter-marathon::before,
.filter-ultra::before,
.filter-technique::before,
.filter-group::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.filter-5k::before { background: var(--color-5k); }
.filter-half::before { background: var(--color-half); }
.filter-marathon::before { background: var(--color-marathon); }
.filter-ultra::before { background: var(--color-ultra); }
.filter-technique::before { background: var(--color-technique); }
.filter-group::before { background: var(--color-group); }

/* Coach Card */
.coach-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.coach-avatar {
    width: 80px;
    height: 80px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.coach-info h4 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.coach-info p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.coach-location {
    display: inline-block;
    background: var(--bg-alt);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.coach-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.coach-stat {
    text-align: center;
}

.coach-stat .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.coach-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Legend */
.legend {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.legend h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-5k { background: var(--color-5k); }
.dot-half { background: var(--color-half); }
.dot-marathon { background: var(--color-marathon); }
.dot-ultra { background: var(--color-ultra); }
.dot-technique { background: var(--color-technique); }
.dot-group { background: var(--color-group); }

/* Schedule Content */
.schedule-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.week-navigation h2 {
    font-size: 1.25rem;
}

.week-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-alt);
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.week-nav-btn:hover {
    background: var(--border-light);
}

.week-nav-btn svg {
    width: 16px;
    height: 16px;
}

/* Schedule Grid */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.day-group {
    margin-bottom: 24px;
}

.day-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.day-header.today {
    color: var(--accent);
}

.day-classes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Class Card */
.class-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    padding: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border-left: 4px solid var(--color-5k);
    transition: var(--transition);
    cursor: pointer;
}

.class-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.class-card.type-5k { border-left-color: var(--color-5k); }
.class-card.type-half_marathon { border-left-color: var(--color-half); }
.class-card.type-marathon { border-left-color: var(--color-marathon); }
.class-card.type-ultra { border-left-color: var(--color-ultra); }
.class-card.type-technique { border-left-color: var(--color-technique); }
.class-card.type-group_run { border-left-color: var(--color-group); }

.class-time {
    text-align: center;
    min-width: 70px;
}

.class-time .time {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.class-time .duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.class-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.class-info .coach {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 4px;
}

.class-info .location {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.class-info .location svg {
    width: 14px;
    height: 14px;
}

.class-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.class-type-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-5k);
}

.type-5k .class-type-badge { background: rgba(16, 185, 129, 0.1); color: var(--color-5k); }
.type-half_marathon .class-type-badge { background: rgba(59, 130, 246, 0.1); color: var(--color-half); }
.type-marathon .class-type-badge { background: rgba(139, 92, 246, 0.1); color: var(--color-marathon); }
.type-ultra .class-type-badge { background: rgba(245, 158, 11, 0.1); color: var(--color-ultra); }
.type-technique .class-type-badge { background: rgba(236, 72, 153, 0.1); color: var(--color-technique); }
.type-group_run .class-type-badge { background: rgba(99, 102, 241, 0.1); color: var(--color-group); }

.spots-badge {
    font-size: 0.8125rem;
    color: var(--success);
    font-weight: 500;
}

.spots-badge.low {
    color: var(--warning);
}

.spots-badge.full {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.class-card.sold-out {
    opacity: 0.78;
}

.class-card.sold-out .class-time .time {
    text-decoration: line-through;
    text-decoration-color: var(--accent);
}

/* Loading */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Classes */
.no-classes {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

.no-classes svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-classes p {
    margin-bottom: 20px;
}

/* Booking Section */
.booking-section {
    padding: 80px 24px;
    background: white;
}

.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

.booking-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 16px;
}

.booking-info > p {
    color: var(--text-light);
    margin-bottom: 32px;
}

.booking-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-item {
    display: flex;
    gap: 16px;
}

.detail-item svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-item strong {
    display: block;
    margin-bottom: 4px;
}

.detail-item span {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.detail-item small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 4px;
}

/* Booking Form */
.booking-form {
    background: var(--bg-alt);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.selected-class {
    background: white;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.selected-class h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.selected-class-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.selected-class-info span {
    background: var(--bg-alt);
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.clear-selection {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8125rem;
    cursor: pointer;
    margin-top: 12px;
    text-decoration: underline;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.booking-form .form-group {
    margin-bottom: 20px;
}

.booking-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.booking-form input,
.booking-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.booking-form input:focus,
.booking-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.booking-form textarea {
    resize: vertical;
    min-height: 100px;
}

.booking-form .btn svg {
    width: 18px;
    height: 18px;
}

.form-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.modal-header {
    padding: 32px 32px 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    padding-right: 32px;
}

.modal-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.modal-body {
    padding: 24px 32px;
}

.modal-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-light);
}

.modal-detail svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.modal-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    color: var(--text-light);
    font-size: 0.9375rem;
}

.modal-footer {
    padding: 16px 32px 32px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .schedule-layout {
        grid-template-columns: 1fr;
    }

    .schedule-filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .booking-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .schedule-header h1 {
        font-size: 2rem;
    }

    .schedule-filters {
        grid-template-columns: 1fr;
    }

    .week-navigation {
        flex-wrap: wrap;
        gap: 16px;
    }

    .week-navigation h2 {
        order: -1;
        width: 100%;
        text-align: center;
    }

    .class-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .class-time {
        display: flex;
        gap: 8px;
        text-align: left;
    }

    .class-meta {
        flex-direction: row;
        justify-content: space-between;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .booking-form {
        padding: 24px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}
