/* Nút mở menu */
.rvdt-menu-trigger {
    display: inline-flex;
    align-items: center;
    /*gap: 10px;*/
    min-height: 48px;
    padding: 5px 15px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--rvdt-primary),
            var(--rvdt-primary-dark)
        );
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 25px rgba(69, 11, 19, 0.25);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.rvdt-menu-trigger:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(69, 11, 19, 0.32);
}

.rvdt-menu-trigger i {
    font-size: 22px;
}

/* Offcanvas */
.rvdt-offcanvas {
    width: min(400px, 92vw) !important;
    color: var(--rvdt-text);
    background: var(--rvdt-background);
    border-right: 0 !important;
    box-shadow: 15px 0 45px rgba(45, 20, 24, 0.22);
}

.rvdt-offcanvas .offcanvas-header {
    position: relative;
    min-height: 92px;
    padding: 18px 22px;
    color: #fff;
    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(200, 155, 92, 0.35),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--rvdt-primary),
            var(--rvdt-primary-dark)
        );
    overflow: hidden;
}

.rvdt-offcanvas .offcanvas-header::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -65px;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow:
        0 0 0 18px rgba(255, 255, 255, 0.04),
        0 0 0 38px rgba(255, 255, 255, 0.025);
}

.rvdt-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rvdt-brand-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--rvdt-primary);
    background: #fff;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.rvdt-brand-name {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.1;
}

.rvdt-brand-description {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rvdt-close {
    position: relative;
    z-index: 9992;
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    font-size: 19px;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.rvdt-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Bố cục menu */
.rvdt-offcanvas .offcanvas-body {
    overflow: hidden;
}

.rvdt-menu-shell {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

/* Thanh tiêu đề submenu */
.rvdt-menu-toolbar {
    display: flex;
    min-height: 61px;
    padding: 10px 16px;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.74);
    border-bottom: 1px solid var(--rvdt-border);
    backdrop-filter: blur(10px);
}

.rvdt-menu-back {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--rvdt-primary);
    background: rgba(109, 26, 36, 0.07);
    border: 0;
    border-radius: 50%;
    font-size: 19px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.rvdt-menu-back:hover {
    color: #fff;
    background: var(--rvdt-primary);
    transform: translateX(-2px);
}

.rvdt-menu-back.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.rvdt-menu-heading {
    min-width: 0;
}

.rvdt-menu-eyebrow {
    margin-bottom: 2px;
    color: var(--rvdt-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rvdt-menu-title {
    margin: 0;
    overflow: hidden;
    color: var(--rvdt-primary-dark);
    font-size: 17px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Vùng chứa các panel */
.rvdt-menu-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.rvdt-menu-panel {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(105%);
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 26, 36, 0.24) transparent;
}

.rvdt-menu-panel.is-active {
    z-index: 3;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.rvdt-menu-panel.is-parent {
    z-index: 2;
    opacity: 0;
    transform: translateX(-28%);
}

.rvdt-menu-panel::-webkit-scrollbar {
    width: 5px;
}

.rvdt-menu-panel::-webkit-scrollbar-thumb {
    background: rgba(109, 26, 36, 0.24);
    border-radius: 20px;
}

/* Nhóm menu */
.rvdt-menu-section {
    margin-bottom: 22px;
}

.rvdt-menu-section-title {
    margin: 0 0 9px;
    padding: 0 10px;
    color: var(--rvdt-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rvdt-menu-list {
    display: flex;
    margin: 0;
    padding: 0;
    flex-direction: column;
    gap: 7px;
    list-style: none;
}

/* Item */
.rvdt-menu-item,
.rvdt-menu-open {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 56px;
    padding: 9px 11px;
    align-items: center;
    gap: 12px;
    color: var(--rvdt-text);
    text-align: left;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid transparent;
    border-radius: 13px;
    box-shadow: 0 5px 14px rgba(67, 41, 45, 0.035);
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

button.rvdt-menu-open {
    appearance: none;
}

.rvdt-menu-item::before,
.rvdt-menu-open::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--rvdt-gold);
    border-radius: 0 3px 3px 0;
    transform: translateY(-50%);
    transition: height 0.25s ease;
}

.rvdt-menu-item:hover,
.rvdt-menu-open:hover {
    color: var(--rvdt-primary);
    background: #fff;
    border-color: rgba(109, 26, 36, 0.11);
    box-shadow: 0 10px 22px rgba(69, 11, 19, 0.09);
    transform: translateX(4px);
}

.rvdt-menu-item:hover::before,
.rvdt-menu-open:hover::before {
    height: 24px;
}

.rvdt-menu-item.is-active {
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--rvdt-primary),
            var(--rvdt-primary-dark)
        );
    box-shadow: 0 10px 24px rgba(69, 11, 19, 0.22);
}

.rvdt-menu-item.is-active::before {
    display: none;
}

.rvdt-item-icon {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    color: var(--rvdt-primary);
    background: rgba(109, 26, 36, 0.07);
    border-radius: 11px;
    font-size: 18px;
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.rvdt-menu-item:hover .rvdt-item-icon,
.rvdt-menu-open:hover .rvdt-item-icon {
    color: #fff;
    background: var(--rvdt-primary);
    transform: scale(1.05);
}

.rvdt-menu-item.is-active .rvdt-item-icon {
    color: var(--rvdt-primary);
    background: #fff;
}

.rvdt-item-content {
    min-width: 0;
    flex: 1;
}

.rvdt-item-name {
    display: block;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
}

.rvdt-item-description {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--rvdt-muted);
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rvdt-menu-item.is-active .rvdt-item-description {
    color: rgba(255, 255, 255, 0.68);
}

.rvdt-item-arrow {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--rvdt-muted);
    border-radius: 50%;
    font-size: 14px;
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.rvdt-menu-open:hover .rvdt-item-arrow {
    color: #fff;
    background: var(--rvdt-primary);
    transform: translateX(3px);
}

/* Footer */
.rvdt-menu-footer {
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.75);
    background:
        linear-gradient(
            135deg,
            var(--rvdt-primary-dark),
            var(--rvdt-primary)
        );
}

.rvdt-menu-footer-label {
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rvdt-menu-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rvdt-menu-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.rvdt-menu-footer-links a:hover {
    color: #f1cd96;
}

/* Tắt animation khi reset menu */
.rvdt-menu-shell.is-resetting .rvdt-menu-panel {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .rvdt-menu-panel,
    .rvdt-menu-item,
    .rvdt-menu-open,
    .rvdt-menu-back {
        transition: none;
    }
}