/* =========================================================================
 *  rbnd-notify.css — Chuông thông báo trên thanh trên cùng
 * =========================================================================
 *
 *  Thanh trên cùng có nền tối, nên mọi màu chữ ở NÚT phải là màu sáng;
 *  còn PANEL thì nền trắng và dùng bảng màu bình thường của site. Trộn hai
 *  ngữ cảnh này là nguồn của lỗi "chữ trắng trên nền trắng" kinh điển.
 */

.rbnd-noti {
    position: relative;
    display: inline-block;
    line-height: 1;
}

/* ----------------------------- Nút chuông ----------------------------- */

.rbnd-noti__btn {
    position: relative;
    background: none;
    border: 0;
    padding: 2px 4px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    opacity: .9;
    transition: opacity .15s ease;
}

.rbnd-noti__btn:hover,
.rbnd-noti__btn[aria-expanded="true"] { opacity: 1; }

.rbnd-noti__badge {
    position: absolute;
    top: -6px;
    left: 11px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .25);
}

/* Nhịp đập MỘT lần khi có thông báo mới — không lặp vô hạn.
   Chấm đỏ nhấp nháy không ngừng ở góc màn hình là thứ người dùng tắt
   thông báo vì nó, chứ không phải vì nội dung. */
.rbnd-noti__badge.is-new { animation: rbndNotiPop .45s ease; }

/* Bản trong thanh điều hướng (chỉ hiện ở khổ nhỏ): nền thanh này SÁNG,
   nên chữ trắng của bản trên thanh trên cùng sẽ tàng hình ở đây. */
.rbnd-noti--nav .rbnd-noti__btn { color: #212529; font-size: 19px; padding: 4px 6px; }
.rbnd-noti--nav .rbnd-noti__badge {
    top: -2px;
    left: 15px;
    box-shadow: 0 0 0 2px #fff;
}

@keyframes rbndNotiPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}

/* ------------------------------- Panel -------------------------------- */

.rbnd-noti__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1080;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #fff;
    color: #212529;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
    overflow: hidden;
}

.rbnd-noti__panel[hidden] { display: none; }

.rbnd-noti__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef0f3;
    font-size: 14px;
}

.rbnd-noti__readall {
    background: none;
    border: 0;
    padding: 0;
    color: #0d6efd;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.rbnd-noti__readall:hover { text-decoration: underline; }
.rbnd-noti__readall[disabled] { color: #adb5bd; cursor: default; text-decoration: none; }

.rbnd-noti__body {
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.rbnd-noti__loading,
.rbnd-noti__empty {
    padding: 26px 14px;
    color: #6c757d;
    font-size: 13px;
    text-align: center;
}

/* ------------------------------ Từng dòng ------------------------------ */

.rbnd-noti__item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 14px;
    border-bottom: 1px solid #f2f4f6;
    color: inherit;
    text-decoration: none;
}

.rbnd-noti__item:last-child { border-bottom: 0; }
.rbnd-noti__item:hover { background: #f7f9fc; color: inherit; }

/* Chưa đọc: nền nhạt CỘNG VỚI chấm tròn bên phải.
   Chỉ đổi nền thì trên màn hình chỉnh sáng thấp gần như không thấy gì. */
.rbnd-noti__item.is-unread { background: #f0f6ff; }
.rbnd-noti__item.is-unread:hover { background: #e7f0ff; }

.rbnd-noti__icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    background: #6c757d;
}

.rbnd-noti__text { flex: 1 1 auto; min-width: 0; }

.rbnd-noti__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 2px;
}

.rbnd-noti__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.4;
    color: #5a6472;
    margin: 0;
}

.rbnd-noti__time {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #98a2b3;
}

.rbnd-noti__dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 12px;
    border-radius: 50%;
    background: #0d6efd;
}

.rbnd-noti__more {
    display: block;
    padding: 10px 14px;
    border-top: 1px solid #eef0f3;
    background: #fafbfc;
    color: #0d6efd;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
}

.rbnd-noti__more:hover { background: #f2f5f9; text-decoration: underline; }

/* ------------------------------ Màn hình nhỏ --------------------------- */

@media (max-width: 575.98px) {
    .rbnd-noti__panel {
        position: fixed;
        top: 56px;
        right: 8px;
        left: 8px;
        width: auto;
    }
    .rbnd-noti__body { max-height: 62vh; }
}

/* =========================================================================
 *  Trang /tai-khoan/thong-bao — dùng chung màu và icon với chuông
 * ====================================================================== */

.notification-list { list-style: none; margin: 0; padding: 0; }

.notification-list > li {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
}

.notification-list > li.is-unread {
    border-color: #b6d4fe;
    background: #f0f6ff;
}

/* Dùng lại đúng các lớp của chuông (.rbnd-noti__item/__icon/__text) nên
   phải ghi đè bằng bộ chọn CÙNG hoặc CAO HƠN — `display:block` ở đây sẽ
   đè mất `display:flex` của .rbnd-noti__item và icon sẽ nhảy xuống dòng. */
.notification-list > li > a {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-bottom: 0;
    color: inherit;
    text-decoration: none;
}

.notification-list > li > a:hover { background: rgba(13, 110, 253, .04); }

/* Trang đầy đủ thì hiện trọn nội dung, không cắt hai dòng như trong panel */
.notification-list .rbnd-noti__desc {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    font-size: 13px;
}

.notification-list .rbnd-noti__title { font-size: 14px; }
.notification-list time { display: block; margin-top: 4px; font-size: 12px; color: #98a2b3; }
