/* Black Friday Sale Plugin - Enhanced Frontend Styles */

/* Hide Shoptimizer Theme Default Discount Badges - MORE AGGRESSIVE */
.shoptimizer-sale-badge,
.sale-item.product-label,
.product-label.onsale,
body.theme-shoptimizer .price del + ins::after,
body.theme-shoptimizer .summary .price > .amount:last-child::after,
.woocommerce-variation-price .price > .amount:last-child::after,
.summary .price > .amount:last-child::after,
.shoptimizer-sticky-add-to-cart .price > .amount:last-child::after,
.price ins .percentage,
.price .sale-percentage,
ins .sale-badge,
.price .savings-amount,
.single-product .price .savings,
/* More specific Shoptimizer selectors */
.products .product .price ins::after,
.woocommerce ul.products li.product .price ins::after,
.woocommerce-page ul.products li.product .price ins::after,
li.product .price ins::after,
.product-loop-title + .price ins::after,
/* Hide the red/yellow percentage badges */
.products .product > a:first-child::before,
.products .product > a:first-child::after,
.woocommerce ul.products li.product > a:first-child::before,
.woocommerce ul.products li.product > a:first-child::after,
/* Hide percentage text in all price contexts */
.price .percentage-text,
.price .save-text,
.price .discount-amount {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    content: none !important;
}

/* Remove Shoptimizer's percentage that appears after prices */
.price ins::after,
.price ins::before {
    content: none !important;
    display: none !important;
}

/* Countdown Timer Styles */
.bfdt-countdown-wrapper {
    margin: 20px 0;
    text-align: center;
}

.bfdt-countdown-inner {
    background: linear-gradient(135deg, #FF0000 0%, #8B0000 100%);
    color: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.bfdt-countdown-inner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: bfdt-shine 3s infinite;
}

@keyframes bfdt-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.bfdt-countdown-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bfdt-countdown {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.bfdt-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.bfdt-countdown-value {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 5px;
    min-width: 50px;
    display: inline-block;
}

.bfdt-countdown-label {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Product page specific countdown */
.bfdt-countdown-product {
    margin-bottom: 30px;
}

.bfdt-countdown-product .bfdt-countdown-inner {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Shop page countdown */
.bfdt-countdown-shop {
    margin-bottom: 30px;
}

/* ========================================
   DT DAY SALE BADGE STYLES
   ======================================== */

/* DT Day Badge - Product Loop (Orange/Gold/Black) */
.bfdt-dtday-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #FF6B00 0%, #FFD700 60%, #FF6B00 100%);
    color: #000;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: bfdt-dtday-pulse 1.8s ease-in-out infinite;
    border: 2px solid rgba(0,0,0,0.15);
    overflow: visible;
}

.bfdt-dtday-badge .bfdt-dtday-fire {
    position: absolute;
    top: -14px;
    right: -6px;
    font-size: 20px;
    filter: drop-shadow(1px 1px 3px rgba(255,107,0,0.8));
    z-index: 11;
}

.bfdt-dtday-badge .bfdt-bf-main {
    color: #000;
    font-size: 9px;
    letter-spacing: 0.5px;
}

.bfdt-dtday-badge .bfdt-bf-discount {
    color: #1a1a1a;
    text-shadow: none;
    font-size: 14px;
    font-weight: 900;
}

@keyframes bfdt-dtday-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 107, 0, 0.7);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 6px 22px rgba(255, 215, 0, 0.9);
    }
}

/* DT Day Single Product Badge */
.bfdt-dtday-badge-single {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1a00 50%, #1a1a1a 100%);
    color: #FFD700;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 50px;
    box-shadow: 0 5px 25px rgba(255, 107, 0, 0.5);
    border: 3px solid #FF6B00;
    position: relative;
    overflow: hidden;
    animation: bfdt-dtday-glow-single 2s ease-in-out infinite;
}

.bfdt-dtday-badge-single .bfdt-bf-icon {
    font-size: 24px;
}

.bfdt-dtday-badge-single .bfdt-bf-discount-single {
    background: linear-gradient(135deg, #FF6B00, #FFD700);
    color: #000;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 900;
}

@keyframes bfdt-dtday-glow-single {
    0%, 100% {
        box-shadow: 0 5px 25px rgba(255, 107, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 8px 40px rgba(255, 107, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.5);
    }
}

/* DT Day Member-Only CTA on single product page (guests) */
.bfdt-dtday-member-only-single {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1a00 50%, #1a1a1a 100%);
    color: #FFD700;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 50px;
    border: 3px solid #FF6B00;
    box-shadow: 0 5px 25px rgba(255, 107, 0, 0.5);
    animation: bfdt-dtday-glow-single 2s ease-in-out infinite;
    flex-wrap: wrap;
    justify-content: center;
}

.bfdt-dtday-fire-lg {
    font-size: 26px;
    filter: drop-shadow(0 0 6px rgba(255,107,0,0.8));
}

.bfdt-dtday-member-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bfdt-dtday-sale-title {
    font-size: 16px;
    font-weight: 900;
    color: #FFD700;
    letter-spacing: 1px;
}

.bfdt-dtday-join-cta {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

/* DT Day member price CTA (in price HTML, for guests) */
.bfdt-dtday-member-price-cta {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #FF6B00;
    margin-top: 4px;
}

/* Join link shared styles */
.bfdt-dtday-join-link {
    color: #FF6B00;
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.2s;
}

.bfdt-dtday-join-link:hover {
    color: #FFD700;
}

.bfdt-dtday-member-only-single .bfdt-dtday-join-link {
    color: #FFD700;
}

.bfdt-dtday-member-only-single .bfdt-dtday-join-link:hover {
    color: #FF6B00;
}

/* DT Day variable discount info */
.bfdt-variable-discount-info.bfdt-dtday-style .bfdt-save-text {
    background: linear-gradient(135deg, #FF6B00, #FFD700);
    color: #000;
}

.bfdt-variable-discount-info.bfdt-dtday-style .bfdt-bf-text {
    color: #FF6B00;
}

/* SIMPLIFIED Black Friday Badge Styles - Less distracting */
.bfdt-black-friday-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    /* Simple pulse animation only */
    animation: bfdt-simple-pulse 2s ease-in-out infinite;
}

/* Christmas Badge Styles with Santa Hat */
.bfdt-christmas-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #BB2528 0%, #8B1A1B 100%);
    color: #fff;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(187, 37, 40, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: bfdt-christmas-pulse 2s ease-in-out infinite;
    border: 2px solid #165B33;
    overflow: visible;
}

/* Santa Hat on Christmas Badge */
.bfdt-christmas-badge .bfdt-santa-hat {
    position: absolute;
    top: -15px;
    right: -8px;
    font-size: 22px;
    transform: rotate(15deg);
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
    z-index: 11;
}

.bfdt-christmas-badge .bfdt-bf-main {
    color: #fff;
    font-size: 10px;
}

.bfdt-christmas-badge .bfdt-bf-discount {
    color: #FFD700;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

@keyframes bfdt-christmas-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(187, 37, 40, 0.6);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(22, 91, 51, 0.8);
    }
}

@keyframes bfdt-simple-pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

.bfdt-bf-main {
    font-size: 10px;
    line-height: 1;
}

.bfdt-bf-discount {
    font-size: 14px;
    font-weight: 900;
    color: #FF0000;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

/* Single Product Badge - Simplified */
.bfdt-black-friday-badge-single {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #FFD700;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 50px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    border: 3px solid #FFD700;
    position: relative;
    overflow: hidden;
    /* Simple glow animation only */
    animation: bfdt-simple-glow 2s ease-in-out infinite;
}

/* Christmas Single Product Badge */
.bfdt-christmas-badge-single {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #165B33 0%, #1a7340 100%);
    color: #fff;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 50px;
    box-shadow: 0 5px 25px rgba(22, 91, 51, 0.5);
    border: 3px solid #BB2528;
    position: relative;
    overflow: visible;
    animation: bfdt-christmas-glow-single 2s ease-in-out infinite;
}

.bfdt-christmas-badge-single .bfdt-bf-icon {
    font-size: 24px;
}

.bfdt-christmas-badge-single .bfdt-bf-discount-single {
    background: #BB2528;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 16px;
}

@keyframes bfdt-christmas-glow-single {
    0%, 100% {
        box-shadow: 0 5px 25px rgba(22, 91, 51, 0.5), 0 0 10px rgba(187, 37, 40, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(187, 37, 40, 0.6), 0 0 20px rgba(22, 91, 51, 0.5);
    }
}

/* Christmas style for variable discount info */
.bfdt-variable-discount-info.bfdt-christmas-style .bfdt-save-text {
    background: #BB2528;
}

.bfdt-variable-discount-info.bfdt-christmas-style .bfdt-bf-text {
    color: #165B33;
}

/* ========================================
   MEMORIAL DAY BADGE STYLES
   ======================================== */

/* Memorial Day Badge - Product Loop (Red, White & Blue) */
.bfdt-memorial-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #002868 0%, #001845 100%);
    color: #fff;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 40, 104, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: bfdt-memorial-pulse 2s ease-in-out infinite;
    border: 2px solid #BF0A30;
    overflow: visible;
}

.bfdt-memorial-badge .bfdt-flag-icon {
    position: absolute;
    top: -12px;
    right: -6px;
    font-size: 18px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
    z-index: 11;
}

.bfdt-memorial-badge .bfdt-bf-main {
    color: #fff;
    font-size: 9px;
}

.bfdt-memorial-badge .bfdt-bf-discount {
    color: #BF0A30;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
    font-size: 14px;
    font-weight: 900;
}

@keyframes bfdt-memorial-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 40, 104, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(191, 10, 48, 0.8);
    }
}

/* Memorial Day Single Product Badge */
.bfdt-memorial-badge-single {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #002868 0%, #001845 100%);
    color: #fff;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 50px;
    box-shadow: 0 5px 25px rgba(0, 40, 104, 0.5);
    border: 3px solid #BF0A30;
    position: relative;
    overflow: visible;
    animation: bfdt-memorial-glow-single 2s ease-in-out infinite;
}

.bfdt-memorial-badge-single .bfdt-bf-icon {
    font-size: 24px;
}

.bfdt-memorial-badge-single .bfdt-bf-discount-single {
    background: #BF0A30;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 16px;
}

@keyframes bfdt-memorial-glow-single {
    0%, 100% {
        box-shadow: 0 5px 25px rgba(0, 40, 104, 0.5), 0 0 10px rgba(191, 10, 48, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(191, 10, 48, 0.6), 0 0 20px rgba(0, 40, 104, 0.5);
    }
}

/* Memorial Day style for variable discount info */
.bfdt-variable-discount-info.bfdt-memorial-style .bfdt-save-text {
    background: #BF0A30;
}

.bfdt-variable-discount-info.bfdt-memorial-style .bfdt-bf-text {
    color: #002868;
}

@keyframes bfdt-simple-glow {
    0%, 100% {
        box-shadow: 0 5px 25px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 165, 0, 0.8);
    }
}

.bfdt-bf-icon {
    font-size: 24px;
    /* Remove spinning animation */
}

.bfdt-bf-discount-single {
    background: #FFD700;
    color: #000;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 16px;
}

/* Discount Badge - Simplified Animation */
.bfdt-discount-badge,
.bfdt-discount-range-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: #FFFFFF;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: bold;
    margin-left: 10px;
    border-radius: 15px;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
    /* Simple flash animation */
    animation: bfdt-simple-flash 2s infinite;
}

@keyframes bfdt-simple-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Variable Product Discount Range Display */
.bfdt-variable-discount-info {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bfdt-save-text {
    display: inline-block;
    background: #FF0000;
    color: #FFFFFF;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 900;
    border-radius: 5px;
    /* Simple opacity animation */
    animation: bfdt-simple-fade 2s ease-in-out infinite;
}

@keyframes bfdt-simple-fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.bfdt-bf-text {
    font-size: 11px;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Price styling enhancements */
.price del {
    opacity: 0.6;
    margin-right: 10px;
    position: relative;
}

.price del::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #FF0000;
}

.price ins {
    color: #FF0000;
    font-weight: bold;
    font-size: 1.3em;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .bfdt-countdown {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .bfdt-countdown-value {
        font-size: 24px;
        padding: 8px 12px;
        min-width: 40px;
    }
    
    .bfdt-countdown-label {
        font-size: 10px;
    }
    
    .bfdt-black-friday-badge {
        font-size: 9px;
        padding: 5px 8px;
    }
    
    .bfdt-bf-discount {
        font-size: 12px;
    }
    
    .bfdt-save-text {
        font-size: 12px;
        padding: 3px 8px;
    }
}

/* Animation for urgency - Keep simple */
.bfdt-countdown-wrapper {
    /* Remove shake animation */
}

/* Last hour urgency styles */
.bfdt-countdown.last-hour .bfdt-countdown-inner {
    background: linear-gradient(135deg, #FF0000 0%, #8B0000 100%) !important;
    animation: bfdt-urgent-pulse 0.5s infinite;
}

.bfdt-countdown.last-day .bfdt-countdown-inner {
    animation: bfdt-day-pulse 2s infinite;
}

@keyframes bfdt-urgent-pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 6px 25px rgba(255, 0, 0, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3); }
}

@keyframes bfdt-day-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(255, 165, 0, 0.6); }
}

/* Hover Effects - Simplified */
.bfdt-black-friday-badge:hover {
    transform: scale(1.05);
}

.bfdt-discount-badge:hover,
.bfdt-discount-range-badge:hover {
    transform: scale(1.05);
}

/* Remove complex animations for product hover */
.products .product:hover .bfdt-black-friday-badge {
    /* No additional animation on hover */
}

/* Remove sparkle effects */
.sparkle::before,
.sparkle::after {
    display: none !important;
}

/* Hide ALL Shoptimizer native sale badges while a holiday/DT Day sale is active.
   This stylesheet only loads during an active sale, and the plugin renders its own
   badge in the same top-left corner — so the native "Save X%" badge must be hidden
   by its REAL classes (sale-item product-label) to prevent the two from overlapping. */
.sale-item.product-label,
span.product-label.type-bubble,
span.product-label.type-circle,
.products .product .onsale,
.products .product .product-label,
.woocommerce ul.products li.product .onsale,
.woocommerce-page ul.products li.product .onsale {
    display: none !important;
}


/* Force hide percentage badges with more specific selectors */
.products .product a:first-of-type::before,
.products .product a:first-of-type::after,
.products .product > a::before,
.products .product > a::after,
a.woocommerce-LoopProduct-link::before,
a.woocommerce-LoopProduct-link::after {
    display: none !important;
    content: none !important;
}

/* ========================================
   MOBILE: Single Product Badge - Reduced Size
   ======================================== */
@media (max-width: 767px) {
    .bfdt-dtday-badge {
        font-size: 9px;
        padding: 5px 8px;
    }

    .bfdt-dtday-badge-single,
    .bfdt-dtday-member-only-single {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 30px;
        border-width: 2px;
        gap: 6px;
        margin-bottom: 14px;
    }

    .bfdt-dtday-sale-title {
        font-size: 13px;
    }

    .bfdt-dtday-join-cta {
        font-size: 11px;
    }

    .bfdt-dtday-fire-lg {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .bfdt-memorial-badge-single,
    .bfdt-christmas-badge-single,
    .bfdt-black-friday-badge-single {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 30px;
        border-width: 2px;
        gap: 6px;
        margin-bottom: 14px;
    }

    .bfdt-memorial-badge-single .bfdt-bf-icon,
    .bfdt-christmas-badge-single .bfdt-bf-icon,
    .bfdt-black-friday-badge-single .bfdt-bf-icon {
        font-size: 16px;
    }

    .bfdt-memorial-badge-single .bfdt-bf-main,
    .bfdt-christmas-badge-single .bfdt-bf-main,
    .bfdt-black-friday-badge-single .bfdt-bf-main {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .bfdt-memorial-badge-single .bfdt-bf-discount-single,
    .bfdt-christmas-badge-single .bfdt-bf-discount-single,
    .bfdt-black-friday-badge-single .bfdt-bf-discount-single {
        font-size: 13px;
        padding: 2px 8px;
        border-radius: 15px;
    }
}
