/*
 * GRC Final Weekend Urgency v1.3.3
 * SAFE MODE: styles ONLY the existing lottery countdown element.
 * It does not add children to, reposition, isolate, hide, or otherwise alter
 * the competition card itself.
 */

.lty-shop-timer-container.grc-fwu-active,
.lottery-time-countdown.grc-fwu-active,
.is-wc-lotery_countdown.grc-fwu-active,
.is-wc-lottery_countdown.grc-fwu-active,
[data-lotteryid][data-time].grc-fwu-active {
    position: relative !important;
    overflow: visible !important;
    isolation: auto !important;
    box-sizing: border-box !important;
    padding-top: 28px !important;
}

.lty-shop-timer-container.grc-fwu-active::before,
.lottery-time-countdown.grc-fwu-active::before,
.is-wc-lotery_countdown.grc-fwu-active::before,
.is-wc-lottery_countdown.grc-fwu-active::before,
[data-lotteryid][data-time].grc-fwu-active::before {
    content: attr(data-grc-fwu-label);
    position: absolute;
    z-index: 8;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    max-width: calc(100% - 18px);
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: linear-gradient(135deg, #d90f24 0%, #a80718 100%);
    box-shadow: 0 5px 12px rgba(92, 0, 10, .28);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .65px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
}

/* Only known WooCommerce Lottery countdown boxes are recoloured. */
body.home .product-info .lty-shop-timer-container.grc-fwu-active .lty-shop-timer-section,
.lottery-time-countdown.grc-fwu-active .wc_lotery_countdown-section,
.lottery-time-countdown.grc-fwu-active .wc_lottery_countdown-section,
.lottery-time-countdown.grc-fwu-active .countdown_section,
.is-wc-lotery_countdown.grc-fwu-active .wc_lotery_countdown-section,
.is-wc-lotery_countdown.grc-fwu-active .wc_lottery_countdown-section,
.is-wc-lotery_countdown.grc-fwu-active .countdown_section,
.is-wc-lottery_countdown.grc-fwu-active .wc_lotery_countdown-section,
.is-wc-lottery_countdown.grc-fwu-active .wc_lottery_countdown-section,
.is-wc-lottery_countdown.grc-fwu-active .countdown_section,
[data-lotteryid][data-time].grc-fwu-active .wc_lotery_countdown-section,
[data-lotteryid][data-time].grc-fwu-active .wc_lottery_countdown-section,
[data-lotteryid][data-time].grc-fwu-active .countdown_section {
    border-color: rgba(255, 67, 84, .78) !important;
    background: linear-gradient(180deg, rgba(86, 8, 18, .98), rgba(38, 7, 13, .98)) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 12px rgba(195, 12, 35, .18) !important;
    color: #fff !important;
}

body.home .product-info .lty-shop-timer-container.grc-fwu-active .lty-shop-timer-section,
body.home .product-info .lty-shop-timer-container.grc-fwu-active .lty-shop-timer-section * {
    color: #fff !important;
    text-shadow: none !important;
}

.lottery-time-countdown.grc-fwu-active .wc_lotery_countdown-amount,
.lottery-time-countdown.grc-fwu-active .wc_lottery_countdown-amount,
.lottery-time-countdown.grc-fwu-active .countdown_amount,
.lottery-time-countdown.grc-fwu-active .wc_lotery_countdown-period,
.lottery-time-countdown.grc-fwu-active .wc_lottery_countdown-period,
.lottery-time-countdown.grc-fwu-active .countdown_period,
.is-wc-lotery_countdown.grc-fwu-active .wc_lotery_countdown-amount,
.is-wc-lotery_countdown.grc-fwu-active .wc_lottery_countdown-amount,
.is-wc-lotery_countdown.grc-fwu-active .countdown_amount,
.is-wc-lotery_countdown.grc-fwu-active .wc_lotery_countdown-period,
.is-wc-lotery_countdown.grc-fwu-active .wc_lottery_countdown-period,
.is-wc-lotery_countdown.grc-fwu-active .countdown_period,
.is-wc-lottery_countdown.grc-fwu-active .wc_lotery_countdown-amount,
.is-wc-lottery_countdown.grc-fwu-active .wc_lottery_countdown-amount,
.is-wc-lottery_countdown.grc-fwu-active .countdown_amount,
.is-wc-lottery_countdown.grc-fwu-active .wc_lotery_countdown-period,
.is-wc-lottery_countdown.grc-fwu-active .wc_lottery_countdown-period,
.is-wc-lottery_countdown.grc-fwu-active .countdown_period,
[data-lotteryid][data-time].grc-fwu-active .wc_lotery_countdown-amount,
[data-lotteryid][data-time].grc-fwu-active .wc_lottery_countdown-amount,
[data-lotteryid][data-time].grc-fwu-active .countdown_amount,
[data-lotteryid][data-time].grc-fwu-active .wc_lotery_countdown-period,
[data-lotteryid][data-time].grc-fwu-active .wc_lottery_countdown-period,
[data-lotteryid][data-time].grc-fwu-active .countdown_period {
    color: #fff !important;
}

.lty-shop-timer-container.grc-fwu-final-hours::before,
.lottery-time-countdown.grc-fwu-final-hours::before,
.is-wc-lotery_countdown.grc-fwu-final-hours::before,
.is-wc-lottery_countdown.grc-fwu-final-hours::before,
[data-lotteryid][data-time].grc-fwu-final-hours::before {
    animation: grc-fwu-safe-pulse 1.8s ease-in-out infinite;
}

@keyframes grc-fwu-safe-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.14); }
}

@media (max-width: 767px) {
    .lty-shop-timer-container.grc-fwu-active,
    .lottery-time-countdown.grc-fwu-active,
    .is-wc-lotery_countdown.grc-fwu-active,
    .is-wc-lottery_countdown.grc-fwu-active,
    [data-lotteryid][data-time].grc-fwu-active {
        padding-top: 23px !important;
    }

    .lty-shop-timer-container.grc-fwu-active::before,
    .lottery-time-countdown.grc-fwu-active::before,
    .is-wc-lotery_countdown.grc-fwu-active::before,
    .is-wc-lottery_countdown.grc-fwu-active::before,
    [data-lotteryid][data-time].grc-fwu-active::before {
        top: 0;
        transform: translate(-50%, 0);
        min-height: 20px;
        max-width: calc(100% - 10px);
        padding: 3px 8px;
        font-size: 8px;
        letter-spacing: .45px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lty-shop-timer-container.grc-fwu-final-hours::before,
    .lottery-time-countdown.grc-fwu-final-hours::before,
    .is-wc-lotery_countdown.grc-fwu-final-hours::before,
    .is-wc-lottery_countdown.grc-fwu-final-hours::before,
    [data-lotteryid][data-time].grc-fwu-final-hours::before {
        animation: none !important;
    }
}
