/**
 * assets/top_banner.css
 * Bảng phong cách độc lập cho Module Top Announcement / Promo Banner
 * Tái sử dụng ở cả Frontend Public và Admin Live Preview (DRY Principle)
 */

.top-banner-bar {
    position: relative;
    width: 100%;
    z-index: 99998;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
    overflow: hidden;
    line-height: 1.4;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Background Presets */
.top-banner-bar.theme-gold {
    background: linear-gradient(90deg, #1c1809 0%, #261f0c 50%, #151206 100%);
    border-bottom-color: rgba(229, 169, 60, 0.35);
    color: #fef08a;
}
.top-banner-bar.theme-ocean {
    background: linear-gradient(90deg, #082f49 0%, #0369a1 50%, #0c4a6e 100%);
    border-bottom-color: rgba(56, 189, 248, 0.35);
    color: #e0f2fe;
}
.top-banner-bar.theme-fire {
    background: linear-gradient(90deg, #450a0a 0%, #991b1b 50%, #2a0808 100%);
    border-bottom-color: rgba(239, 68, 68, 0.4);
    color: #fee2e2;
}
.top-banner-bar.theme-purple {
    background: linear-gradient(90deg, #2e1065 0%, #6b21a8 50%, #3b0764 100%);
    border-bottom-color: rgba(168, 85, 247, 0.35);
    color: #f3e8ff;
}
.top-banner-bar.theme-dark {
    background: #11141a;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.top-banner-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    min-height: 40px;
}

.top-banner-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
    padding-right: 25px; /* Để không bị đè vào nút Close */
}

/* Badge nhấp nháy */
.top-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
.theme-gold .top-banner-badge {
    background: linear-gradient(135deg, #FFDF73 0%, #E5A93C 100%);
    color: #0b0d10;
}
.theme-ocean .top-banner-badge {
    background: #38bdf8;
    color: #082f49;
}
.theme-fire .top-banner-badge {
    background: #ef4444;
    color: #ffffff;
}
.theme-purple .top-banner-badge {
    background: #c084fc;
    color: #2e1065;
}
.theme-dark .top-banner-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Hiệu ứng Pulse Dot */
.top-banner-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: bannerDotPulse 1.4s infinite ease-in-out;
}
@keyframes bannerDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.7); }
}

.top-banner-message {
    font-weight: 600;
    color: inherit;
    font-size: 0.84rem;
}

/* Nút Kêu gọi Hành động (CTA Button) */
.top-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.theme-gold .top-banner-cta {
    background: rgba(255, 223, 115, 0.15);
    border-color: rgba(255, 223, 115, 0.4);
    color: #fff;
}
.theme-gold .top-banner-cta:hover {
    background: #FFDF73;
    border-color: #FFDF73;
    color: #0b0d10;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 169, 60, 0.35);
}
.theme-ocean .top-banner-cta {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: #fff;
}
.theme-ocean .top-banner-cta:hover {
    background: #38bdf8;
    color: #0c4a6e;
    transform: translateY(-1px);
}
.theme-fire .top-banner-cta {
    background: rgba(254, 202, 202, 0.2);
    border-color: rgba(254, 202, 202, 0.4);
    color: #fff;
}
.theme-fire .top-banner-cta:hover {
    background: #fff;
    color: #991b1b;
    transform: translateY(-1px);
}
.theme-purple .top-banner-cta {
    background: rgba(216, 180, 254, 0.2);
    border-color: rgba(216, 180, 254, 0.4);
    color: #fff;
}
.theme-purple .top-banner-cta:hover {
    background: #c084fc;
    color: #2e1065;
    transform: translateY(-1px);
}
.theme-dark .top-banner-cta {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.theme-dark .top-banner-cta:hover {
    background: #fff;
    color: #0b0d10;
    transform: translateY(-1px);
}

/* Nút Đóng Banner */
.top-banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: currentColor;
    opacity: 0.6;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.top-banner-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .top-banner-inner {
        padding: 7px 12px;
        min-height: 36px;
    }
    .top-banner-content {
        gap: 8px;
        padding-right: 22px;
    }
    .top-banner-message {
        font-size: 0.78rem;
    }
    .top-banner-badge {
        font-size: 0.62rem;
        padding: 1px 7px;
    }
    .top-banner-cta {
        font-size: 0.7rem;
        padding: 2px 10px;
    }
}
