/* Header Icon Items */
.header-icon-item {
    display: flex;
    align-items: center;
}

.header-icon-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    padding: 6px 10px !important;
    line-height: 1 !important;
    cursor: pointer;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-bell .nav-link {
    position: relative;
}

.notification-bell .notification-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    background-color: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notification-bell .notification-badge.d-none {
    display: none !important;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 480px;
    border-radius: 5px;
    z-index: 1050;
    display: none;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

/* Light theme */
.light-theme .notification-dropdown {
    background-color: #fff;
    border: 1px solid #e8e8f7;
    box-shadow: 0px 16px 18px rgba(135, 135, 182, 0.1);
}

/* Dark theme */
.dark-theme .notification-dropdown {
    background-color: #181a1d;
    border: 1px solid rgba(138, 153, 191, 0.125);
    box-shadow: 0px 16px 18px rgba(28, 28, 39, 0.2);
}

/* Dropdown Header */
.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
}

.dark-theme .notification-dropdown-header {
    border-bottom: 1px solid rgba(138, 153, 191, 0.125);
    color: #fff;
}

.light-theme .notification-dropdown-header {
    border-bottom: 1px solid #e8e8f7;
    color: #1d212f;
}

.notification-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.notification-dropdown-header .mark-all-read,
.notification-dropdown-header .clear-all-notifications {
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    color: var(--primary-bg-color, #6259ca);
}

.notification-dropdown-header .mark-all-read:hover,
.notification-dropdown-header .clear-all-notifications:hover {
    text-decoration: underline;
}

/* Notification List */
.notification-dropdown-list {
    max-height: 420px;
    overflow-y: auto;
}

.notification-dropdown-list::-webkit-scrollbar {
    width: 5px;
}

.dark-theme .notification-dropdown-list::-webkit-scrollbar-track {
    background: #181a1d;
}

.dark-theme .notification-dropdown-list::-webkit-scrollbar-thumb {
    background: #3c3c60;
    border-radius: 3px;
}

.light-theme .notification-dropdown-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.light-theme .notification-dropdown-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
    gap: 12px;
}

.dark-theme .notification-item {
    border-bottom: 1px solid rgba(138, 153, 191, 0.125);
    color: #fff;
}

.light-theme .notification-item {
    border-bottom: 1px solid #e8e8f7;
    color: #1d212f;
}

.dark-theme .notification-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.light-theme .notification-item:hover {
    background-color: #f0f0f8;
}

.notification-item.unread {
    position: relative;
}

.dark-theme .notification-item.unread {
    background-color: rgba(210, 0, 7, 0.06);
}

.light-theme .notification-item.unread {
    background-color: #f8f0f0;
}

.notification-item .notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.dark-theme .notification-item .notification-icon {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--primary-bg-color, #6259ca);
}

.light-theme .notification-item .notification-icon {
    background-color: rgba(98, 89, 202, 0.08);
    color: var(--primary-bg-color, #6259ca);
}

.dark-theme .notification-item:hover .notification-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

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

.notification-item .notification-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.dark-theme .notification-item .notification-title {
    color: #fff;
}

.light-theme .notification-item .notification-title {
    color: #1d212f;
}

.notification-item .notification-body {
    font-size: 12px;
    margin-bottom: 4px;
}

.dark-theme .notification-item .notification-body {
    color: rgba(255, 255, 255, 0.6);
}

.light-theme .notification-item .notification-body {
    color: #7b8191;
}

.notification-item .notification-time {
    font-size: 11px;
}

.dark-theme .notification-item .notification-time {
    color: rgba(255, 255, 255, 0.4);
}

.light-theme .notification-item .notification-time {
    color: #a8afc7;
}

.notification-item .unread-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc3545;
    margin-top: 6px;
}

/* Empty State */
.notification-empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

.dark-theme .notification-empty {
    color: rgba(255, 255, 255, 0.4);
}

.light-theme .notification-empty {
    color: #a8afc7;
}

.notification-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Loading State */
.notification-loading {
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
}

.dark-theme .notification-loading {
    color: rgba(255, 255, 255, 0.4);
}

.light-theme .notification-loading {
    color: #a8afc7;
}

/* Infinite Scroll Spinner */
.notification-dropdown-list .load-more-spinner {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.dark-theme .load-more-spinner .spinner-border {
    color: rgba(255, 255, 255, 0.4);
}

.light-theme .load-more-spinner .spinner-border {
    color: #a8afc7;
}

/* Notification Preferences - Accordion */
.noti-accordion-item {
    border-radius: 6px;
    margin-bottom: 4px;
}

.dark-theme .noti-accordion-item {
    border: 1px solid rgba(138, 153, 191, 0.1);
}

.light-theme .noti-accordion-item {
    border: 1px solid #e8e8f7;
}

.noti-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.dark-theme .noti-accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.light-theme .noti-accordion-header:hover {
    background-color: #f8f9fa;
}

.noti-accordion-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.noti-accordion-arrow {
    font-size: 12px;
    transition: transform 0.15s ease;
}

.noti-accordion-item.open .noti-accordion-arrow {
    transform: rotate(90deg);
}

.dark-theme .noti-accordion-arrow {
    color: rgba(255, 255, 255, 0.4);
}

.light-theme .noti-accordion-arrow {
    color: #a8afc7;
}

.noti-accordion-title {
    font-size: 13px;
    font-weight: 600;
}

.dark-theme .noti-accordion-title {
    color: #fff;
}

.light-theme .noti-accordion-title {
    color: #1d212f;
}

.noti-accordion-desc {
    font-size: 11px;
}

.dark-theme .noti-accordion-desc {
    color: rgba(255, 255, 255, 0.3);
}

.light-theme .noti-accordion-desc {
    color: #a8afc7;
}

.noti-accordion-count {
    font-size: 11px;
}

.dark-theme .noti-accordion-count {
    color: rgba(255, 255, 255, 0.35);
}

.light-theme .noti-accordion-count {
    color: #a8afc7;
}

.noti-accordion-body {
    padding: 0 14px 10px 14px;
}

/* Preference rows inside accordion */
.noti-pref-group-labels {
    display: grid;
    grid-template-columns: 1fr 56px 56px;
    padding: 0 0 4px 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-theme .noti-pref-group-labels {
    color: rgba(255, 255, 255, 0.3);
}

.light-theme .noti-pref-group-labels {
    color: #a8afc7;
}

.noti-pref-group-labels span:not(:first-child) {
    text-align: center;
}

.noti-pref-row {
    display: grid;
    grid-template-columns: 1fr 56px 56px;
    align-items: center;
    padding: 5px 0;
}

.dark-theme .noti-pref-row {
    border-bottom: 1px solid rgba(138, 153, 191, 0.06);
}

.light-theme .noti-pref-row {
    border-bottom: 1px solid #f0f0f8;
}

.noti-pref-row:last-child {
    border-bottom: none;
}

.noti-pref-label {
    font-size: 12px;
}

.dark-theme .noti-pref-label {
    color: rgba(255, 255, 255, 0.7);
}

.light-theme .noti-pref-label {
    color: #1d212f;
}

.noti-pref-toggle-wrap {
    display: flex;
    justify-content: center;
}

.noti-pref-toggle-wrap .form-check-input {
    margin: 0;
}

/* Responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        width: 300px;
        right: -60px;
    }

    .noti-pref-group-labels,
    .noti-pref-row {
        grid-template-columns: 1fr 60px 60px;
    }
}
