/* Notification Bell Component */
.notification-bell-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: inherit;
}

.bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Announcements Preview */
.announcements-preview {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.announcement-preview {
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    width: 350px;
    border-left: 4px solid #FFD700;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-preview:nth-child(1) {
    animation-delay: 0s;
}

.announcement-preview:nth-child(2) {
    animation-delay: 0.15s;
}

.announcement-preview:nth-child(3) {
    animation-delay: 0.3s;
}

.announcement-preview:nth-child(4) {
    animation-delay: 0.45s;
}

.announcement-preview:nth-child(5) {
    animation-delay: 0.6s;
}

.preview-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

/* Bell Icon */
.bell-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.bell-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.6);
}

.bell-icon.active {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.6);
}

.bell-icon i {
    animation: bellRing 1.2s ease-in-out infinite;
}

.bell-icon.active i {
    animation: none;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
    50% { transform: rotate(-10deg); }
    70% { transform: rotate(10deg); }
    90% { transform: rotate(-5deg); }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Announcements Container */
.announcements-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100vh;
    background: white;
    border-radius: 0;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
    z-index: 10000;
}

.announcements-container.closing {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.announcements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.announcements-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.announcements-header .btn-close {
    background: transparent;
    font-size: 24px;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    padding: 4px 8px;
    line-height: 1;
}

.announcements-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.announcements-body {
    overflow-y: auto;
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f7 100%);
}

.announcement-item {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #FFD700;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    border-left: 4px solid #FFD700;
}

.announcement-item:last-child {
    margin-bottom: 0;
}

.announcement-item:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.announcement-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.announcement-body {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.announcement-body p {
    margin: 0 0 8px 0;
}

.announcement-body p:last-child {
    margin-bottom: 0;
}

.announcement-body ul,
.announcement-body ol {
    margin: 8px 0;
    padding-left: 20px;
}

.announcement-body li {
    margin-bottom: 4px;
}

.announcement-date {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.announcement-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    color: #FFD700;
}

.announcement-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

.announcement-end {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    text-align: center;
}

.announcement-end p {
    margin: 0;
    font-size: 13px;
    color: #999;
}

/* Scrollbar Styling */
.announcements-body::-webkit-scrollbar {
    width: 6px;
}

.announcements-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.announcements-body::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

.announcements-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Dark Mode Support - Bootstrap 5 Standard */
[data-bs-theme="dark"] .announcement-preview {
    background: #15171C;
    border-left: 4px solid #FFD700;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .preview-text {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .announcements-container {
    background: #0F1013;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .announcements-header {
    background: linear-gradient(135deg, #15171C 0%, #0F1013 100%);
    border-bottom: 1px solid #262A33;
}

[data-bs-theme="dark"] .announcements-header h5 {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .announcements-header .btn-close {
    opacity: 0.5;
}

[data-bs-theme="dark"] .announcements-header .btn-close:hover {
    opacity: 1;
}

[data-bs-theme="dark"] .announcements-body {
    background: linear-gradient(135deg, #0F1013 0%, #15171C 100%);
}

[data-bs-theme="dark"] .announcement-item {
    background: #15171C;
    border: 1px solid #262A33;
    border-left: 4px solid #FFD700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .announcement-item:hover {
    background-color: #1a1d24;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
}

[data-bs-theme="dark"] .announcement-title {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .announcement-body {
    color: #b0b0b0;
}

[data-bs-theme="dark"] .announcement-date {
    color: #707070;
}

[data-bs-theme="dark"] .announcement-loading {
    color: #FFD700;
}

[data-bs-theme="dark"] .announcement-end p {
    color: #707070;
}

[data-bs-theme="dark"] .announcements-body::-webkit-scrollbar-track {
    background: #15171C;
}

[data-bs-theme="dark"] .announcements-body::-webkit-scrollbar-thumb {
    background: #3a3f4a;
}

[data-bs-theme="dark"] .announcements-body::-webkit-scrollbar-thumb:hover {
    background: #4a5060;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-bell-container {
        bottom: 40px;
        right: 20px;
        z-index: 9998;
    }

    .bell-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .announcements-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        top: 0;
        right: 0;
        bottom: auto;
        border-radius: 0;
        animation: slideInRight 0.3s ease-out;
    }

    .announcements-preview {
        display: none;
    }
}

@media (max-width: 480px) {
    .notification-bell-container {
        bottom: 20px;
        right: 20px;
    }

    .bell-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .announcements-container {
        width: 100vw;
        height: 100vh;
    }

    .announcement-item {
        padding: 14px 14px;
    }

    .announcement-title {
        font-size: 14px;
    }

    .announcement-body {
        font-size: 12px;
    }

    .announcements-header {
        padding: 14px 16px;
    }

    .announcements-body {
        padding: 10px;
    }
}
