/* =====================================================
   Hip Hip Let's Play - Booking & Classes/Events Styles
   ===================================================== */

/* Page Header */
.page-header {
    padding: calc(80px + var(--space-xl)) 0 var(--space-xl);
    background: var(--color-white);
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-sm);
}

.page-header p {
    color: var(--color-text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Programs/Classes Grid */
.programs-section {
    padding: var(--space-xl) 0 var(--space-3xl);
    background: var(--color-cream);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.program-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.program-card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.program-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-card-image svg {
    width: 60px;
    height: 60px;
    color: var(--color-white);
    opacity: 0.6;
}

.program-card-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.program-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.program-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.program-card-content p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    font-size: 0.9375rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.program-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-sage-dark);
    margin-bottom: var(--space-md);
}

/* Sessions List (Under Programs) */
.sessions-section {
    margin-top: var(--space-2xl);
}

.sessions-section h2 {
    margin-bottom: var(--space-lg);
}

/* Calendar View */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.calendar-nav h3 {
    font-size: 1.25rem;
}

.calendar-nav-buttons {
    display: flex;
    gap: var(--space-xs);
}

.calendar-nav-buttons button {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-white);
    border: 2px solid var(--color-cream-dark);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav-buttons button:hover {
    border-color: var(--color-sage);
}

/* Date Picker Style Sessions */
.sessions-by-date {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.date-group {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.date-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-cream-dark);
}

.date-group-header .date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: var(--space-xs);
    background: var(--color-sage-dark);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    text-align: center;
}

.date-badge .weekday {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date-badge .day {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
}

.date-group-header h4 {
    font-size: 1rem;
}

.date-group-sessions {
    padding: var(--space-sm);
}

/* Session Card (Compact) */
.session-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.session-card:hover {
    background: var(--color-cream);
}

.session-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.session-time {
    font-weight: 500;
    min-width: 100px;
}

.session-details h5 {
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.session-details p {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.session-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.session-spots {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.session-spots.low {
    color: #e67e22;
    font-weight: 500;
}

.session-spots.sold-out {
    color: #e74c3c;
    font-weight: 500;
}

/* Events Grid */
.events-section {
    padding: var(--space-xl) 0 var(--space-3xl);
    background: var(--color-cream);
}

.events-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.event-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.event-card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-warm) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-type-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 0.25rem 0.75rem;
    background: var(--color-white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    text-align: center;
}

.event-date-badge .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-sage-dark);
    font-weight: 600;
}

.event-date-badge .day {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
}

.event-card-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.event-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.event-card-content > p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    font-size: 0.9375rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.event-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-sage-dark);
}

.event-spots {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Booking Modal */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: var(--space-md);
}

.booking-modal.active {
    opacity: 1;
    visibility: visible;
}

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

.booking-modal.active .booking-modal-content {
    transform: scale(1);
}

.booking-modal-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    background: var(--color-cream);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    z-index: 1;
}

.booking-modal-close:hover {
    background: var(--color-cream-dark);
    color: var(--color-text);
}

.booking-step {
    padding: var(--space-xl);
}

.booking-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.booking-header h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.booking-item-title {
    color: var(--color-sage-dark);
    font-weight: 500;
}

/* Booking Details */
.booking-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-cream);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.booking-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
}

.detail-value {
    font-weight: 500;
}

/* Child Selection */
.booking-child-selection {
    margin-bottom: var(--space-lg);
}

.booking-child-selection h4 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.child-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.child-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.child-option:hover {
    background: var(--color-cream-dark);
}

.child-option input {
    width: auto;
}

.child-option input:checked + .child-option-content {
    color: var(--color-sage-dark);
}

.child-option.ineligible {
    opacity: 0.6;
    cursor: not-allowed;
}

.child-option-content {
    display: flex;
    justify-content: space-between;
    flex: 1;
}

.child-name {
    font-weight: 500;
}

.child-age {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.child-ineligible {
    font-size: 0.75rem;
    color: #e74c3c;
}

.no-children-message {
    text-align: center;
    color: var(--color-text-light);
    padding: var(--space-md);
}

.add-child-btn {
    font-size: 0.875rem;
}

/* Booking Summary */
.booking-summary {
    padding: var(--space-md);
    background: var(--color-cream);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-cream-dark);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-weight: 600;
    font-size: 1.125rem;
}

.summary-label {
    color: var(--color-text-light);
}

/* Booking Notes */
.booking-notes {
    margin-bottom: var(--space-lg);
}

.booking-notes label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.booking-notes textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--color-cream-dark);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 80px;
}

.booking-notes textarea:focus {
    outline: none;
    border-color: var(--color-sage);
}

/* Booking Actions */
.booking-actions {
    display: flex;
    gap: var(--space-sm);
}

.booking-actions .btn {
    flex: 1;
}

/* Booking Success */
.booking-success {
    text-align: center;
    padding: var(--space-lg) 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: rgba(150, 177, 148, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--color-sage-dark);
}

.booking-success h3 {
    font-size: 1.5rem;
    color: var(--color-sage-dark);
    margin-bottom: var(--space-sm);
}

.booking-success p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

/* Booking Loading */
.booking-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
}

.booking-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-cream-dark);
    border-top-color: var(--color-sage-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--space-md);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-text);
    color: var(--color-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--color-sage-dark);
}

.toast-error {
    background: #e74c3c;
}

.toast-info {
    background: #3498db;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
}

/* Loading Spinner (Generic) */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-cream-dark);
    border-top-color: var(--color-sage-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--space-sm);
}

.loading-spinner p {
    color: var(--color-text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .programs-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }

    .session-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .session-meta {
        width: 100%;
        justify-content: space-between;
    }

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

    .booking-actions {
        flex-direction: column;
    }

    .toast {
        left: var(--space-md);
        right: var(--space-md);
    }
}
