/**
 * Booking Progress Indicator CSS
 * Horizontal step indicator with responsive mobile layout
 */

/* ===========================
   Progress Indicator - Block
   =========================== */

.booking-progress {
    width: 100%;
    padding: 12px 0;
    margin-bottom: 16px;
}

.booking-progress__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.booking-progress__container::-webkit-scrollbar {
    height: 6px;
}

.booking-progress__container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.booking-progress__container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* ===========================
   Progress Indicator - Elements
   =========================== */

.booking-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.booking-progress-step__circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    background: #FFFFFF;
    border: 3px solid #d1d5db;
    color: #9ca3af;
}

.booking-progress-step__label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Connecting line between steps */
.booking-progress-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #d1d5db;
    z-index: 1;
    transition: background 0.3s ease;
}

.booking-progress-step:last-child::after {
    display: none;
}

/* ===========================
   Progress Indicator - Modifiers
   =========================== */

/* Completed Step */
.booking-progress-step--completed .booking-progress-step__circle {
    background: #059669;
    border-color: #059669;
    color: #FFFFFF;
}

.booking-progress-step--completed .booking-progress-step__circle::after {
    content: "✓";
    font-size: 18px;
}

.booking-progress-step--completed .booking-progress-step__label {
    color: #059669 !important;
    font-weight: 600 !important;
}

.booking-progress-step--completed::after {
    background: #059669;
}

/* Active Step */
.booking-progress-step--active .booking-progress-step__circle {
    background: #2563eb;
    border-color: #2563eb;
    color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1);
    }
}

.booking-progress-step--active .booking-progress-step__circle::after {
    content: "•";
    font-size: 24px;
}

.booking-progress-step--active .booking-progress-step__label {
    color: #2563eb !important;
    font-weight: 700 !important;
}

/* Pending Step */
.booking-progress-step--pending .booking-progress-step__circle {
    background: #FFFFFF;
    border-color: #d1d5db;
    color: #9ca3af;
}

.booking-progress-step--pending .booking-progress-step__label {
    color: #6b7280 !important;
    font-weight: 500 !important;
}

/* Clickable completed steps */
.booking-progress-step--completed.booking-progress-step--clickable {
    cursor: pointer;
}

.booking-progress-step--completed.booking-progress-step--clickable:hover .booking-progress-step__circle {
    background: #047857;
    border-color: #047857;
    transform: scale(1.1);
}

.booking-progress-step--completed.booking-progress-step--clickable:focus {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ===========================
   Mobile Vertical Layout
   =========================== */

@media (max-width: 767px) {
    .booking-progress__container--vertical {
        flex-direction: column;
        align-items: flex-start;
    }

    .booking-progress__container--vertical .booking-progress-step {
        flex-direction: row;
        width: 100%;
        min-width: auto;
        text-align: left;
        gap: 12px;
        padding: 10px 0;
    }

    .booking-progress__container--vertical .booking-progress-step__label {
        white-space: normal;
        text-align: left;
    }

    .booking-progress__container--vertical .booking-progress-step::after {
        top: 50px;
        left: 20px;
        width: 3px;
        height: 100%;
    }

    .booking-progress__container--vertical .booking-progress-step:last-child::after {
        display: none;
    }
}

/* ===========================
   Mobile Layout (< 768px)
   =========================== */

@media (max-width: 767.98px) {
    .booking-progress {
        padding: 16px 0 10px 0;
        margin-bottom: 20px;
    }

    .booking-progress-step {
        min-width: 0;
        padding: 0 2px;
    }

    .booking-progress-step__circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-width: 2.5px;
    }

    .booking-progress-step::after {
        top: 18px;
        height: 2.5px;
    }

    .booking-progress-step__label {
        font-size: 11px;
        white-space: normal;
        line-height: 1.2;
        max-width: 75px;
        text-align: center;
    }
}

/* ===========================
   Tablet Layout (768px+)
   =========================== */

@media (min-width: 768px) {
    .booking-progress {
        padding: 16px 0;
    }

    .booking-progress-step {
        min-width: 100px;
    }

    .booking-progress-step__circle {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .booking-progress-step__label {
        font-size: 14px;
    }

    .booking-progress-step::after {
        top: 24px;
    }
}

/* ===========================
   Desktop Layout (1024px+)
   =========================== */

@media (min-width: 1024px) {
    .booking-progress {
        padding: 20px 0;
        margin-bottom: 20px;
    }

    .booking-progress-step {
        min-width: 120px;
    }

    .booking-progress-step__circle {
        width: 56px;
        height: 56px;
        font-size: 20px;
        border-width: 4px;
    }

    .booking-progress-step__label {
        font-size: 15px;
    }

    .booking-progress-step::after {
        top: 28px;
        height: 4px;
    }
}

/* ===========================
   High Contrast Mode
   =========================== */

@media (prefers-contrast: high) {
    .booking-progress-step__circle {
        border-width: 4px;
    }

    .booking-progress-step--active .booking-progress-step__circle {
        border-width: 5px;
    }
}

/* ===========================
   Reduced Motion
   =========================== */

@media (prefers-reduced-motion: reduce) {
    .booking-progress-step__circle,
    .booking-progress-step__label,
    .booking-progress-step::after {
        transition: none;
    }

    .booking-progress-step--active .booking-progress-step__circle {
        animation: none;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    }

    .booking-progress-step--completed.booking-progress-step--clickable:hover .booking-progress-step__circle {
        transform: none;
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .booking-progress {
        padding: 10px 0;
        margin-bottom: 20px;
    }

    .booking-progress-step__circle {
        box-shadow: none !important;
        animation: none !important;
    }

    .booking-progress-step--clickable {
        cursor: default;
    }
}
