/**
 * Woo Promo Banners - Frontend Styles
 *
 * Minimal CSS for banner display
 * This file can be disabled via the wc_pb_enqueue_css filter
 */

/* Container */
.wc-pb-banners-container {
    margin: 20px 0;
}

/* List */
.wc-pb-banners-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Responsive grid - 2 columns on tablets and up */
@media (min-width: 768px) {
    .wc-pb-banners-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Banner Card */
.wc-pb-banner-card {
    
}

.wc-pb-banner-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Banner Image */
.wc-pb-banner-image {
    margin-bottom: 15px;
}

.wc-pb-banner-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Banner Content */
.wc-pb-banner-content {
    /* No specific styles needed - content flows naturally */
}

/* Banner Title */
.wc-pb-banner-title {
    margin: 0 0 10px 0;
    
}

/* Banner Description */
.wc-pb-banner-description {
    margin: 0 0 15px 0;
}

.wc-pb-banner-description p:last-child {
    margin-bottom: 0;
}

/* Banner CTA */
.wc-pb-banner-cta {
    margin-top: 15px;
}

.wc-pb-banner-button {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.wc-pb-banner-button:hover {
    background-color: #005a87;
    color: #fff;
    text-decoration: none;
}

.wc-pb-banner-button:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

/* Utility classes */
.wc-pb-banners-container.wc-pb-single-column .wc-pb-banners-list {
    grid-template-columns: 1fr;
}

.wc-pb-banners-container.wc-pb-full-width {
    width: 100%;
    max-width: none;
}

/* Elementor banner responsive text overlay */
.wc-pb-banner-card .e-con,
.wc-pb-login-banner-item .e-con,
.wc-pb-banner-content .e-con {
    container-type: inline-size;
    position: relative;
}

.wc-pb-banner-card .text-overlay,
.wc-pb-login-banner-item .text-overlay,
.wc-pb-banner-content .text-overlay {
    font-size: clamp(0.75rem, 4cqw, 2.5rem) !important;
    line-height: 1.3 !important;
}

.wc-pb-banner-card .text-overlay p,
.wc-pb-login-banner-item .text-overlay p,
.wc-pb-banner-content .text-overlay p {
    font-size: clamp(0.75rem, 4cqw, 2.5rem) !important;
    line-height: 1.3 !important;
    margin: 0;
}

/* Fallback per browser che non supportano container queries */
@supports not (font-size: 1cqw) {
    .wc-pb-banner-card .text-overlay,
    .wc-pb-login-banner-item .text-overlay,
    .wc-pb-banner-content .text-overlay {
        font-size: clamp(0.75rem, 4vw, 2.5rem) !important;
    }

    .wc-pb-banner-card .text-overlay p,
    .wc-pb-login-banner-item .text-overlay p,
    .wc-pb-banner-content .text-overlay p {
        font-size: clamp(0.75rem, 4vw, 2.5rem) !important;
    }
}

/* Responsive breakpoints */
@media (max-width: 767px) {
    .wc-pb-banner-card .text-overlay,
    .wc-pb-login-banner-item .text-overlay,
    .wc-pb-banner-content .text-overlay {
        font-size: clamp(0.6rem, 5cqw, 1.5rem) !important;
    }

    .wc-pb-banner-card .text-overlay p,
    .wc-pb-login-banner-item .text-overlay p,
    .wc-pb-banner-content .text-overlay p {
        font-size: clamp(0.6rem, 5cqw, 1.5rem) !important;
    }
}

/* Print styles */
@media print {
    .wc-pb-banner-card {
        border: 1px solid #000;
        box-shadow: none;
        background: #fff;
        break-inside: avoid;
    }

    .wc-pb-banner-button {
        display: none;
    }
}