/* Clean Announcement Bubble System */
.announcement-bubble {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F7961E 0%, #ff8c42 100%);
    color: white;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
    box-shadow: 0 4px 20px rgba(247, 150, 30, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: bubblePulse 2s infinite;
    border: 3px solid white;
}

.announcement-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(247, 150, 30, 0.6);
}

.announcement-bubble i {
    font-size: 24px;
    animation: bubbleShake 0.5s ease-in-out infinite alternate;
}

/* Bubble animations */
@keyframes bubblePulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(247, 150, 30, 0.4), 0 0 0 0 rgba(247, 150, 30, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(247, 150, 30, 0.4), 0 0 0 10px rgba(247, 150, 30, 0);
    }
}

@keyframes bubbleShake {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* Type-specific bubble colors */
.announcement-bubble.minor {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    animation: bubblePulseMinor 2s infinite;
}

.announcement-bubble.minor:hover {
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.6);
}

.announcement-bubble.medium {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    animation: bubblePulseMedium 2s infinite;
}

.announcement-bubble.medium:hover {
    box-shadow: 0 6px 30px rgba(245, 158, 11, 0.6);
}

.announcement-bubble.major {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    animation: bubblePulseMajor 2s infinite;
}

.announcement-bubble.major:hover {
    box-shadow: 0 6px 30px rgba(239, 68, 68, 0.6);
}

.announcement-bubble.update {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    animation: bubblePulseUpdate 2s infinite;
}

.announcement-bubble.update:hover {
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

/* Type-specific pulse animations */
@keyframes bubblePulseMinor {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

@keyframes bubblePulseMedium {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4), 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4), 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

@keyframes bubblePulseMajor {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4), 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4), 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

@keyframes bubblePulseUpdate {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4), 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4), 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

/* Modal for bubble announcement */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1003;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.announcement-modal.show {
    display: flex;
}

.announcement-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.announcement-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.announcement-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #18375F;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-modal-close {
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.announcement-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.announcement-modal-close i {
    font-size: 18px;
}

.announcement-modal-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #2C3E50;
    margin: 0;
}

/* Enhanced modal message styling for updates with links */
.announcement-modal-message a {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all; /* Helps with long URLs on mobile */
}

.announcement-modal-message a:hover {
    text-decoration: underline;
    color: #2563EB;
}

/* Dismissed state - stop animations but keep bubble visible */
.announcement-bubble.dismissed {
    animation: none; /* Stop the pulsing animation */
    opacity: 0.8;
}

.announcement-bubble.dismissed i {
    animation: none; /* Stop the bell shaking animation */
}

.announcement-bubble.dismissed:hover {
    opacity: 1;
    transform: scale(1.05); /* Smaller hover effect for dismissed state */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .announcement-bubble {
        bottom: 16px;
        left: 16px;
        width: 56px;
        height: 56px;
    }
    
    .announcement-bubble i {
        font-size: 20px;
    }
    
    .announcement-modal-content {
        margin: 16px;
        padding: 20px;
        max-width: 500px;
    }
    
    .announcement-modal-title {
        font-size: 1.125rem;
    }

    .announcement-modal-message {
        font-size: 14px;
    }
    
    .announcement-modal-message a {
        font-size: 13px;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .announcement-bubble {
        width: 52px;
        height: 52px;
    }
    
    .announcement-bubble i {
        font-size: 18px;
    }

    .announcement-modal-content {
        max-width: 95%;
        padding: 16px;
    }
}

/* Minor announcement modal glow */
/* .announcement-modal-content.minor {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(59, 130, 246, 0.4),
        0 0 80px rgba(59, 130, 246, 0.2);
    border: 2px solid rgba(59, 130, 246, 0.3);
} */

/* Medium announcement modal glow */
.announcement-modal-content.medium {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(245, 158, 11, 0.4),
        0 0 80px rgba(245, 158, 11, 0.2);
    border: 2px solid rgba(245, 158, 11, 0.3);
}

/* Major announcement modal glow */
.announcement-modal-content.major {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(239, 68, 68, 0.4),
        0 0 80px rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

/* Update announcement modal glow */
/* .announcement-modal-content.update {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(16, 185, 129, 0.4),
        0 0 80px rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(16, 185, 129, 0.3);
} */