/* ==========================================================================
   Foodyari Restaurant Closing Timer & Timeout Styles
   ========================================================================== */

.restaurant-closing-banner {
    background: linear-gradient(135deg, #fff9f0 0%, #fff2e0 100%);
    border: 1.5px solid #ffb347 !important;
    border-left: 6px solid #ff7a00 !important;
    box-shadow: 0 4px 18px rgba(255, 122, 0, 0.12) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.restaurant-closing-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Pulsing Timer Icon Wrap */
.closing-timer-icon-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ff9900;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.closing-icon-badge i {
    animation: closingClockWobble 2s ease-in-out infinite;
}

.closing-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 153, 0, 0.35);
    animation: closingPulseRing 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    z-index: 1;
}

@keyframes closingPulseRing {
    0% {
        transform: scale(0.85);
        opacity: 0.9;
    }
    70% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes closingClockWobble {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(-10deg);
    }
    20% {
        transform: rotate(10deg);
    }
    30% {
        transform: rotate(-6deg);
    }
    40% {
        transform: rotate(6deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* Digital Time Box */
.closing-timer-digital-box {
    background: #ffffff;
    border: 1.5px solid #ffc285;
    box-shadow: 0 3px 10px rgba(255, 122, 0, 0.12);
    min-width: 130px;
}

.closing-digital-digits {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.closing-blink-colon {
    animation: closingBlink 1s infinite;
}

@keyframes closingBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.25; }
}

/* Progress Bar */
.closing-progress-wrap {
    width: 100%;
}

.closing-progress-bar-bg {
    background: rgba(255, 153, 0, 0.18);
    border-radius: 4px;
    overflow: hidden;
}

.closing-progress-bar {
    background: linear-gradient(90deg, #ff9900 0%, #ff4b2b 100%) !important;
    transition: width 1s linear;
}

/* Checkout Page Specific Banner */
.restaurant-closing-checkout-banner {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #f97316;
    border-left: 6px solid #ea580c;
}

.animate-pulse {
    animation: closingHeartbeat 1.5s ease-in-out infinite;
}

@keyframes closingHeartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

/* Fixed Cart Pill Badge */
.closing-pill-badge {
    background: #dc3545 !important;
    animation: closingPillGlow 2s ease-in-out infinite;
}

@keyframes closingPillGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.6);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
}

/* Card Badge on Listings */
.closing-soon-card-badge {
    background: #ff5722 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(255, 87, 34, 0.4);
    animation: closingCardBadgePulse 2s infinite;
}

@keyframes closingCardBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Expired / Timed Out State */
.restaurant-closing-banner.timer-expired,
.restaurant-closing-checkout-banner.timer-expired {
    background: #f8f9fa !important;
    border-color: #dc3545 !important;
    border-left-color: #dc3545 !important;
    box-shadow: none !important;
}

.restaurant-closing-banner.timer-expired .closing-icon-badge {
    border-color: #dc3545;
}

.restaurant-closing-banner.timer-expired .closing-pulse-ring {
    display: none;
}
