/* ============================================================================
   css/dilo-menu.css :: MENU BÊN DÙNG CHUNG (audit side menu 23/09/2026)
   ----------------------------------------------------------------------------
   Đi cặp với DILO.initSideMenu trong js/dilo-common.js. Nạp SAU css riêng của
   trang (link cuối <head>) để đè đúng chỗ. Áp cho hai kiểu menu:
     #sideMenu.side-menu  (club, workshop, art, fnb, concert, congdong,
                           event-detail, shop-detail)
     #diloDrawer.dilo-drawer (index, profile, chinh-sach)

   TOKEN MÀU của nơi chứa (menu nền sáng tự khai trong css của trang):
     --dilo-menu-fg     chữ chính        (mặc định #fff, cho menu nền tối)
     --dilo-menu-muted  chữ phụ / nhãn
     --dilo-menu-line   viền
     --dilo-menu-tint   nền ô bấm
   ============================================================================ */

/* Hamburger là <button>: xoá khung mặc định của trình duyệt, giữ nguyên hình 3 gạch. */
button.menu-toggle {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}
button.menu-toggle:focus-visible,
.hamburger:focus-visible,
.user-trigger:focus-visible {
    outline: 2px solid #d14828;
    outline-offset: 4px;
    border-radius: 6px;
}

/* Chiều cao: bám mép trên + mép dưới. 100vh trên Safari iOS dôi ra sau thanh địa chỉ,
   chân menu (Đăng xuất) bị che. */
.side-menu,
.dilo-drawer {
    top: 0;
    bottom: 0;
    height: auto;
}

/* Đóng thì ra khỏi thứ tự Tab và trình đọc màn hình. visibility trễ đúng bằng thời
   gian trượt để lúc đóng vẫn thấy menu trượt ra. */
.side-menu {
    visibility: hidden;
    transition: right .3s ease, visibility 0s linear .3s;
}
.side-menu.active {
    visibility: visible;
    transition: right .3s ease, visibility 0s linear 0s;
}
.dilo-drawer {
    visibility: hidden;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .32s;
}
.dilo-drawer.open {
    visibility: visible;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s linear 0s;
}

/* Bóng chỉ khi mở (đóng mà còn bóng là lộ một vệt tối ở mép phải màn hình). */
.side-menu:not(.active),
.dilo-drawer:not(.open) {
    box-shadow: none;
}

/* Scrim cho menu sm-* (drawer đã có #diloScrim riêng). Nằm ngay dưới menu (1005). */
.dilo-sm-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility 0s linear .3s;
    z-index: 1004;
}
.dilo-sm-scrim.open {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s, visibility 0s linear 0s;
}

/* Khoá cuộn trang nền khi menu mở (class trên <html>, không đụng body.style mà modal
   đăng nhập đang dùng). */
html.dilo-menu-open,
html.dilo-menu-open body {
    overflow: hidden;
}

/* Banner mời bổ sung ngày sinh (dilo-common.js) không đè lên menu. */
html.dilo-menu-open #diloBirthBanner {
    display: none !important;
}

/* Hamburger nổi TRÊN menu và thành nút X. Header chứa nó được nâng lên trên menu
   nhưng trong suốt, xuyên click, mọi thứ khác trong header tạm ẩn. */
html.dilo-menu-open .dilo-menu-host {
    z-index: 1990 !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    pointer-events: none;
}
html.dilo-menu-open .dilo-menu-host > * {
    visibility: hidden;
}
html.dilo-menu-open .dilo-menu-host .menu-toggle,
html.dilo-menu-open .dilo-menu-host .hamburger {
    visibility: visible;
    pointer-events: auto;
}
html.dilo-menu-open .dilo-menu-host .menu-toggle span {
    background-color: var(--dilo-menu-fg, #fff);
}
.menu-toggle span,
.hamburger span {
    transition: transform .25s ease, opacity .2s ease, background-color .2s ease;
}
html.dilo-menu-open .dilo-menu-host .menu-toggle span:nth-child(1),
html.dilo-menu-open .dilo-menu-host .hamburger span:nth-child(1) {
    transform: translateY(var(--dilo-x-off, 9px)) rotate(45deg);
}
html.dilo-menu-open .dilo-menu-host .menu-toggle span:nth-child(2),
html.dilo-menu-open .dilo-menu-host .hamburger span:nth-child(2) {
    opacity: 0;
}
html.dilo-menu-open .dilo-menu-host .menu-toggle span:nth-child(3),
html.dilo-menu-open .dilo-menu-host .hamburger span:nth-child(3) {
    transform: translateY(calc(var(--dilo-x-off, 9px) * -1)) rotate(-45deg);
}
/* Hamburger đã làm nút đóng thì nút X trong menu thôi hiện (khỏi chồng lên nhau).
   Mở bằng nút tài khoản (máy tính, không có hamburger) thì nút X trong menu vẫn còn. */
.dilo-close-by-toggle .sm-close,
.dilo-close-by-toggle .dd-x {
    visibility: hidden;
}

/* Mục Thông báo trong drawer (index, profile, chinh-sach): cùng khung với .sm-notif. */
.dilo-drawer .dd-notif {
    display: block;
    text-align: left;
    font: inherit;
    color: var(--dilo-menu-fg, #fff);
    background: var(--dilo-menu-tint, rgba(255, 255, 255, .05));
    border: 1px solid var(--dilo-menu-line, rgba(255, 255, 255, .14));
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 20px 12px;
    cursor: pointer;
    flex: none;
}
.dilo-drawer .dd-notif:hover { filter: brightness(1.08); }
.dilo-drawer .dd-notif .sm-notif-row { display: flex; align-items: center; justify-content: space-between; }
.dilo-drawer .dd-notif .sm-notif-title { font-size: 13px; font-weight: 700; }
.dilo-drawer .dd-notif .sm-notif-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #e0245e; color: #fff; font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.dilo-drawer .dd-notif .sm-notif-latest {
    display: block; font-size: 12px; margin-top: 5px;
    color: var(--dilo-menu-muted, rgba(255, 255, 255, .6));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Hộp thông báo đầy đủ cho trang chưa có sẵn (index, profile, chinh-sach). 8 trang kia
   có khung + css riêng, class .dilo-noti-own chỉ gắn vào hộp do JS dựng. */
.dilo-noti-own.noti-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 60px 16px; }
.dilo-noti-own.noti-scrim.show { display: flex; }
.dilo-noti-own .noti-box { width: 420px; max-width: 100%; max-height: 80vh; background: #1b1b1f; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; font-family: 'Be Vietnam Pro', sans-serif; }
.dilo-noti-own .noti-box-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #fff; font-weight: 700; }
.dilo-noti-own .noti-box-actions { display: flex; align-items: center; gap: 12px; }
.dilo-noti-own .noti-allread { background: none; border: none; color: #ff7a3c; font-size: 12px; font-weight: 600; cursor: pointer; }
.dilo-noti-own .noti-x { background: none; border: none; color: #aaa; font-size: 24px; line-height: 1; cursor: pointer; }
.dilo-noti-own .noti-box-list { overflow-y: auto; }
.dilo-noti-own .noti-it { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); cursor: pointer; }
.dilo-noti-own .noti-it:hover { background: rgba(255, 255, 255, .06); }
.dilo-noti-own .noti-it.unread { background: rgba(224, 36, 94, .10); }
.dilo-noti-own .noti-it-text { font-size: 13px; color: #eee; line-height: 1.4; }
.dilo-noti-own .noti-it-snip { font-size: 12px; color: #aaa; margin-top: 3px; font-style: italic; }
.dilo-noti-own .noti-it-time { font-size: 11px; color: #888; margin-top: 4px; }
.dilo-noti-own .noti-empty { padding: 28px 16px; text-align: center; color: #888; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
    .side-menu, .side-menu.active, .dilo-drawer, .dilo-drawer.open,
    .dilo-sm-scrim, .dilo-sm-scrim.open,
    .menu-toggle span, .hamburger span { transition-duration: 0s !important; transition-delay: 0s !important; }
}
