/* Announcement Banner CSS - Isolated Component Only */
.announcement-banner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2147483647; /* Maximum practical z-index value */
    pointer-events: none; /* Allows clicks to pass through wrapper */
}

.announcement-banner {
    width: 100%;
    background: linear-gradient(135deg, #0e5c2e 0%, #086A3B 25%, #0a8c3a 50%, #0e8c3a 75%, #1a5f2c 100%);
    color: white;
    padding: 22px 30px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    animation: bannerSlideDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    border-bottom: 4px solid #FFCC00;
    backdrop-filter: blur(10px);
    background-color: rgba(8, 106, 59, 0.95);
    transform: translateZ(0);
    will-change: transform;
    display: none;
    pointer-events: auto; /* Enable clicks only on banner */
}

/* Decorative elements */
.announcement-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 204, 0, 0.1) 0%, rgba(255, 204, 0, 0) 50%, rgba(255, 204, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.banner-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.announcement-text {
    flex: 1;
    padding-right: 40px;
    box-sizing: border-box;
    min-width: 0;
}

.announcement-text p {
    margin: 8px 0;
    font-size: 1.08rem;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.announcement-text p:first-child {
    font-weight: 800;
    font-size: 1.45rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.announcement-text p:first-child::before {
    content: "🎄";
    font-size: 1.8rem;
    animation: bounce 2s infinite ease-in-out;
}

.announcement-text p:nth-child(2) {
    font-weight: 600;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.98);
    margin-bottom: 8px;
}

.announcement-text p:last-child {
    font-weight: 400;
    opacity: 0.95;
    margin-top: 12px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.close-banner {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: white;
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    box-sizing: border-box;
    font-family: inherit;
    padding: 0;
    position: relative;
    z-index: 3;
}

.close-banner:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.12) rotate(90deg);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.close-banner:active {
    transform: scale(0.96) rotate(90deg);
    transition: transform 0.1s ease;
}

.auto-close-notice {
    font-size: 0.88rem;
    opacity: 0.92;
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.18);
    padding: 12px 18px;
    border-radius: 10px;
    width: fit-content;
    border-left: 4px solid #FFCC00;
    backdrop-filter: blur(5px);
}

.auto-close-notice i {
    font-size: 1rem;
    color: #FFCC00;
}

@keyframes bannerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bannerSlideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

.banner-closing {
    animation: bannerSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Festive decoration */
.festive-decoration {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.3;
    animation: float 6s infinite ease-in-out;
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 992px) {
    .announcement-banner {
        padding: 20px 25px;
    }
    
    .banner-content {
        gap: 25px;
    }
    
    .announcement-text {
        padding-right: 30px;
    }
    
    .announcement-text p:first-child {
        font-size: 1.35rem;
    }
    
    .announcement-text p:nth-child(2) {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .announcement-banner {
        padding: 18px 20px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        align-items: stretch;
    }
    
    .announcement-text {
        padding-right: 0;
        text-align: center;
    }
    
    .announcement-text p {
        font-size: 1.05rem;
        line-height: 1.5;
        margin: 8px 0;
    }
    
    .announcement-text p:first-child {
        font-size: 1.3rem;
        margin-bottom: 12px;
        justify-content: center;
    }
    
    .announcement-text p:nth-child(2) {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }
    
    .announcement-text p:last-child {
        margin-top: 15px;
        font-size: 1rem;
    }
    
    .close-banner {
        align-self: center;
        margin-top: 10px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.4rem;
    }
    
    .auto-close-notice {
        justify-content: center;
        text-align: center;
        font-size: 0.85rem;
        margin-top: 20px;
        width: 100%;
        padding: 10px 15px;
    }
    
    .festive-decoration {
        top: 5px;
        right: 10px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .announcement-banner {
        padding: 16px 18px;
    }
    
    .announcement-text p {
        font-size: 1rem;
    }
    
    .announcement-text p:first-child {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .announcement-text p:nth-child(2) {
        font-size: 1.05rem;
    }
    
    .announcement-text p:last-child {
        font-size: 0.95rem;
    }
    
    .close-banner {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.3rem;
    }
    
    .auto-close-notice {
        font-size: 0.8rem;
        gap: 10px;
        padding: 10px 14px;
        margin-top: 16px;
    }
}

/* Prevent banner from interfering with iOS Safari UI */
@supports (-webkit-touch-callout: none) {
    .announcement-banner-wrapper {
        padding-top: env(safe-area-inset-top);
    }
    
    .announcement-banner {
        padding: max(22px, env(safe-area-inset-top)) 
                 30px 
                 max(22px, env(safe-area-inset-bottom)) 
                 30px;
    }
}

/* Print styles - hide banner when printing */
@media print {
    .announcement-banner-wrapper,
    .announcement-banner {
        display: none !important;
    }
}
