﻿/* ===== Notification Bell ===== */
.notif-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}

.notif-bell-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    padding: 0px 0px;
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    transition: background-color 0.2s;
    /*line-height: 1;*/
}

    .notif-bell-btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

.notif-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: none; /* Ẩn mặc định */
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    border: 1.5px solid #1576ab;
    font-family: 'Inter', sans-serif;
}

/* ===== Notification Panel (Dropdown) ===== */
.notif-panel {
    position: fixed;
    z-index: 10001;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

    .notif-panel.show {
        display: flex;
    }

/* Header */
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eee;
}

.notif-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
}

.notif-mark-all-btn {
    background: none;
    border: none;
    color: #1576ab;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

    .notif-mark-all-btn:hover {
        background: #eef5fa;
    }

/* Notification List — scrollable */
.notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 370px;
    overscroll-behavior: contain;
}

    .notif-list::-webkit-scrollbar {
        width: 5px;
    }

    .notif-list::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

/* Empty state */
.notif-empty {
    padding: 40px 16px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* Notification Item */
.notif-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
    gap: 12px;
}

    .notif-item:hover {
        background: #f8f9fa;
    }

    .notif-item.unread {
        background: #eef5fb;
    }

        .notif-item.unread:hover {
            background: #e0edfa;
        }

/* Thumbnail image */
.notif-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Icon (khi không có thumbnail) */
.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Content */
.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-message {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.notif-item.unread .notif-message {
    font-weight: 600;
    color: #1a1a1a;
}

.notif-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
}

/* Loader */
.notif-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* Footer */
.notif-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid #eee;
    background: #fafbfc;
}

.notif-footer-text {
    font-size: 0.8rem;
    color: #777;
    white-space: nowrap;
}

.notif-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #1576ab;
    font-size: 1rem;
}

    .notif-footer-icon:hover {
        background: #eef5fa;
    }

    .notif-footer-icon img {
        border-radius: 4px;
    }

/* ===== Mobile Bell (trong mobile-menu-header) ===== */
.notif-bell-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 6px;
}

    .notif-bell-menu .notif-bell-btn {
        color: #fff;
        font-size: 1.15rem;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 50%;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color 0.2s;
        padding: 0;
        line-height: 1;
    }

        .notif-bell-menu .notif-bell-btn:hover {
            background: rgba(255, 255, 255, 0.25);
        }

    .notif-bell-menu .notif-badge {
        top: -3px;
        right: -4px;
        border-color: #1576ab;
        font-size: 0.5rem;
        min-width: 13px;
        height: 13px;
        border-radius: 7px;
        padding: 0 2px;
    }

/* ===== Mobile responsive ===== */
@media (max-width: 575.98px) {
    .notif-panel {
        border-radius: 10px;
    }

        .notif-panel.show {
            max-height: 75vh;
        }

    .notif-list {
        max-height: calc(75vh - 140px);
    }
}
