/* Notification System Styles - Modern Redesign */

/* Dropdown Container */
.notification-dropdown {
    position: relative;
    margin-right: 12px;
    display: inline-flex;
    vertical-align: middle;
}

/* Notification Button */
.notification-btn {
    position: relative;
    border: none;
    /* Cleaner look */
    background: transparent;
    color: #6b7280;
    /* Gray-500 */
    transition: all 0.2s ease;
    border-radius: 12px;
    /* Soft square/pill */
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-btn i {
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.notification-btn:hover,
.notification-dropdown.show .notification-btn {
    background: rgba(1, 61, 196, 0.08);
    /* Brand-600 with opacity */
    color: #013DC4;
    /* Brand-600 */
    border-color: transparent;
    transform: translateY(-1px);
}

.notification-btn:active,
.notification-btn:focus,
.notification-btn:focus-visible,
.btn-check:focus+.notification-btn,
.notification-btn.show {
    background: rgba(1, 61, 196, 0.08) !important;
    color: #013DC4 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Badge */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    /* Red-500 */
    color: white;
    border-radius: 999px;
    min-width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
    /* Dot style by default */
    border: 2px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

/* If numbers are needed, this class can be modified or an additional class added */
.notification-badge.with-count {
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0 4px;
    top: -2px;
    right: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown Menu */
.notification-menu {
    width: 360px;
    max-width: 90vw;
    border: 1px solid #e5e7eb;
    /* Gray-200 */
    border-radius: 24px;
    /* Matches dashboard panels */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-top: 12px;
    background: #ffffff;
    overflow: hidden;
    transform-origin: top right;
    animation: dropdown-slide-in 0.2s ease-out;
}

@keyframes dropdown-slide-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    /* Gray-100 */
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-title {
    margin: 0;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    /* Gray-900 */
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-title i {
    color: #013DC4;
    /* Brand-600 */
}

.mark-all-read {
    font-family: "Manrope", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #013DC4;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(1, 61, 196, 0.06);
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: rgba(1, 61, 196, 0.12);
    color: #00023e;
    /* Brand-900 */
}

/* Content Area */
.notification-content {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px 0;
}

/* Scrollbar Styling */
.notification-content::-webkit-scrollbar {
    width: 6px;
}

.notification-content::-webkit-scrollbar-track {
    background: transparent;
}

.notification-content::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

.notification-content::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Notification Items */
.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 4px 8px;
    border-radius: 16px;
}

.notification-item:hover {
    background: #f9fafb;
    /* Gray-50 */
}

.notification-item.unread {
    background: rgba(1, 61, 196, 0.04);
}

.notification-item.unread:hover {
    background: rgba(1, 61, 196, 0.08);
    /* Slightly darker on hover */
}

/* Indicator for unread items - Modern dot */
.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #013DC4;
    display: none;
    /* Hidden by default, using indicator element instead */
}

.notification-item-indicator {
    width: 8px;
    height: 8px;
    background: #013DC4;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(1, 61, 196, 0.1);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.notification-item-title {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    flex: 1;
    margin-right: 8px;
}

.notification-item.unread .notification-item-title {
    color: #00023e;
    /* Darker for unread */
}

.notification-item-time {
    color: #9ca3af;
    /* Gray-400 */
    font-size: 0.75rem;
    white-space: nowrap;
    font-weight: 500;
}

.notification-item-description {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
    /* Gray-500 */
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.notification-footer {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
    text-align: center;
}

.notification-footer .btn {
    font-family: "Manrope", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 8px 16px;
    width: 100%;
    display: block;
    transition: all 0.2s ease;
}

/* Empty State */
.notification-empty {
    padding: 40px 24px;
    text-align: center;
    color: #9ca3af;
}

.notification-empty i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #e5e7eb;
    display: block;
}

.notification-empty p {
    font-weight: 500;
}

/* Loading State */
.notification-loading {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner-border {
    color: #013DC4;
}

/* Theme specifics */
/* Professional Theme Overrides if needed, but modern UI aims for consistency */
.theme-professional .notification-btn {
    color: #6b7280;
}

.theme-professional .notification-btn:hover {
    color: #013DC4;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .notification-dropdown {
        position: static;
        /* Allows full width on mobile */
    }

    .notification-menu {
        position: absolute;
        top: 100%;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        margin-top: 8px;
    }

    .notification-item {
        padding: 12px 16px;
    }
}