/* Shared notification — menu1 & menu2 (light theme colours) */
body.menu1-notif-open,
body.menu2-notif-open {
    overflow: hidden;
}

body.menu1-notif-open .menu1-notif,
body.menu2-notif-open .menu2-notif {
    z-index: 1330 !important;
}

body.menu1-notif-open .nav-header .slide_toggle,
body.menu2-notif-open .nav-header .slide_toggle {
    z-index: 1 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

body.menu1-notif-open .nav-header,
body.menu2-notif-open .nav-header {
    z-index: auto !important;
}

.main-wrapper > .nav-header,
.nav-header .right-navbar {
    overflow: visible;
}

.menu1-notif,
.menu2-notif {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-end: 8px;
}

.menu1-notif__bell,
.menu2-notif__bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: var(--white, #fff) !important;
    color: var(--current) !important;
    border: 1px solid var(--colore7e, #e7eced) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px var(--black-shadows1f, rgba(0, 0, 0, 0.08)) !important;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.menu1-notif__bell:hover,
.menu1-notif__bell:focus,
.menu2-notif__bell:hover,
.menu2-notif__bell:focus {
    border-color: var(--current) !important;
    box-shadow: 0 0 0 2px var(--primary-soft, #ceddff) !important;
    outline: none !important;
    color: var(--current) !important;
    background: var(--bg-main, #f8f8f8) !important;
}

.menu1-notif__bell[aria-expanded="true"],
.menu2-notif__bell[aria-expanded="true"] {
    border-color: var(--current) !important;
    background: var(--primary-soft, #ceddff) !important;
    color: var(--current) !important;
}

.menu1-notif__bell-icon,
.menu2-notif__bell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu1-notif__bell-svg,
.menu2-notif__bell-svg {
    display: block;
    transform-origin: 50% 0%;
}

.menu1-notif__bell.is-ringing .menu1-notif__bell-svg,
.menu2-notif__bell.is-ringing .menu2-notif__bell-svg {
    animation: menu-notif-ring 0.85s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.menu1-notif__badge,
.menu2-notif__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger, #e50202);
    color: var(--white, #fff);
    border: 2px solid var(--white, #fff);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(229, 2, 2, 0.25);
}

.menu1-notif__badge.is-pulse,
.menu2-notif__badge.is-pulse {
    animation: menu-notif-badge-pop 0.45s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.menu1-notif__badge-sr,
.menu2-notif__badge-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu1-notif__backdrop,
.menu2-notif__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    z-index: 1315;
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.4, 0.2, 0.2, 1);
    pointer-events: none;
}

@media (max-width: 767px) {
    .menu1-notif__backdrop,
    .menu2-notif__backdrop {
        display: block;
    }
}

.menu1-notif__backdrop.is-visible,
.menu2-notif__backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.menu1-notif__panel,
.menu2-notif__panel {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: min(380px, calc(100vw - 24px));
    max-height: min(520px, calc(100vh - 96px));
    display: flex;
    flex-direction: column;
    background: var(--white, #fff);
    border: 1px solid var(--colore7e, #e7eced);
    border-radius: 8px;
    box-shadow: 0 8px 20px var(--black-shadows1f, rgba(0, 0, 0, 0.1));
    z-index: 1320;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.28s cubic-bezier(0.4, 0.2, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0.2, 0.2, 1), visibility 0.28s;
    pointer-events: none;
}

html[dir="rtl"] .menu1-notif__panel,
html[dir="rtl"] .menu2-notif__panel {
    transform-origin: top left;
}

.menu1-notif__panel.is-open,
.menu2-notif__panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.menu1-notif__header,
.menu2-notif__header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-main, #f8f8f8);
    border-bottom: 1px solid var(--colore7e, #e7eced);
}

.menu1-notif__back,
.menu2-notif__back {
    display: none;
    order: -1;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--grey4, #5d5d5d);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu1-notif__back:hover,
.menu1-notif__back:focus,
.menu2-notif__back:hover,
.menu2-notif__back:focus {
    background: var(--primary-soft, #ceddff);
    color: var(--current);
    outline: none;
}

.menu1-notif__title,
.menu2-notif__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: start;
    color: var(--grey4, #5d5d5d);
    line-height: 1.3;
}

.menu1-notif__actions-wrap,
.menu2-notif__actions-wrap {
    position: relative;
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.menu1-notif__actions-btn,
.menu2-notif__actions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--grey4, #5d5d5d);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu1-notif__actions-btn:hover,
.menu1-notif__actions-btn:focus,
.menu1-notif__actions-btn[aria-expanded="true"],
.menu2-notif__actions-btn:hover,
.menu2-notif__actions-btn:focus,
.menu2-notif__actions-btn[aria-expanded="true"] {
    background: var(--primary-soft, #ceddff);
    color: var(--current);
    outline: none;
}

.menu1-notif__actions-menu,
.menu2-notif__actions-menu {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-end: 0;
    min-width: 148px;
    padding: 6px;
    background: var(--white, #fff);
    border: 1px solid var(--colore7e, #e7eced);
    border-radius: 8px;
    box-shadow: 0 6px 16px var(--black-shadows1f, rgba(0, 0, 0, 0.08));
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.menu1-notif__actions-menu.is-open,
.menu2-notif__actions-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu1-notif__action,
.menu2-notif__action {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--grey4, #5d5d5d);
    font-size: 13px;
    font-weight: 500;
    text-align: start;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu1-notif__action:hover,
.menu1-notif__action:focus,
.menu2-notif__action:hover,
.menu2-notif__action:focus {
    background: var(--bg-main, #f8f8f8);
    color: var(--current);
    outline: none;
}

.menu1-notif__body,
.menu2-notif__body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: var(--white, #fff);
}

.menu1-notif__list,
.menu2-notif__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: calc(6 * 76px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.menu1-notif__list::-webkit-scrollbar,
.menu2-notif__list::-webkit-scrollbar {
    width: 6px;
}

.menu1-notif__list::-webkit-scrollbar-thumb,
.menu2-notif__list::-webkit-scrollbar-thumb {
    background: var(--colore7e, #e7eced);
    border-radius: 999px;
}

.menu1-notif__item,
.menu2-notif__item {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--colore7e, #e7eced);
    background: var(--white, #fff);
    text-align: start;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.menu1-notif__item:last-child,
.menu2-notif__item:last-child {
    border-bottom: none;
}

.menu1-notif__item:hover,
.menu1-notif__item:focus,
.menu2-notif__item:hover,
.menu2-notif__item:focus {
    background: var(--whitef2, #f2f2f2);
    outline: none;
}

.menu1-notif__item--unread,
.menu2-notif__item--unread {
    background: var(--light-bgscolor, #ffe4d5);
    box-shadow: inset 3px 0 0 var(--current);
}

.menu1-notif__item--unread:hover,
.menu1-notif__item--unread:focus,
.menu2-notif__item--unread:hover,
.menu2-notif__item--unread:focus {
    background: var(--bg-main, #f8f8f8);
}

.menu1-notif__item-title,
.menu2-notif__item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--grey, #18181a);
    line-height: 1.35;
}

.menu1-notif__item-dot,
.menu2-notif__item-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--current);
}

.menu1-notif__item--read .menu1-notif__item-dot,
.menu2-notif__item--read .menu2-notif__item-dot {
    display: none;
}

.menu1-notif__item-message,
.menu2-notif__item-message {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--grey4, #5d5d5d);
    line-height: 1.45;
}

.menu1-notif__item-time,
.menu2-notif__item-time {
    margin: 0;
    font-size: 12px;
    color: var(--grey-color, #a2a2a2);
    line-height: 1.3;
}

.menu1-notif__skeleton,
.menu2-notif__skeleton {
    padding: 4px 0;
}

.menu1-notif__skeleton-item,
.menu2-notif__skeleton-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--colore7e, #e7eced);
}

.menu1-notif__skeleton-line,
.menu2-notif__skeleton-line {
    display: block;
    height: 10px;
    border-radius: 8px;
    background: var(--colore7e, #e7eced);
    animation: menu-notif-shimmer 1.2s ease-in-out infinite;
}

.menu1-notif__skeleton-line--title,
.menu2-notif__skeleton-line--title {
    width: 48%;
    height: 12px;
    margin-bottom: 10px;
}

.menu1-notif__skeleton-line--message,
.menu2-notif__skeleton-line--message {
    width: 78%;
    margin-bottom: 10px;
}

.menu1-notif__skeleton-line--time,
.menu2-notif__skeleton-line--time {
    width: 42%;
    height: 9px;
}

.menu1-notif__empty,
.menu2-notif__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 24px 40px;
    text-align: center;
}

.menu1-notif__empty-icon,
.menu2-notif__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--primary-soft, #ceddff);
    color: var(--current);
}

.menu1-notif__empty-title,
.menu2-notif__empty-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--grey4, #5d5d5d);
}

.menu1-notif__empty-text,
.menu2-notif__empty-text {
    margin: 0;
    font-size: 13px;
    color: var(--grey-color, #a2a2a2);
    line-height: 1.45;
    max-width: 240px;
}

@keyframes menu-notif-ring {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}

@keyframes menu-notif-badge-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.28); }
    65% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

@keyframes menu-notif-shimmer {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
    .menu1-notif__panel,
    .menu2-notif__panel,
    .menu1-notif__backdrop,
    .menu2-notif__backdrop,
    .menu1-notif__actions-menu,
    .menu2-notif__actions-menu,
    .menu1-notif__bell.is-ringing .menu1-notif__bell-svg,
    .menu2-notif__bell.is-ringing .menu2-notif__bell-svg,
    .menu1-notif__badge.is-pulse,
    .menu2-notif__badge.is-pulse,
    .menu1-notif__skeleton-line,
    .menu2-notif__skeleton-line {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 767px) {
    .menu1-notif__panel,
    .menu2-notif__panel {
        position: fixed;
        top: 0;
        inset-inline: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        max-height: none;
        height: 100dvh;
        border-radius: 0;
        border: none;
        transform: translateY(12px);
        transform-origin: center top;
        z-index: 1320;
    }

    .menu1-notif__backdrop,
    .menu2-notif__backdrop {
        z-index: 1315;
    }

    .menu1-notif__panel.is-open,
    .menu2-notif__panel.is-open {
        transform: translateY(0);
    }

    .menu1-notif__back,
    .menu2-notif__back {
        display: inline-flex;
    }

    .menu1-notif__header,
    .menu2-notif__header {
        display: grid;
        grid-template-columns: 36px 1fr auto;
        align-items: center;
        gap: 8px;
        padding: 14px 16px;
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }

    .menu1-notif__title,
    .menu2-notif__title {
        flex: unset;
        text-align: center;
    }

    .menu1-notif__actions-wrap,
    .menu2-notif__actions-wrap {
        justify-self: end;
        margin-inline-start: 0;
    }

    .menu1-notif__list,
    .menu2-notif__list {
        max-height: none;
        flex: 1 1 auto;
    }

    .menu1-notif__body,
    .menu2-notif__body {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

    .menu1-notif__panel.is-open,
    .menu2-notif__panel.is-open {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .menu1-notif__bell,
    .menu2-notif__bell {
        width: 34px;
        min-width: 34px;
        height: 34px;
    }
}

@media (max-width: 575px) {
    .main-wrapper > .nav-header {
        position: relative !important;
    }

    .nav-header .right-navbar .menu1-notif,
    .nav-header .right-navbar .menu2-notif {
        position: absolute;
        top: 14px;
        inset-inline-end: 50px;
        z-index: 12;
        margin-inline-end: 0;
    }

    .nav-header .slide_toggle {
        z-index: 12;
    }
}
