/* ══════════════════════════════════════════════════════════════════════
   STEPPED BOOKING FORM - ENHANCED UI
   ══════════════════════════════════════════════════════════════════════ */

:root {
    --step-primary: #1e7e74;
    --step-primary-light: #2d9c8f;
    --step-accent: #c87f32;
    --step-text: #333;
    --step-text-light: #666;
    --step-border: #e0e0e0;
    --step-bg-light: #f9fafb;
}

/* ── Step Indicator Header ────────────────────────────────── */
.booking-form-steps-header {
    background: linear-gradient(135deg, var(--step-primary) 0%, var(--step-primary-light) 100%);
    padding: 24px 20px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.booking-form-steps-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 100%;
}

.booking-form-steps-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.booking-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.booking-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
}

.booking-step-indicator.active .booking-step-number {
    background: white;
    color: var(--step-primary);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.booking-step-indicator.completed .booking-step-number {
    background: rgba(255, 255, 255, 0.9);
    color: var(--step-primary);
    border-color: white;
}

.booking-step-indicator.completed .booking-step-number::after {
    content: '✓';
    position: absolute;
    font-size: 20px;
    font-weight: bold;
}

.booking-step-indicator.completed .booking-step-number span {
    visibility: hidden;
}

.booking-step-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-step-indicator.active .booking-step-label {
    color: white;
    font-weight: 600;
}

/* ── Step Content Container ────────────────────────────────── */
.booking-steps-container {
    display: flex;
    flex-direction: column;
}

.booking-step-content {
    display: none;
    animation: fadeInStep 0.3s ease;
}

.booking-step-content.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Booking Fields in Steps ────────────────────────────────── */
.booking-step-content .booking-field {
    margin: 20px;
    background: white;
    border: 1px solid var(--step-border);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.booking-step-content .booking-field:hover {
    border-color: var(--step-accent);
    box-shadow: 0 2px 8px rgba(200, 127, 50, 0.08);
}

/* ── Step Navigation Buttons ────────────────────────────────── */
.booking-steps-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 0 20px 20px;
    margin-top: 8px;
}

.booking-step-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-step-btn.prev-step {
    background: #f0f0f0;
    color: var(--step-text);
    flex: 0 0 auto;
}

.booking-step-btn.prev-step:hover:not(:disabled) {
    background: #e0e0e0;
}

.booking-step-btn.next-step {
    background: var(--step-accent);
    color: white;
    margin-left: auto;
    flex: 0 0 auto;
}

.booking-step-btn.next-step:hover:not(:disabled) {
    background: #a96928;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 127, 50, 0.3);
}

.booking-step-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Final Submit Button (Step 3) ────────────────────────────── */
.book-now-btn {
    width: 100%;
    background-color: var(--step-accent);
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.book-now-btn:hover:not(.disabled) {
    background-color: #a96928;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(200, 127, 50, 0.3);
}

.book-now-btn.disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

/* ── Hide Elements Based on Booking Type ────────────────────────────── */
/* Step 1: Date & Time Selection */
.booking-field:has(> label:first-child:contains("Booking Dates")),
.booking-field:has(> label:first-child:contains("Appointment Date")),
.booking-field:has(> label:first-child:contains("Event Date")),
.booking-field:has(.date-input-group),
.booking-field:has(.time-slots-container),
.booking-field:has(.time-slots-title) {
    /* Will be wrapped in step 1 */
}

/* Step 2: Recurring & Optional Settings */
.booking-field.recurring-booking,
.booking-field:has(.people-selection),
.booking-field:has(.duration-display) {
    /* Will be wrapped in step 2 */
}

/* Step 3: Services & Pricing */
.booking-field.additional-services,
.booking-field:has(.pricing-rules-info),
.booking-field:has(.booking-total) {
    /* Will be wrapped in step 3 */
}

/* ── Pricing Rules Info Box ────────────────────────────────── */
.pricing-rules-info {
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    background: white;
    border-left: 4px solid var(--step-accent);
    animation: slideInFromTop 0.4s ease-out;
}

.pricing-rules-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--step-primary);
    font-weight: 600;
}

/* ── Responsive Design ────────────────────────────────── */
@media screen and (max-width: 768px) {
    .booking-form-steps-progress {
        gap: 8px;
    }

    .booking-step-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .booking-step-indicator.active .booking-step-number {
        transform: scale(1.05);
    }

    .booking-step-label {
        font-size: 11px;
    }

    .booking-steps-navigation {
        flex-wrap: wrap;
        gap: 8px;
    }

    .booking-step-btn {
        flex: 1 1 100%;
        min-width: auto;
    }

    .booking-step-btn.next-step {
        margin-left: auto;
        flex: 0 1 auto;
    }

    .booking-field {
        padding: 16px;
        margin-bottom: 16px;
    }
}

@media screen and (max-width: 480px) {
    .booking-form-steps-header {
        padding: 16px 12px;
    }

    .booking-form-steps-progress::before {
        top: 18px;
    }

    .booking-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .booking-step-label {
        font-size: 10px;
    }

    .booking-steps-navigation {
        padding: 0 12px 12px;
    }

    .booking-step-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ── Animations ────────────────────────────────── */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ── Ensure Existing Styles Don't Break ────────────────────────────── */
.wc-booking-form {
    display: flex;
    flex-direction: column;
}

.wc-booking-form-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ── Hide Original Header (If Present) ────────────────────────────── */
.booking-form-header:not(.booking-form-steps-header) {
    display: none;
}

/* ── Ensure Booking Footer Styles ────────────────────────────── */
.booking-field.booking-footer {
    background: var(--step-bg-light);
    padding: 20px;
}

/* ── Loading Indicator ────────────────────────────────── */
.loader-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 50px;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    background-color: var(--step-accent);
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-10px);
        opacity: 0.5;
    }
}
