/* CouponPilot Public Styles - CACHE BUST TEST: 2025-06-23 09:35:00 */
.couponpilot-container {
    margin: 2em 0 !important;
}

.couponpilot-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 2em;
}

/* Static Grid Layout */
.couponpilot-container[data-display-mode="static"] .couponpilot-grid {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .couponpilot-container[data-display-mode="static"] .couponpilot-grid {
        grid-template-columns: repeat(var(--desktop-rows, 3), 1fr);
    }
}

/* Slider Layout - Only apply when Glide.js is not active */
.couponpilot-container[data-display-mode="slider"] {
    .couponpilot-grid:not(.glide) {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-items: stretch;
    }
    
    .couponpilot-grid:not(.glide)::-webkit-scrollbar {
        display: none;
    }
    
    .couponpilot-grid:not(.glide) .couponpilot-coupon {
        flex: 0 0 calc(100% / var(--mobile-rows, 1));
        scroll-snap-align: start;
        height: 100%;
    }
}

@media (min-width: 768px) {
    .couponpilot-container[data-display-mode="slider"] .couponpilot-grid:not(.glide) .couponpilot-coupon {
        flex: 0 0 calc(100% / var(--desktop-rows, 3));
    }
}

.couponpilot-container[data-display-mode="slider"] .glide__slides .glide__slide:before,
.couponpilot-container[data-display-mode="slider"] .glide__slides .glide__slide:after {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    content: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
    color: transparent !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Glide.js Styles ------ */
.couponpilot-container[data-display-mode="slider"] {
    .glide {
        position: relative;
    }

    .glide__track {
        overflow: hidden;
    }

    .glide__slides {
        display: flex;
        list-style: none !important;
        margin: 0 !important;
        padding: 10px 0 !important;
    }

    .glide__slide {
        flex-shrink: 0;
        width: 100%;
        padding: 0;
        list-style: none;
        display: flex;

        .couponpilot-coupon {
            width: 100%;
            margin: 0 !important;
            display: flex;
            flex-direction: column;
        }
        
    }

    .glide__arrows {
        position: absolute;
        top: calc(50% - 11px);
        transform: translateY(-50%);
        width: 100%;
        display: flex;
        justify-content: space-between;
        pointer-events: none;
        z-index: 10;
        left: 0;
        right: 0;
    }

    .glide__arrow {
        background: rgba(0, 0, 0, 0.6);
        color: white;
        border: none;
        padding: 12px 16px;
        cursor: pointer;
        border-radius: 50%;
        pointer-events: auto;
        transition: all 0.3s ease;
        font-size: 18px;
        line-height: 1;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        top: unset;
        transform: unset;
        position: relative;
        z-index: 11;

        &:hover {
            background: rgba(0, 0, 0, 0.8);
            /* transform: scale(1.1); */
        }
    }

    /* Hide arrows when slider-show-arrows is false */
    &[data-slider-show-arrows="false"] .glide__arrows {
        display: none !important;
    }

    .glide__arrow--left {
        left: -5px;
    }

    .glide__arrow--right {
        right: -5px;
    }
}



/* Responsive adjustments for arrows */
@media (max-width: 767px) {
    .couponpilot-container[data-display-mode="slider"] {
        .glide__arrow {
            width: 36px;
            height: 36px;
            padding: 8px 12px;
            font-size: 16px;
        }
        
        .glide__arrow--left {
            left: 5px;
        }
        
        .glide__arrow--right {
            right: 5px;
        }
    }
}

/* Coupon Card Styles */
.couponpilot-coupon {
    position: relative;
    padding: 20px;
    border: 2px solid;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;

    &:hover {
        transform: translateY(-5px);
    }
}

/* Equal height for slider mode */
.couponpilot-container[data-display-mode="slider"] .couponpilot-coupon {
    min-height: 250px;
    height: 250px;
}

.couponpilot-title {
    margin: 0 0 .25em !important;
    font-weight: bold !important;
    color: inherit !important;
}

.couponpilot-description {
    margin-bottom: 1em !important;
    flex-grow: 1;
}

.couponpilot-expiration {
    font-size: 0.9em;
    margin-bottom: 1em;
    font-style: italic;
}

.couponpilot-disclaimer {
    font-size: 0.75em;
    margin-bottom: 1em;
    font-style: italic;
}

.couponpilot-action {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;

    &:hover {
        background-color: #0056b3;
        color: white;
    }
}


/* Global CTA Styles */
.couponpilot-global-cta {
    text-align: center;
    margin-top: 2em;
}

.couponpilot-cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 1.2em;

    &:hover {
        background-color: #218838;
        color: white;
    }
}


/* Modal Styles */
.couponpilot-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0 !important;
    right: 0 !important;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    margin: 0 !important;
}

.couponpilot-modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.couponpilot-modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;

    &:hover {
        color: #666;
    }
}


/* Responsive Adjustments */
@media (max-width: 767px) {
    .couponpilot-modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

/* Fallback Slider Layout - When Glide.js is not available */
.couponpilot-container[data-display-mode="slider"] {
    .couponpilot-grid.fallback-slider {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 20px;
        padding: 0 10px;
        list-style: none !important;
        margin: 0 !important;
        align-items: stretch;
    }
    
    .couponpilot-grid.fallback-slider::-webkit-scrollbar {
        display: none;
    }
    
    .couponpilot-grid.fallback-slider .couponpilot-coupon {
        flex: 0 0 calc(100% / var(--mobile-rows, 1));
        scroll-snap-align: start;
        min-width: 250px;
        height: 100%;
    }
}

@media (min-width: 768px) {
    .couponpilot-container[data-display-mode="slider"] .couponpilot-grid.fallback-slider .couponpilot-coupon {
        flex: 0 0 calc(100% / var(--desktop-rows, 3));
    }
} 