/* Notification Styles */

.notification-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

.notification-indicator {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    z-index: 1000;
    animation: slideIn 0.3s ease-in-out;
}

.notification-indicator.active {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notifications-container {
    max-width: 500px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* Dark mode support for notifications container */
[data-theme="dark"] .notifications-container {
    background-color: #2b2d31;
    border-color: #404249;
}

/* Alert styles in notifications container */
.notifications-container .alert {
    border: 1px solid #d4edda;
    background-color: #f8f9fa;
    color: #333;
}

[data-theme="dark"] .notifications-container .alert {
    border-color: #404249;
    background-color: #2b2d31;
    color: #b5bac1;
}

/* Spinner styling for dark mode */
.spinner-border {
    border-color: currentColor;
}

[data-theme="dark"] .spinner-border {
    color: #c0c0c0;
}

[data-theme="light"] .spinner-border {
    color: #333;
}

.notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: #f0f8ff;
    border-left: 4px solid #007bff;
    padding-left: 8px;
}

.notification-item.read {
    background-color: #fff;
}

.notification-item:hover {
    background-color: #f5f5f5;
}

/* Dark mode for notification items */
[data-theme="dark"] .notification-item {
    border-bottom-color: #404249;
}

[data-theme="dark"] .notification-item.unread {
    background-color: #2a3035;
    border-left-color: #4a9eff;
}

[data-theme="dark"] .notification-item.read {
    background-color: #2b2d31;
}

[data-theme="dark"] .notification-item:hover {
    background-color: #313338;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.notification-header strong {
    color: #333;
    font-size: 14px;
}

.notification-icon {
    font-size: 12px;
    color: #007bff;
    font-weight: bold;
}

.notification-body {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Dark mode for notification header, body, and icon */
[data-theme="dark"] .notification-header strong {
    color: #f2f3f5;
}

[data-theme="dark"] .notification-icon {
    color: #4a9eff;
}

[data-theme="dark"] .notification-body {
    color: #b5bac1;
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #999;
}

.notification-footer small {
    flex-grow: 1;
}

.notification-footer .btn {
    padding: 2px 6px;
    font-size: 10px;
    margin-left: 4px;
}

/* Dark mode for notification footer */
[data-theme="dark"] .notification-footer {
    color: #72767d;
}

.mark-read-btn {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.mark-read-btn:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.delete-btn {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* Notification Bell Icon */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 18px;
}

.notification-bell .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 10px;
}

.notification-dropdown-header {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown-footer {
    padding: 12px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.notification-dropdown-footer a {
    color: #007bff;
    text-decoration: none;
}

.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

/* Animation for notification appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item {
    animation: fadeIn 0.3s ease-in-out;
}
