/**
 * Booking Calendar - Playtomic Style
 * Interactive, Visual, Mobile-First
 */

.pcs-booking-calendar {
    background: var(--color-bg-primary);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
}

/* === DATE SELECTOR === */
.pcs-date-selector {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-lg);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pcs-date-selector::-webkit-scrollbar {
    display: none;
}

.pcs-date-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-width: 80px;
    padding: var(--space-md);
    background: var(--color-surface);
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pcs-date-card:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.pcs-date-card.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.pcs-date-day {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: var(--space-xs);
}

.pcs-date-number {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.pcs-date-month {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    margin-top: var(--space-xs);
}

/* === COURTS & SLOTS GRID === */
.pcs-calendar-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1px;
    background: var(--color-bg-tertiary);
    margin: var(--space-lg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.pcs-time-column {
    background: var(--color-surface);
    padding: var(--space-sm);
}

.pcs-time-slot {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-bg-tertiary);
}

.pcs-courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
}

.pcs-court-column {
    background: var(--color-surface);
}

.pcs-court-header {
    padding: var(--space-md);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
    background: var(--color-primary-alpha);
}

.pcs-court-slots {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* === SLOT CARD === */
.pcs-slot-card {
    height: 60px;
    padding: var(--space-sm);
    background: var(--color-surface);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.pcs-slot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.pcs-slot-card:hover::before {
    opacity: 0.1;
}

.pcs-slot-card.available {
    border-color: var(--color-success);
    background: rgba(40, 167, 69, 0.05);
}

.pcs-slot-card.available:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-alpha);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.pcs-slot-card.booked {
    background: var(--color-bg-tertiary);
    color: var(--color-text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

.pcs-slot-card.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary-dark);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
    z-index: 10;
}

.pcs-slot-price {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.pcs-slot-duration {
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

/* === MOBILE VIEW === */
@media (max-width: 767px) {
    .pcs-calendar-grid {
        grid-template-columns: 60px 1fr;
        margin: var(--space-md);
    }
    
    .pcs-courts-grid {
        grid-template-columns: 1fr;
    }
    
    .pcs-slot-card {
        height: 50px;
    }
    
    .pcs-slot-price {
        font-size: var(--font-size-base);
    }
}

/* === BOOKING WIZARD === */
.pcs-booking-wizard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    box-shadow: var(--shadow-2xl);
    padding: var(--space-lg);
    transform: translateY(100%);
    transition: transform var(--transition-base);
    z-index: var(--z-modal);
    max-height: 80vh;
    overflow-y: auto;
}

.pcs-booking-wizard.active {
    transform: translateY(0);
}

.pcs-wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-bg-tertiary);
}

.pcs-wizard-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.pcs-wizard-step {
    margin-bottom: var(--space-xl);
}

.pcs-wizard-step-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.pcs-wizard-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.pcs-wizard-actions .btn {
    flex: 1;
}

/* === ANIMATED CHECK MARK === */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.pcs-success-checkmark {
    width: 80px;
    height: 80px;
    margin: var(--space-xl) auto;
}

.pcs-success-checkmark circle {
    stroke: var(--color-success);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 100;
    animation: checkmark 0.6s ease-in-out;
}

.pcs-success-checkmark path {
    stroke: var(--color-success);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmark 0.4s 0.3s ease-in-out forwards;
}
