.expiring-alert-popup-overlay {

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;

}

.expiring-alert-popup-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}


.expiring-alert-popup-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.expiring-alert-container,.debt-alert-container {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Popup Header */
.popup-header,.debt-popup-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.popup-header h2, .debt-popup-header h2{
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.close-popup {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-popup:hover {
    color: #333;
}

/* Popup Content */
.popup-content,.debt-popup-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Notification Controls */
.notification-controls,.debt-notification-controls {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.notification-controls button, .debt-notification-controls button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

#mark-all-read {
    background-color: #e3f2fd;
    color: #1976d2;
}

#mark-all-read:hover {
    background-color: #bbdefb;
}

#delete-selected {
    background-color: #ffebee;
    color: #d32f2f;
}

#delete-selected:hover:not(:disabled) {
    background-color: #ffcdd2;
}

#delete-selected:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Notification Items */
.notification-item,.notification-items {
    --expired-bg: #ffebee;
    --expiring-soon-bg: #fff8e1;
    --expiring-reminder-bg: #e3f2fd;
    --read-bg: #f5f5f5;
    --accent-red: #f44336;
    --accent-orange: #ff9800;
    --accent-blue: #2196f3;
    --accent-gray: #9e9e9e;
    cursor: pointer;

    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    background-color: var(--expiring-soon-bg);
    border-left: 4px solid var(--accent-orange);
    transition: all 0.3s ease;
}

.notification-item:hover, .notification-items:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notification-item.read, .notification-items.read {
    background-color: var(--read-bg);
    border-left-color: var(--accent-gray);
}

.notification-item.expired,  {
    background-color: var(--expired-bg);
    border-left-color: var(--accent-red);
}

.notification-item.expiring_soon {
    background-color: var(--expiring-soon-bg);
    border-left-color: var(--accent-orange);
}

.notification-item.expiring_reminder,.notification-items.over_due {
    background-color: var(--expiring-reminder-bg);
    border-left-color: var(--accent-blue);
}

.notification-header,.notification-headers {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-header input[type="checkbox"], .notification-headers input[type="checkbox"]{
    margin-right: 8px;
}

.notification-icon {
    font-size: 1.1rem;
    color: inherit;
}

.notification-message {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.notification-date {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
}

.notification-status {
    font-size: 0.6875rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: #e3f2fd;
    color: #1976d2;
    text-transform: uppercase;
}

.notification-details {
    padding: 12px 8px 4px;
    margin-top: 8px;
    font-size: 0.8125rem;
    border-top: 1px dashed #ddd;
}

.notification-details p {
    margin: 6px 0;
    color: #555;
}

.btn-delete-single {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.btn-delete-single:hover {
    color: #f44336;
}

/* Empty State */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Animations */
@keyframes highlight {
    0% { background-color: #ffff99; }
    100% { background-color: inherit; }
}

.new-notification {
    animation: highlight 1.5s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .expiring-alert-container,.debt-alert-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .notification-header,. .notification-headers {
        flex-wrap: wrap;
    }
    
    .notification-message {
        min-width: 100%;
        order: 1;
    }
    
    .notification-date {
        order: 2;
    }
    
    .notification-status {
        order: 3;
    }
}


/* Scrollbar Styles */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}



.popup {
    width: 50vw;
    position: relative; /* Relative to the container for proper movement */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    overflow: hidden;
    z-index: 10000;
}
..notification-short {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-full-message {
    padding: 8px 0;
    white-space: normal;
    word-break: break-word;
}


.notification-badge {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    margin-left: 5px;
    display: none;
}






.debt-alert-popup-overlay {
   
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.debt-alert-container {
    width: 90%;
    max-width: 800px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}



.notification-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    color: #dc3545;
}

.notification-status {
    color: #dc3545;
    font-weight: bold;
    margin-left: auto;
}

.notification-details {
    padding: 10px 0 0 30px;
}



.notification-badges {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    margin-left: 5px;
    display: none;
}

.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
