/**
 * ExpertCE Exam Promo Banner Styles
 *
 * Responsive styles for location-based exam promotion banners.
 * Supports both above-content and sidebar placements.
 */

/* ==========================================================================
   Base Banner Styles
   ========================================================================== */

.ece-exam-promo-banner {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ece-exam-promo-banner .ece-promo-inner {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    padding: 20px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ece-exam-promo-banner .ece-promo-inner:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Icon
   ========================================================================== */

.ece-exam-promo-banner .ece-promo-icon {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ece-exam-promo-banner .ece-promo-icon svg {
    color: #fff;
    stroke: #fff;
}

/* ==========================================================================
   Content
   ========================================================================== */

.ece-exam-promo-banner .ece-promo-content {
    flex: 1;
    min-width: 0;
}

.ece-exam-promo-banner .ece-promo-heading {
    margin: 0 0 4px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.ece-exam-promo-banner .ece-promo-description {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.ece-exam-promo-banner .ece-promo-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.ece-exam-promo-banner .ece-promo-cta:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #fff;
    text-decoration: none;
    transform: translateX(4px);
}

.ece-exam-promo-banner .ece-promo-cta:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ece-exam-promo-banner .ece-promo-cta svg {
    transition: transform 0.2s ease;
}

.ece-exam-promo-banner .ece-promo-cta:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   Above Content Placement
   ========================================================================== */

.ece-exam-promo-banner.ece-promo-above_content {
    margin-top: 0;
    margin-bottom: 30px;
}

/* ==========================================================================
   Sidebar Placement
   ========================================================================== */

.ece-exam-promo-banner.ece-promo-sidebar {
    position: relative;
    top: auto;
    margin: 0 0 24px 0;
}

/* Make the entire sidebar sticky instead of just the banner */
.learn-sidebar .ece-exam-promo-banner.ece-promo-sidebar {
    position: relative;
    margin-bottom: 24px;
}

.ece-exam-promo-banner.ece-promo-sidebar .ece-promo-inner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
}

.ece-exam-promo-banner.ece-promo-sidebar .ece-promo-icon {
    margin-bottom: 4px;
}

.ece-exam-promo-banner.ece-promo-sidebar .ece-promo-content {
    margin-bottom: 8px;
}

.ece-exam-promo-banner.ece-promo-sidebar .ece-promo-heading {
    font-size: 16px;
}

.ece-exam-promo-banner.ece-promo-sidebar .ece-promo-description {
    font-size: 13px;
}

.ece-exam-promo-banner.ece-promo-sidebar .ece-promo-cta {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

/* ==========================================================================
   Inline Placement (Shortcode)
   ========================================================================== */

.ece-exam-promo-banner.ece-promo-inline {
    margin: 30px 0;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .ece-exam-promo-banner .ece-promo-inner {
        padding: 18px 20px;
        gap: 16px;
    }

    .ece-exam-promo-banner .ece-promo-heading {
        font-size: 16px;
    }

    .ece-exam-promo-banner .ece-promo-description {
        font-size: 13px;
    }

    .ece-exam-promo-banner .ece-promo-cta {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Ensure banner scrolls with content on mobile - no sticky/fixed */
    .ece-exam-promo-banner,
    .ece-exam-promo-banner.ece-promo-sidebar,
    .ece-exam-promo-banner.ece-promo-above_content {
        position: static !important;
        top: auto !important;
    }

    .ece-exam-promo-banner .ece-promo-inner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }

    .ece-exam-promo-banner .ece-promo-icon {
        padding: 10px;
    }

    .ece-exam-promo-banner .ece-promo-icon svg {
        width: 28px;
        height: 28px;
    }

    .ece-exam-promo-banner .ece-promo-heading {
        font-size: 16px;
    }

    .ece-exam-promo-banner .ece-promo-description {
        font-size: 13px;
    }

    .ece-exam-promo-banner .ece-promo-cta {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

}


/* Small Mobile */
@media (max-width: 480px) {
    .ece-exam-promo-banner .ece-promo-inner {
        padding: 16px;
    }

    .ece-exam-promo-banner .ece-promo-heading {
        font-size: 15px;
    }

    .ece-exam-promo-banner .ece-promo-description {
        font-size: 12px;
    }

    .ece-exam-promo-banner .ece-promo-cta {
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .ece-exam-promo-banner .ece-promo-inner {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    }
}

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes ece-banner-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ece-exam-promo-banner {
    animation: ece-banner-fade-in 0.3s ease-out;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .ece-exam-promo-banner {
        animation: none;
    }

    .ece-exam-promo-banner .ece-promo-inner:hover {
        transform: none;
    }

    .ece-exam-promo-banner .ece-promo-cta:hover {
        transform: none;
    }

    .ece-exam-promo-banner .ece-promo-cta:hover svg {
        transform: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .ece-exam-promo-banner {
        display: none;
    }
}
