/**
 * GI Offer Section Block - Additional Styles
 * 
 * Note: Main styling for .gi-offer-section, .gi-ofr-banners, .gi-bnr-body
 * is already included in the theme's global CSS (assets/scss/layouts/_banners.scss)
 * 
 * This file contains ONLY block-specific enhancements:
 * - Highlight state
 * - Expired state
 * - Background variants
 * - Decorations
 * 
 * @package Grabit
 * @version 1.0
 */

/* ===== Highlight State ===== */
.gi-ofr-banners.is-highlight {
    position: relative;
}

.gi-ofr-banners.is-highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid #aa1c1c;
    border-radius: 5px;
    pointer-events: none;
    z-index: 10;
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* ===== Expired State ===== */
.gi-ofr-banners.is-expired {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.gi-ofr-banners.is-expired .gi-bnr-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.gi-ofr-banners.is-expired .gi-btn-2 {
    background-color: #999;
    pointer-events: none;
}

.gi-ofr-banners.is-expired .gi-btn-2:hover {
    background-color: #999;
}

/* ===== Expired Label ===== */
.lbl-expired {
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 11px !important;
}

/* ===== Background Variants ===== */
.gi-offer-section.bg-gradient .gi-bnr-detail h5,
.gi-offer-section.bg-gradient .gi-bnr-detail p {
    color: #fff !important;
}

.gi-offer-section.bg-dark .gi-bnr-detail h5,
.gi-offer-section.bg-dark .gi-bnr-detail p {
    color: #fff !important;
}

/* ===== Offer Price Styling ===== */
.gi-offer-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gi-offer-price .old-price {
    position: relative;
}

.gi-offer-price .new-price {
    font-family: 'Poppins', sans-serif;
}

/* ===== Offer Expiry Countdown ===== */
.gi-offer-expiry {
    animation: expiryBlink 1.5s ease-in-out infinite;
}

@keyframes expiryBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ===== Decorations ===== */
.gi-offer-decorations {
    z-index: 0;
}

.gi-offer-decorations svg {
    color: #8e0000;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
    .gi-ofr-banners.is-highlight::after {
        border-width: 2px;
    }
}

@media (max-width: 360px) {
    .gi-offer-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .gi-offer-expiry {
        font-size: 11px;
    }
}

/* ===== Admin/Preview Styles ===== */
.acf-block-preview .gi-offer-section {
    margin: 0;
}

/* ===== Accessibility ===== */
.gi-ofr-banners a:focus {
    outline: 2px solid #aa1c1c;
    outline-offset: 2px;
}

.gi-ofr-banners a:focus-visible {
    outline: 2px solid #aa1c1c;
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .gi-offer-section {
        page-break-inside: avoid;
    }
    
    .gi-ofr-banners.is-expired {
        display: none;
    }
}


