/**
 * Booking Page Styles
 * Extracted from inline styles in booking.php
 * Uses site-wide CSS variables and design system
 */

/* ============ BOOKING PAGE SPECIFICS ============ */
.booking-page .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Step hint text */
.step-hint {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: var(--text-sm);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
}

/* ============ BOOKING CONTAINER ============ */
.booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Single page layout - wider container */
.booking-container.booking-single-page {
    max-width: 1100px;
}

/* ============ SERVICE PILL TOGGLE ============ */
.service-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.service-pill {
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--color-border);
    background: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50px;
    white-space: nowrap;
}

.service-pill:hover {
    border-color: var(--color-primary);
}

.service-pill.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.service-pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.service-pill .pill-price {
    font-weight: 600;
    margin-left: 0.25rem;
}

/* ============ TWO COLUMN LAYOUT ============ */
.booking-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .booking-layout {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 2rem;
        align-items: start;
    }
}

@media (min-width: 900px) {
    .booking-layout {
        grid-template-columns: 1fr 380px;
    }
}

/* Calendar Column */
.booking-calendar-col {
    min-width: 0; /* Prevent grid blowout */
}

.booking-calendar-col h3 {
    margin-bottom: 1rem;
}

/* ============ SIDEBAR ============ */
.booking-sidebar {
    background: var(--color-background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
}

@media (min-width: 768px) {
    .booking-sidebar {
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

.sidebar-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-section h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Sidebar slots list - matches calendar grid sizing */
.sidebar-section .slots-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.sidebar-section .slot-btn {
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    min-height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.sidebar-section .slot-btn .slot-time {
    font-weight: var(--font-medium);
}

.sidebar-section .slot-btn .slot-price {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sidebar-section .slot-btn.selected .slot-price {
    color: rgba(255, 255, 255, 0.85);
}

/* Sidebar form */
.sidebar-section .form-group {
    margin-bottom: 0.75rem;
}

.sidebar-section .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.sidebar-section .form-input {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

/* Sidebar payment summary */
.sidebar-payment {
    background: var(--color-white);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.sidebar-payment .payment-total {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Placeholder state */
.sidebar-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted);
}

.sidebar-placeholder p {
    font-size: 0.9rem;
}

.booking-container h1 {
    font-family: var(--font-heading);
    font-weight: var(--font-medium);
}

.booking-container h3 {
    font-family: var(--font-heading);
    font-weight: var(--font-medium);
    margin-bottom: 1rem;
}

.booking-container h4 {
    font-family: var(--font-heading);
    font-weight: var(--font-medium);
}

.booking-container h5 {
    font-family: var(--font-heading);
    font-weight: var(--font-medium);
}

/* ============ STEP ANIMATION ============ */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ PROGRESS BAR ============ */
.progress-bar {
    height: 4px;
    background: var(--color-border);
    margin: 1rem 0 2rem 0;
    width: 100%;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

/* ============ SERVICE CARDS ============ */
.service-card {
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-white);
}

.service-card:hover,
.service-card.selected {
    border-color: var(--color-primary);
    background: var(--color-background-alt);
}

.service-card h4 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: 0.5rem;
}

.service-card p:last-child {
    color: var(--color-text);
    font-weight: var(--font-medium);
}

/* ============ CALENDAR STYLES ============ */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header h5 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.cal-day-header {
    text-align: center;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cal-day {
    border: 1px solid var(--color-border);
    padding: 0.5rem;
    min-height: 90px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
}

.cal-day:hover:not(.disabled) {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(139, 0, 0, 0.15);
}

.cal-day.selected {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #fff5f5 0%, var(--color-white) 100%);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.cal-day.disabled {
    background: var(--color-background-alt);
    color: var(--color-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.cal-date {
    font-weight: var(--font-semibold);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    color: var(--color-text);
}

/* Pricing display */
.cal-price {
    font-size: 0.8rem;
    color: #2c3e50;
    font-weight: var(--font-semibold);
}

.cal-price .price-from {
    font-size: 0.65rem;
    font-weight: var(--font-normal);
    color: var(--color-text-muted);
}

.cal-price.cal-price-discounted {
    color: #27ae60;
}

.cal-price.cal-price-discounted .price-from {
    color: #27ae60;
}

/* Status badges */
.cal-status {
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-top: auto;
    text-align: center;
    font-weight: var(--font-medium);
}

.cal-earlybird {
    background: #e8f5e9;
    color: #2e7d32;
}

.cal-deal {
    background: #fff3e0;
    color: #e65100;
}

.cal-savings {
    background: #e3f2fd;
    color: #1565c0;
}

.cal-popular {
    background: #fff8e1;
    color: #f57c00;
    font-size: 0.6rem;
}

.cal-full {
    background: #ffebee;
    color: #c62828;
}

.cal-closed {
    background: #f5f5f5;
    color: #9e9e9e;
}

.cal-event {
    background: #fff3e0;
    color: #e65100;
}

/* ============ TIME SLOTS ============ */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.slots-container {
    margin-top: 2rem;
}

.slots-container h5 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.slots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.slot-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    font-size: var(--text-sm);
}

.slot-btn:hover {
    border-color: var(--color-primary);
}

.slot-btn.selected {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ============ PRICING DISPLAY ============ */
.price-tag {
    font-weight: var(--font-bold);
    font-size: 1.1em;
}

.surge-badge {
    font-size: 0.7em;
    background: #ffeeba;
    color: #856404;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    display: inline-block;
}

.original-price {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: 0.8em;
}

/* ============ NAVIGATION BUTTONS ============ */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

/* ============ FORM STYLES ============ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Phone Input with Country Selector */
.phone-input-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.phone-country-select,
.form-group .phone-country-select {
    flex-shrink: 0;
    width: 90px !important;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--color-background-alt);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.5rem;
}

.phone-country-select:focus {
    outline: none;
    border-color: var(--color-primary);
    z-index: 1;
}

.phone-input-wrapper .phone-number-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: border-color 0.2s ease;
}

.phone-input-wrapper .phone-number-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.booking-form-section {
    background: var(--color-background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.booking-form-section h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ============ PROMO CODE ============ */
.promo-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.promo-row .form-group {
    flex-grow: 1;
    margin-bottom: 0;
}

.promo-msg {
    font-size: var(--text-sm);
    margin-bottom: 1rem;
}

.promo-msg.success {
    color: #27ae60;
}

.promo-msg.error {
    color: #c62828;
}

/* ============ PAYMENT SUMMARY ============ */
.payment-summary {
    background: var(--color-background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.payment-summary h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.payment-total {
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
}

.payment-fee-note {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* ============ RESCHEDULE NOTICE ============ */
.reschedule-notice {
    background: #fff8e6;
    border: 1px solid #f5d87f;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.reschedule-notice strong {
    display: block;
    margin-bottom: 0.25rem;
}

.reschedule-notice .details {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.reschedule-notice .fee-info {
    margin-top: 0.5rem;
    font-size: var(--text-sm);
}

.reschedule-notice .fee-info.free {
    color: #27ae60;
}

.reschedule-notice .fee-info.paid {
    color: #856404;
}

/* ============ MOBILE RESPONSIVE ============ */

/* Service pill mobile */
@media (max-width: 767px) {
    .service-toggle {
        gap: 0.35rem;
        margin-bottom: 1.5rem;
    }

    .service-pill {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .booking-sidebar {
        margin-top: 1.5rem;
    }
}

@media (max-width: 600px) {
    .booking-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .booking-container h1 {
        font-size: 1.75rem;
    }

    .booking-container h3 {
        font-size: 1.1rem;
    }

    /* Calendar mobile optimization */
    .calendar-grid {
        gap: 0.25rem;
    }

    .cal-day {
        padding: 0.35rem;
        min-height: 70px;
        border-radius: 6px;
    }

    .cal-date {
        font-size: 0.85rem;
        margin-bottom: 0.15rem;
    }

    .cal-price {
        font-size: 0.7rem;
    }

    .cal-price-original {
        font-size: 0.6rem;
        display: none; /* Hide strikethrough on mobile to save space */
    }

    .cal-status {
        font-size: 0.55rem;
        padding: 1px 3px;
    }

    /* Day headers */
    .cal-day-header {
        font-size: 0.7rem;
        padding: 0.25rem;
    }

    /* Slots grid */
    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .slot-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Navigation buttons */
    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons .btn {
        width: 100%;
    }

    /* Month navigation */
    .calendar-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .calendar-header .btn-outline {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Service cards */
    .service-card {
        padding: 1rem;
    }
}

/* Smaller phones */
@media (max-width: 360px) {
    .cal-day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .cal-date {
        font-size: 0.75rem;
    }

    .cal-price {
        font-size: 0.65rem;
    }

    .cal-status {
        display: none; /* Hide discount badge on very small screens */
    }
}

/* ============ SLOT HOLD TIMER ============ */
.hold-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f0f7ff;
    border: 1px solid #bdd8f5;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: #1a5276;
    margin-bottom: 1rem;
}

.hold-timer svg {
    flex-shrink: 0;
}

.hold-timer-text {
    font-variant-numeric: tabular-nums;
}

.hold-timer--warning {
    background: #fff3e0;
    border-color: #ffcc80;
    color: #e65100;
}

/* Hold expired modal */
.hold-expired-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    animation: holdFadeIn 0.2s ease;
}

@keyframes holdFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hold-expired-card {
    background: #fff;
    max-width: 380px;
    width: 100%;
    border-radius: 8px;
    text-align: center;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: holdSlideUp 0.25s ease;
}

@keyframes holdSlideUp {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.hold-expired-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: #fff3e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hold-expired-icon svg {
    width: 24px;
    height: 24px;
    color: #e65100;
}

.hold-expired-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.hold-expired-card p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.hold-expired-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
}

.hold-expired-btn:hover {
    background: var(--color-primary-dark);
}

/* Slot being held (loading state) */
.slot-btn--holding {
    opacity: 0.6;
    pointer-events: none;
}

/* Slot taken by someone else */
.slot-btn--taken {
    opacity: 0.4;
    text-decoration: line-through;
    pointer-events: none;
    cursor: not-allowed;
}
