/**
 * Promotion Progress Bar - Progressive Segments Design
 * Based on user screenshots: segments + gift badge + range + next threshold
 */

.promotion-progress-bar-wrapper {
    width: 100%;
    padding: 10px 20px;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.promotion-progress-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: nowrap;
}

/* Info Icon + Promotion Text */
.promotion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.promotion-info-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.promotion-text {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

/* Progress Area - Contains segments + gift badge */
.progress-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Progress Segments Container */
.progress-segments {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Individual Segment - Rectangular blocks */
.progress-segment {
    width: 80px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.3);
 //   border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Filled segment - Black/dark fill */
.progress-segment.filled {
    background-color: rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: segmentFill 0.4s ease-out;
}

.promotion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@keyframes segmentFill {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Gift Badge - ALWAYS visible */
.gift-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Active state - when gifts > 0 */
.gift-badge.active {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: giftAppear 0.5s ease-out;
}

.gift-badge.active .gift-text {
    color: #000;
}

.gift-icon {
    font-size: 16px;
}

@keyframes giftAppear {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Current Range */
.current-range {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    white-space: nowrap;
}

/* Plus Separator */
.separator-plus {
    font-size: 20px;
    font-weight: 700;
    opacity: 0.9;
}

/* Next Threshold */
.next-threshold {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* ============================================
   RESPONSIVE STYLES - TABLET
   ============================================ */

@media screen and (max-width: 991px) {
    .promotion-progress-bar-wrapper {
        padding: 10px 15px;
    }

    .promotion-progress-container {
        gap: 15px;
    }

    .promotion-text {
        font-size: 14px;
    }

    .progress-segment {
        width: 70px;
        height: 26px;
    }

    .gift-badge,
    .current-range,
    .next-threshold {
        font-size: 14px;
        padding: 5px 12px;
    }

    .separator-plus {
        font-size: 18px;
    }
}

/* ============================================
   RESPONSIVE STYLES - MOBILE
   ============================================ */

@media screen and (max-width: 767px) {
    .promotion-progress-bar-wrapper {
        padding: 10px 12px;
    }

    .promotion-progress-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Title in first line */
    .promotion-header {
        width: 100%;
        justify-content: flex-start;
        order: 1;
    }

    .promotion-info-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .promotion-text {
        font-size: 13px;
    }

    /* Progress in second line */
    .progress-area {
        width: 100%;
        order: 2;
        gap: 6px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .progress-segments {
        gap: 6px;
    }

    .progress-segment {
        width: 50px;
        height: 22px;
    }

    .gift-badge,
    .current-range,
    .next-threshold {
        font-size: 12px;
        padding: 4px 10px;
    }

    .separator-plus {
        font-size: 14px;
    }

    .gift-icon {
        font-size: 14px;
    }
}

/* Extra small mobile */
@media screen and (max-width: 480px) {
    .promotion-text {
        font-size: 12px;
    }

    .progress-segment {
        width: 50px;
        height: 22px;
    }

    .gift-badge,
    .current-range,
    .next-threshold {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .progress-segment.filled,
    .gift-badge {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .promotion-progress-bar-wrapper {
        border: 2px solid currentColor;
    }

    .progress-segment,
    .gift-badge,
    .next-threshold {
        border-width: 3px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .promotion-progress-bar-wrapper {
        display: none;
    }
}

.promo-popup-overlay {
    z-index: 9999999999;
}
