/* =========================================
   GOVERNMENT PROFESSIONAL NOTIFICATION SYSTEM
   Clean, authoritative, legible, and responsive.
   ========================================= */

/* Dropdown Menu Override */
.dropdown-menu.notification-dropdown-menu {
    padding: 0;
    border: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    overflow: hidden;
    min-width: 380px;
    max-width: 420px;
    transform-origin: top right;
    z-index: 1050; /* Ensure high z-index */
}

/* Container Scrolling */
.notification-list-container {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    background-color: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* ===== NOTIFICATION ITEM ===== */
.notification-list-item,
a.notification-list-item,
div.notification-list-item {
    display: flex !important;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-color: #ffffff;
    text-decoration: none !important;
    box-sizing: border-box;
}

.notification-list-item:hover {
    background-color: #f8fafc !important;
}

/* ===== UNREAD STATE ===== */
/* Light Blue Background */
.notification-list-item.unread,
.notification-list-container .notification-list-item.unread {
    background-color: #ecf6ff !important;
}

/* AGGRESSIVE TRANSPARENCY FIX */
/* Force every single child element to have transparent background so blue shows through */
.notification-list-item.unread > *,
.notification-list-item.unread div,
.notification-list-item.unread p,
.notification-list-item.unread h6,
.notification-list-item.unread span:not(.notification-item-badge),
.notification-list-item.unread i {
    background-color: transparent !important;
    background: transparent !important;
}

/* Primary Indicator Line */
.notification-list-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #1e88e5;
}

/* ===== READ STATE ===== */
.notification-list-item.read {
    background-color: #ffffff !important;
}

/* ===== ICON ===== */
.notification-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #ffffff !important; /* White bg for icon box */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    z-index: 2;
    position: relative;
}

/* Specific Unread Icon Box */
.notification-list-item.unread .notification-item-icon {
    background-color: #ffffff !important; 
    border-color: #90caf9;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.15);
}

/* ICON VISIBILITY FIX */
.notification-item-icon i,
.notification-item-icon svg,
.notification-item-icon .fas,
.notification-item-icon .far,
.notification-item-icon .fa,
.notification-item-icon .bi {
    font-size: 16px !important;
    display: inline-block !important;
    visibility: visible !important;
    color: #1e88e5 !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    min-width: 16px !important;
    min-height: 16px !important;
    opacity: 1 !important;
    background: transparent !important; /* Fix blending */
    text-align: center !important;
    /* Do NOT enforce font-family here - let the library class handle it */
}

.notification-list-item.read .notification-item-icon i {
    color: #94a3b8 !important;
}

/* ===== NOTIFICATION BELL BADGE ===== */
.notification-bell-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    display: flex; /* Ensure proper centering */
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.notification-bell-btn:hover {
    color: #f1f5f9;
}

.notification-bell-btn i {
    font-size: 20px; /* Adjust bell size */
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 2px 5px; /* Small padding */
    border-radius: 50%; /* Circle-ish */
    background-color: #ef4444; /* Alert Red */
    color: white;
    font-size: 10px; /* Small text */
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid #ffffff; /* White border for contrast */
}

/* ===== FONT AWESOME MAPPING CLASSES ===== */
/* Map legacy 'fa-file-text' to 'fa-file-lines' via class composition if possible, 
   but since we can't change HTML easily, we style the specific legacy classes */

.fa-file-text::before {
    content: "\f15c" !important; /* fa-file-lines */
}

/* Ensure 'fa-file' (which user mentioned works) is also good */
.fa-file::before {
    content: "\f15b" !important;
}

/* Additional common legacy icons */
.fa-edit::before { content: "\f044" !important; }
.fa-check-circle::before { content: "\f058" !important; }
.fa-times-circle::before { content: "\f057" !important; }
.fa-info-circle::before { content: "\f05a" !important; }
.fa-exclamation-circle::before { content: "\f06a" !important; }

/* ===== NOTIFICATION LIST CONTAINER ===== */
.notification-list-container {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    background-color: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Force text elements to be transparent */
.notification-item-content *,
.notification-item-content p,
.notification-item-content h6,
.notification-item-content div,
.notification-item-content span {
    background-color: transparent !important;
    background: transparent !important;
}

/* ===== TYPOGRAPHY ===== */
.notification-item-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    display: block;
}

.notification-list-item.read .notification-item-title {
    font-weight: 500;
    color: #475569;
}

/* Time - Compact */
.notification-item-time {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}
.notification-item-time i {
    font-size: 10px !important;
    color: #94a3b8 !important; /* Always gray for time icon */
}

/* Text */
.notification-item-text {
    margin: 4px 0 6px 0;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== BADGES ===== */
.notification-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    width: fit-content;
    margin-top: 4px;
    background-color: #f1f5f9 !important; /* Fallback */
    border: 1px solid #e2e8f0;
}

/* Re-apply badge backgrounds (must override transparency rule) */
.notification-list-item.unread .notification-item-badge.badge-submission { 
    background-color: #dcfce7 !important; border-color: #86efac !important; color: #14532d !important;
}
.badge-submission { background-color: #dcfce7 !important; border-color: #86efac !important; color: #14532d !important; }

.notification-list-item.unread .notification-item-badge.badge-revision { 
    background-color: #fef9c3 !important; border-color: #fde047 !important; color: #713f12 !important;
}
.badge-revision { background-color: #fef9c3 !important; border-color: #fde047 !important; color: #713f12 !important; }

.notification-list-item.unread .notification-item-badge.badge-finalisasi { 
    background-color: #dbeafe !important; border-color: #93c5fd !important; color: #1e3a8a !important;
}
.badge-finalisasi { background-color: #dbeafe !important; border-color: #93c5fd !important; color: #1e3a8a !important; }

.notification-list-item.unread .notification-item-badge.badge-verifikasi { 
    background-color: #f3e8ff !important; border-color: #d8b4fe !important; color: #581c87 !important;
}
.badge-verifikasi { background-color: #f3e8ff !important; border-color: #d8b4fe !important; color: #581c87 !important; }


/* ===== MODAL HEADER & FOOTER ===== */
.notification-modal-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}
.notification-modal-title { font-weight: 700; font-size: 1.1rem; color: #0f172a; margin: 0; }
.notification-modal-subtitle { font-size: 0.8rem; color: #64748b; margin: 0; }

.notification-modal-footer {
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}
.notification-view-all-link {
    font-weight: 600;
    color: #1e88e5;
    font-size: 0.85rem;
    text-decoration: none;
}

/* Empty State */
.notification-empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: center !important;
    background: #ffffff !important;
    min-height: 220px !important;
    padding: 0 !important;
}

.notification-empty-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px 20px 20px 20px !important;
}

.notification-empty-content i {
    font-size: 3rem !important;
    margin-bottom: 12px !important;
    color: #cbd5e1 !important;
    display: block !important;
}

.notification-empty-content h6 {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 6px 0 !important;
}

.notification-empty-content p {
    font-size: 0.85rem !important;
    color: #64748b !important;
    margin: 0 !important;
}

/* Empty State Footer Section - Make Button Very Visible */
/* Ultra-specific selectors to override Bootstrap */
.notification-empty-state .btn,
.notification-empty-state .btn.btn-primary,
.notification-empty-state a.btn,
.notification-empty-state a.btn.btn-primary,
.notification-empty-state a.btn.btn-primary.mt-3,
.notification-list-container .notification-empty-state a.btn,
.dropdown-menu .notification-empty-state a.btn,
div.notification-empty-state > a.btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 0 0 8px 8px !important;
    background-color: #1e88e5 !important;
    background-image: none !important;
    background: #1e88e5 !important;
    color: #ffffff !important;
    border: none !important;
    border-top: 2px solid #1565c0 !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.notification-empty-state .btn:hover,
.notification-empty-state .btn.btn-primary:hover,
.notification-empty-state a.btn:hover,
.notification-empty-state a.btn.btn-primary:hover,
.notification-empty-state a.btn.btn-primary.mt-3:hover {
    background-color: #1565c0 !important;
    background: #1565c0 !important;
    color: #ffffff !important;
}

.notification-empty-state .btn i,
.notification-empty-state a.btn i {
    font-size: 14px !important;
    color: #ffffff !important;
}
