/* Notification Badge */
#notificationBadge {
    font-size: 0.65rem;
    transform: translate(-50%, -30%) !important;
}

/* Notification Dropdown */
.notification-dropdown-container {
    width: 350px;
    padding: 0;
    overflow: hidden;
    max-height: 500px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.5rem;
}

.notification-dropdown {
    max-height: 450px;
    overflow-y: auto;
}

/* Dropdown Header */
.notification-header {
    background-color: rgba(13, 110, 253, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.notification-header h6 {
    font-weight: 600;
}

/* Dropdown Footer */
.notification-footer {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Common Notification Item Styling */
.notification-item {
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.notification-item.unread {
    background-color: rgba(13, 110, 253, 0.05);
    border-left-color: #0d6efd;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transform: translateY(-1px);
}

/* Notification Item Link Styling */
.notification-content-link {
    display: block;
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 0.25rem;
    position: relative;
    z-index: 1;
}

.notification-content-link:hover {
    background-color: rgba(13, 110, 253, 0.05);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Avatar Styling */
.notification-mini-avatar,
.notification-avatar {
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

/* Smaller profile pictures for notification dropdown */
.notification-dropdown .notification-mini-avatar {
    width: 30px;
    height: 30px;
}

/* Regular size for the notification page */
.notification-list .notification-avatar {
    width: 50px;
    height: 50px;
}

/* Make notification items more compact in the dropdown */
.notification-dropdown .notification-item {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-dropdown .notification-item:last-child {
    border-bottom: none;
}

/* Adjust text size in notification dropdown */
.notification-dropdown .notification-content p {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.notification-dropdown .notification-content small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Badge styling for new notifications */
.notification-item .badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    transform: scale(0.8);
}

/* Archive Button Styling */
.archive-btn {
    opacity: 0.7;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2; /* Ensure it stays above the card for clicks */
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.archive-btn:hover {
    opacity: 1;
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    transform: scale(1.1);
}

.archive-btn:active {
    transform: scale(0.95);
}

.archive-btn i {
    font-size: 0.9rem;
}

/* Main Notification Page */
.notification-list {
    max-width: 800px;
    margin: 0 auto;
}

.notification-list .notification-item {
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-left-width: 3px;
    transition: all 0.2s ease;
}

.notification-list .notification-content {
    padding: 0.5rem 0;
}

.notification-list .notification-content p {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.notification-list .notification-content small {
    opacity: 0.7;
}

/* Empty state styling */
.notification-empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

/* Animation for archiving notifications */
.notification-item.archiving {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

/* Prevent text selection on notification items for better UX when clicking */
.notification-item {
    user-select: none;
}

/* The "Mark All Read" and "Clear All" buttons */
#markAllAsReadBtn, #archiveAllBtn {
    transition: all 0.2s ease;
}

#markAllAsReadBtn:hover, #archiveAllBtn:hover {
    transform: translateY(-1px);
}

#markAllAsReadBtn:active, #archiveAllBtn:active {
    transform: translateY(1px);
}

/* Custom alert styling for notification actions */
.notification-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
    animation: slideIn 0.3s ease-out forwards;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

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

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

.notification-alert.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* Pagination Styling */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    border-radius: 0.25rem;
    margin: 0 0.15rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    font-weight: 600;
}

/* Settings Page Styles */
.form-check-input {
    cursor: pointer;
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
}

.form-switch .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    font-weight: 500;
}

/* Mark as Read Button Styling */
.mark-read-btn {
    opacity: 0.7;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2; /* Ensure it stays above the card for clicks */
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mark-read-btn:hover {
    opacity: 1;
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.2);
    color: #198754;
    transform: scale(1.1);
}

.mark-read-btn:active {
    transform: scale(0.95);
}

.mark-read-btn i {
    font-size: 0.9rem;
}

/* Animation for removing notifications */
.notification-item.removing {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease-out;
}

/* Prevent text selection on notification items for better UX when clicking */
.notification-item {
    user-select: none;
}