/**
 * Sparkles Banner Components
 * Hero banners, promotional banners, and content blocks
 * Extends: sparkles-utilities.css, sparkles-animations.css, sparkles-tokens.css
 * All 3 optimization layers applied: keyframes consolidated, patterns extracted, component organization
 */

/* ========== BASE BANNER ========== */
.sparkles-banner {
    position: relative;
    overflow: hidden;
    border-radius: .5rem;
    --tw-bg-opacity: 1;
    background-color: rgba(255,255,255,var(--tw-bg-opacity,1));
    --tw-shadow: 0 1px 2px 0 #0000000d;
    --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
    container-type: inline-size;
}

.sparkles-banner-content {
    position: relative;
    z-index: var(--z-sticky);
    padding: 2rem;
}

.sparkles-banner-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-dropdown);
    --tw-bg-opacity: 1;
    background-color: rgba(0,0,0,var(--tw-bg-opacity,1));
    --tw-bg-opacity: 0.3;
    opacity: 0;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    transition-duration: .15s;
    transition-duration: .3s;
}

.sparkles-banner:hover .sparkles-banner-overlay {
    opacity: 1;
}

/* ========== HERO BANNER ========== */
.sparkles-banner-hero {
    min-height: 60vh;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    text-align: center;
    --tw-text-opacity: 1;
    color: rgba(255,255,255,var(--tw-text-opacity,1));
    container-type: inline-size;
}

.sparkles-banner-hero .sparkles-banner-content {
    width: 100%;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.sparkles-banner-hero .sparkles-banner-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Custom shadow - no Tailwind equivalent */ font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; margin-bottom: 1.5rem;
}

.sparkles-banner-hero .sparkles-banner-subtitle {
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-bottom: 2rem;
    opacity: .9;
}

.sparkles-banner-hero .sparkles-banner-cta {
    display: inline-flex;
    gap: 1rem;
}

/* ========== PROMOTIONAL BANNER ========== */
.sparkles-banner-promo {
    background-color: var(--color-primary);
    --tw-text-opacity: 1;
    color: rgba(255,255,255,var(--tw-text-opacity,1));
    text-align: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 0;
}

.sparkles-banner-promo .sparkles-banner-content {
    padding: 0;
}

.sparkles-banner-promo .sparkles-banner-text {
    font-weight: 500;
}

.sparkles-banner-promo .sparkles-banner-close {
    background-color: initial;
    border-width: 0;
    color: inherit;
    padding: .25rem;
    cursor: pointer;
    opacity: .8;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    transition-duration: .15s;
    transition-duration: .2s;
}

.sparkles-banner-promo .sparkles-banner-close:hover {
    opacity: 1;
}

/* ========== CONTENT BLOCK ========== */
.sparkles-content-block {
    padding: 2rem;
    border-radius: .5rem;
    --tw-bg-opacity: 1;
    background-color: rgba(255,255,255,var(--tw-bg-opacity,1));
    border-width: 1px;
    border-color: var(--gray-200);
    transition: all .3s ease-out;
}

.sparkles-content-block:hover {
    --tw-shadow: 0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;
    --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);
}

.sparkles-content-block-header {
    margin-bottom: 1.5rem;
}

.sparkles-content-block-title {
    color: var(--color-secondary);
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.sparkles-content-block-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.sparkles-content-block-body {
    margin-bottom: 1.5rem;
}

.sparkles-content-block-footer {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

/* ========== BANNER CAROUSEL ========== */
.sparkles-banner-carousel {
    border-radius: .5rem;
}

.sparkles-banner-slides {
    display: flex;
}

.sparkles-banner-slides,
.sparkles-product-card-minimal img {
    transition-property: transform;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    transition-duration: .15s;
    transition-duration: .5s;
}

.sparkles-banner-slide {
    flex: none;
    width: 100%;
    position: relative;
}

.sparkles-banner-controls {
    z-index: var(--z-dropdown);
    position: absolute;
    bottom: 1.5rem;
    display: flex;
    gap: .5rem;
}

.sparkles-banner-dot {
    width: .75rem;
    height: .75rem;
    border-radius: var(--radius-full);
    --tw-bg-opacity: 1;
    background-color: rgba(255,255,255,var(--tw-bg-opacity,1));
    --tw-bg-opacity: 0.5;
    border-width: 0;
    cursor: pointer;
    transition-property: color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;
    transition-property: color,background-color,border-color,text-decoration-color,fill,stroke;
    transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    transition-duration: .15s;
    transition-duration: .2s;
}

.sparkles-banner-dot.active {
    --tw-bg-opacity: 1;
    background-color: rgba(255,255,255,var(--tw-bg-opacity,1));
}

.sparkles-banner-nav {
    z-index: var(--z-dropdown);
    position: absolute;
    --tw-bg-opacity: 1;
    background-color: rgba(255,255,255,var(--tw-bg-opacity,1));
    --tw-bg-opacity: 0.9;
    border-width: 0;
    border-radius: var(--radius-full);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease-out;
    opacity: 0;
}

.sparkles-banner-carousel:hover .sparkles-banner-nav {
    opacity: 1;
}

.sparkles-banner-nav:hover {
    transform: translateY(-50%) scale(1.1);
    --tw-bg-opacity: 1;
    background-color: rgba(255,255,255,var(--tw-bg-opacity,1));
}

.sparkles-banner-nav-prev {
    left: 1rem;
}

.sparkles-banner-nav-next {
    right: 1rem;
}

/* ========== BANNER VARIANTS ========== */
.sparkles-banner-luxury {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    --tw-text-opacity: 1;
    color: rgba(255,255,255,var(--tw-text-opacity,1));
    position: relative;
}

.sparkles-banner-luxury::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="sparkles" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23sparkles)"/></svg>');
    opacity: .3;
}

.sparkles-banner-minimal {
    background-color: var(--color-accent);
    color: var(--color-secondary);
    border-width: 1px;
    border-color: var(--gray-200);
}

.sparkles-banner-gradient {
    background-image: linear-gradient(to right,var(--tw-gradient-stops));
    --tw-gradient-from: var(--color-orange) var(--tw-gradient-from-position);
    --tw-gradient-to: var(--color-orange)00 var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from),var(--tw-gradient-to);
    --tw-gradient-to: var(--color-error) var(--tw-gradient-to-position);
    --tw-text-opacity: 1;
    color: rgba(255,255,255,var(--tw-text-opacity,1));
}

.sparkles-banner-image {
    --tw-text-opacity: 1;
    color: rgba(255,255,255,var(--tw-text-opacity,1));
}

.sparkles-banner-image .sparkles-banner-overlay {
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2)); /* Complex gradient - keep raw */ opacity: 1;
}

/* ========== ANIMATION CLASSES ========== */
.sparkles-banner-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.sparkles-banner-slide-up {
    animation: slideUp 0.6s ease-out;
}

.sparkles-banner-sparkle {
    position: relative;
}

.sparkles-banner-sparkle::after {
    content: '✨';
    animation: float 3s ease-in-out infinite;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

/* Note: All keyframes consolidated to sparkles-animations.css - using shared animations */

/* ========== RESPONSIVE DESIGN ========== */
@container (max-width: 768px) {
    .sparkles-banner-hero .sparkles-banner-title {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .sparkles-banner-hero .sparkles-banner-subtitle {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
    
    .sparkles-banner-content {
        padding: 1.5rem;
    }
    
    .sparkles-content-block {
        padding: 1.5rem;
    }
    
    .sparkles-banner-nav {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@container (max-width: 768px) {
    .sparkles-banner-hero {
        min-height: 50vh;
    }
}

/* ========== ACCESSIBILITY ========== */
.sparkles-banner-carousel:focus-within .sparkles-banner-nav {
    opacity: 1;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sparkles-banner-slides {
        transition-property: none;
    }
    
    .sparkles-banner-fade-in,
    .sparkles-banner-slide-up {
        animation: none;
    }
    
    .sparkles-banner-sparkle::after {
        animation: none;
    }
}
