/**
 * Promo Banner Widget Styles
 */

/* Global overrides to ensure visibility */
.yoowan-promo-banner-container,
.yoowan-promo-banner-item,
.yoowan-promo-banner-bg,
.yoowan-promo-banner-content,
.yoowan-promo-banner-title,
.yoowan-promo-banner-subtitle,
.yoowan-promo-banner-button {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Container for multiple banner items */
.yoowan-promo-banner-container {
    display: flex !important;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    box-sizing: border-box;
}

/* Individual banner item */
.yoowan-promo-banner-item {
    position: relative;
    min-width: 300px;
    flex: 1;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
}

/* Background image */
.yoowan-promo-banner-bg {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0; /* Fallback if no image */
    z-index: 1;
    display: block !important;
}

/* 黑色透明遮罩层 - 覆盖整个背景 */
.yoowan-promo-banner-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    display: block !important;
}

/* Content wrapper with overlay */
.yoowan-promo-banner-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 30px !important;
    z-index: 3 !important;
    background: transparent; /* 透明，使用 bg::after 作为遮罩 */
    box-sizing: border-box;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* Title styles */
.yoowan-promo-banner-title {
    margin: 0 auto 15px auto !important;
    font-weight: bold !important;
    font-family: 'Times New Roman', serif;
    font-size: 2.5rem !important;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2 !important;
    width: 100% !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Subtitle styles */
.yoowan-promo-banner-subtitle {
    margin: 0 auto 30px auto !important;
    font-size: 1.1rem !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    width: 100% !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Button styles */
.yoowan-promo-banner-button {
    display: inline-block !important;
    padding: 12px 35px !important;
    border: 2px solid white !important;
    border-radius: 50px;
    font-weight: bold !important;
    font-size: 1rem !important;
    text-decoration: none;
    color: white !important;
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 150px;
    text-align: center !important;
    margin: 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.yoowan-promo-banner-button:hover {
    background-color: white;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .yoowan-promo-banner-container {
        flex-wrap: wrap;
    }
    
    .yoowan-promo-banner-item {
        min-width: calc(50% - 10px);
        height: 350px;
    }
}

@media (max-width: 768px) {
    .yoowan-promo-banner-container {
        flex-direction: column !important;
        gap: 25px !important;
        overflow-x: visible !important;
        display: flex !important;
        min-height: 300px;
    }
    
    .yoowan-promo-banner-item {
        min-width: 100% !important;
        width: 100% !important;
        height: 300px !important;
        min-height: 300px !important;
        flex: none !important;
        display: block !important;
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .yoowan-promo-banner-bg {
        display: block !important;
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        visibility: visible !important;
    }
    
    .yoowan-promo-banner-content {
        display: flex !important;
        position: absolute !important;
        z-index: 3 !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 20px !important;
    }
    
    .yoowan-promo-banner-title {
        font-size: 1.5rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
        margin-bottom: 15px !important;
    }
    
    .yoowan-promo-banner-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 20px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
    }
    
    .yoowan-promo-banner-button {
        padding: 10px 25px !important;
        font-size: 0.9rem !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
        border: 2px solid white !important;
    }
}

@media (max-width: 480px) {
    .yoowan-promo-banner-container {
        display: flex !important;
        flex-direction: column !important;
        min-height: 250px;
    }
    
    .yoowan-promo-banner-item {
        height: 250px !important;
        min-height: 250px !important;
        width: 100% !important;
        display: block !important;
        position: relative !important;
    }
    
    .yoowan-promo-banner-bg {
        display: block !important;
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .yoowan-promo-banner-content {
        padding: 20px !important;
        display: flex !important;
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .yoowan-promo-banner-title {
        font-size: 1.5rem !important;
        display: block !important;
        visibility: visible !important;
        color: white !important;
    }
    
    .yoowan-promo-banner-subtitle {
        font-size: 0.85rem !important;
        display: block !important;
        visibility: visible !important;
        color: white !important;
    }
    
    .yoowan-promo-banner-button {
        display: inline-block !important;
        visibility: visible !important;
        color: white !important;
        border: 2px solid white !important;
    }
}