/* Notification Styles */

.notification-badge {
    display: inline-block;
    background-color: var(--primary-color);
    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: var(--secondary-color);
    color: var(--text-primary);
    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 var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
}

/* Dark mode support for notifications container */
[data-theme="dark"] .notifications-container {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Alert styles in notifications container */
.notifications-container .alert {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .notifications-container .alert {
    border-color: var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Spinner styling for dark mode */
.spinner-border {
    border-color: currentColor;
}

[data-theme="dark"] .spinner-border {
    color: var(--text-secondary);
}

[data-theme="light"] .spinner-border {
    color: var(--text-primary);
}

.notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: rgba(194, 30, 127, 0.05);
    border-left: 4px solid var(--primary-color);
    padding-left: 8px;
}

.notification-item.read {
    background-color: var(--bg-secondary);
}

.notification-item:hover {
    background-color: var(--table-hover-bg);
}

/* Dark mode for notification items */
[data-theme="dark"] .notification-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .notification-item.unread {
    background-color: rgba(231, 75, 168, 0.1);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .notification-item.read {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .notification-item:hover {
    background-color: var(--table-hover-bg);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.notification-header strong {
    color: var(--text-primary);
    font-size: 14px;
}

.notification-icon {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: bold;
}

.notification-body {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Dark mode for notification header, body, and icon */
[data-theme="dark"] .notification-header strong {
    color: var(--text-primary);
}

[data-theme="dark"] .notification-icon {
    color: var(--primary-color);
}

[data-theme="dark"] .notification-body {
    color: var(--text-secondary);
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.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: var(--text-secondary);
}

.mark-read-btn {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.mark-read-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.delete-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.delete-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Notification Bell Icon */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 18px;
}

.notification-bell .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color);
    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: var(--bg-secondary);
    border: 1px solid var(--border-color);
    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 var(--border-color);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.notification-dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-dropdown-footer a {
    color: var(--primary-color);
    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;
}
