/* ═══════════════════════════════════════════════════════════════
   VISOR SIDEBAR — Aurora Borealis 2026-04-14
   Full rebuild. Clean .visor-sidebar/.vs-* namespace.
   Apple liquid glass + aurora flowing light.
   ═══════════════════════════════════════════════════════════════ */

/* ── Shell: solid aurora gradient (no backdrop-filter — keeps transition smooth) ── */
.visor-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: 200px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 45% at 0% 0%,
            rgba(163, 255, 172, 0.05) 0%,
            rgba(94, 229, 224, 0.04) 28%,
            rgba(167, 139, 250, 0.025) 55%,
            transparent 80%),
        radial-gradient(50% 100% at 100% 50%,
            rgba(167, 139, 250, 0.03) 0%,
            transparent 70%),
        #0a0a12;
    border-right: 1px solid rgba(94, 229, 224, 0.08);
    box-shadow:
        2px 0 18px rgba(0, 0, 0, 0.35),
        inset -1px 0 0 rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition-property: width !important;
    transition-duration: 360ms !important;
    transition-timing-function: cubic-bezier(0.32, 0.72, 0.24, 1) !important;
    box-sizing: border-box;
    font-family: inherit;
}

/* Override reduced-motion for the sidebar transition (user wants smooth anim here) */
@media (prefers-reduced-motion: reduce) {
    .visor-sidebar {
        transition-duration: 360ms !important;
    }
    .visor-sidebar .vs-logo,
    .visor-sidebar .vs-label,
    body.page-id-28206.logged-in .page_wrap,
    body.page-id-28207.logged-in .page_wrap {
        transition-duration: 360ms !important;
    }
}
.visor-sidebar.vs-collapsed {
    width: 84px;
}
.visor-sidebar .vs-nav::-webkit-scrollbar {
    width: 4px;
}
.visor-sidebar .vs-nav::-webkit-scrollbar-track {
    background: transparent;
}
.visor-sidebar .vs-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(94, 229, 224, 0.3),
        rgba(167, 139, 250, 0.25));
    border-radius: 2px;
}

/* Aurora top-ribbon — faint animated gradient strip at the very top edge */
.visor-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(163, 255, 172, 0) 0%,
        rgba(163, 255, 172, 0.4) 15%,
        rgba(94, 229, 224, 0.7) 42%,
        rgba(167, 139, 250, 0.5) 70%,
        rgba(94, 229, 224, 0.4) 88%,
        transparent 100%);
    background-size: 200% 100%;
    animation: vsTopAurora 8s linear infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes vsTopAurora {
    0%   { background-position: 0% 0%; opacity: 0.7; }
    50%  { opacity: 1; }
    100% { background-position: 200% 0%; opacity: 0.7; }
}

/* ══════════════════════════════════════════════════════════════
   BRAND: logo on top, toggle below
   ══════════════════════════════════════════════════════════════ */
.visor-sidebar .vs-brand {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0 20px;
    box-sizing: border-box;
}
.visor-sidebar .vs-brand::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(94, 229, 224, 0.18) 30%,
        rgba(167, 139, 250, 0.14) 70%,
        transparent 100%);
    pointer-events: none;
}

/* Logo — scales smoothly with sidebar width */
.visor-sidebar .vs-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    text-decoration: none;
    outline: none;
    transition: width 360ms cubic-bezier(0.32, 0.72, 0.24, 1), height 360ms cubic-bezier(0.32, 0.72, 0.24, 1);
}
.visor-sidebar:not(.vs-collapsed) .vs-logo {
    width: 118px;
    height: 118px;
}
.visor-sidebar .vs-logo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    margin: 0;
    padding: 0;
    border: 0;
    filter: drop-shadow(0 2px 10px rgba(94, 229, 224, 0.12));
    transition: filter 280ms ease;
}

/* Toggle */
.visor-sidebar .vs-toggle {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.45);
    outline: none;
    overflow: hidden;
    transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.visor-sidebar .vs-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(94, 229, 224, 0) 0%,
        rgba(94, 229, 224, 0.15) 50%,
        rgba(167, 139, 250, 0.1) 100%);
    opacity: 0;
    transition: opacity 220ms ease;
    pointer-events: none;
}
.visor-sidebar .vs-toggle:hover {
    color: #5ee5e0;
    background: rgba(94, 229, 224, 0.05);
    border-color: rgba(94, 229, 224, 0.22);
}
.visor-sidebar .vs-toggle:hover::before {
    opacity: 1;
}
.visor-sidebar .vs-toggle:active {
    transform: scale(0.96);
}
.visor-sidebar .vs-toggle svg {
    display: block;
    position: relative;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    z-index: 1;
}

/* Brand layout stays COLUMN in both states — no flex-direction flip,
   so expand/collapse is a smooth width change instead of a layout jump. */
.visor-sidebar:not(.vs-collapsed) .vs-brand {
    padding: 26px 0 22px;
    gap: 18px;
}

/* ══════════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════════ */
.visor-sidebar .vs-nav {
    flex: 1 1 auto;
    padding: 12px 0 72px;  /* bottom padding reserves space for absolute footer */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}
.visor-sidebar .vs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.visor-sidebar .vs-item {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
}
.visor-sidebar .vs-item a {
    position: relative;
    display: block;
    width: 100%;
    height: 48px;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: transparent;
    border: 0;
    outline: none;
    box-sizing: border-box;
    transition: color 200ms ease, background 200ms ease;
    z-index: 1;
}
/* Icon: fixed pixel position — left:30px works as center in 84px collapsed
   sidebar (30 + 12 = 42 = 84/2) AND as left padding in 200px expanded.
   Icon never moves during transition — only label + sidebar width animate. */
.visor-sidebar .vs-item .vs-icon {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    color: inherit;
    transition: color 220ms ease, filter 220ms ease, transform 220ms ease;
    z-index: 2;
}
.visor-sidebar .vs-item .vs-icon i {
    display: inline-block;
    width: 24px;
    text-align: center;
    line-height: 1;
}
/* Label: fades + expands via opacity + max-width only */
.visor-sidebar .vs-item .vs-label {
    position: absolute;
    top: 50%;
    left: 64px;
    transform: translateY(-50%);
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    max-width: 220px;
    transition: opacity 280ms ease;
}
.visor-sidebar.vs-collapsed .vs-item .vs-label {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

/* Hover (non-active) — aurora shimmer sweep */
.visor-sidebar .vs-item:not(.vs-active)::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(94, 229, 224, 0) 0%,
        rgba(94, 229, 224, 0.06) 30%,
        rgba(167, 139, 250, 0.04) 65%,
        transparent 100%);
    opacity: 0;
    transition: opacity 240ms ease;
    pointer-events: none;
    z-index: 0;
}
.visor-sidebar .vs-item:not(.vs-active):hover::before {
    opacity: 1;
}
.visor-sidebar .vs-item:not(.vs-active):hover a {
    color: #ffffff;
}
.visor-sidebar .vs-item:not(.vs-active):hover a .vs-icon {
    color: rgba(94, 229, 224, 0.92);
    filter: drop-shadow(0 0 4px rgba(94, 229, 224, 0.28));
    transform: translateY(-50%) scale(1.04);
}

/* ══════════════════════════════════════════════════════════════
   AURORA ACTIVE TAB — flowing light curtain
   ══════════════════════════════════════════════════════════════ */
.visor-sidebar .vs-item.vs-active {
    background: linear-gradient(90deg,
        rgba(94, 229, 224, 0.10) 0%,
        rgba(94, 229, 224, 0.04) 12%,
        transparent 35%);
}
/* Aurora ribbon */
.visor-sidebar .vs-item.vs-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 2px;
    background: linear-gradient(180deg,
        rgba(163, 255, 172, 0) 0%,
        #a3ffac 18%,
        #5ee5e0 44%,
        #a78bfa 70%,
        #5ee5e0 88%,
        rgba(94, 229, 224, 0) 100%);
    background-size: 100% 220%;
    box-shadow:
        0 0 10px rgba(94, 229, 224, 0.7),
        0 0 20px rgba(167, 139, 250, 0.32),
        0 0 30px rgba(163, 255, 172, 0.12);
    pointer-events: none;
    animation: vsAuroraRibbon 5s ease-in-out infinite;
    z-index: 2;
}
/* Aurora veil — soft horizontal curtain flowing from ribbon */
.visor-sidebar .vs-item.vs-active::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 100% at 0% 50%,
            rgba(94, 229, 224, 0.15) 0%,
            rgba(167, 139, 250, 0.08) 40%,
            rgba(163, 255, 172, 0.03) 65%,
            transparent 88%),
        linear-gradient(90deg,
            rgba(163, 255, 172, 0.04) 0%,
            transparent 60%);
    background-size: 200% 100%, 100% 100%;
    pointer-events: none;
    animation: vsAuroraVeil 7s ease-in-out infinite;
    z-index: 0;
}
.visor-sidebar .vs-item.vs-active a {
    color: #c5f5ef;
    font-weight: 600;
    letter-spacing: 0.015em;
}
.visor-sidebar .vs-item.vs-active a .vs-icon {
    color: #5ee5e0;
    filter:
        drop-shadow(0 0 5px rgba(94, 229, 224, 0.75))
        drop-shadow(0 0 12px rgba(167, 139, 250, 0.38));
}

@keyframes vsAuroraRibbon {
    0%, 100% {
        opacity: 0.88;
        background-position: 0% 0%;
    }
    50% {
        opacity: 1;
        background-position: 0% 100%;
    }
}
@keyframes vsAuroraVeil {
    0%, 100% { opacity: 0.75; background-position: 0% 0%, 0% 0%; }
    50%      { opacity: 1;    background-position: 30% 0%, 0% 0%; }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER — absolute-positioned at sidebar bottom (always visible)
   ══════════════════════════════════════════════════════════════ */
.visor-sidebar .vs-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
    background: rgba(8, 9, 14, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 5;
}
.visor-sidebar .vs-footer::before {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(94, 229, 224, 0.14) 30%,
        rgba(167, 139, 250, 0.1) 70%,
        transparent 100%);
    pointer-events: none;
}
.visor-sidebar .vs-signout {
    position: relative;
    display: block;
    width: 100%;
    height: 52px;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    outline: none;
    transition: color 200ms ease, background 200ms ease;
    box-sizing: border-box;
    overflow: hidden;
}
/* Signout icon — same static-left trick as nav icons */
.visor-sidebar .vs-signout .vs-icon {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 220ms ease, filter 220ms ease, transform 220ms ease;
    z-index: 2;
}
.visor-sidebar .vs-signout .vs-label {
    position: absolute;
    top: 50%;
    left: 64px;
    transform: translateY(-50%);
    white-space: nowrap;
    opacity: 1;
    max-width: 220px;
    overflow: hidden;
    transition: opacity 280ms ease;
}
.visor-sidebar.vs-collapsed .vs-signout .vs-label {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}
.visor-sidebar .vs-signout:hover .vs-icon {
    transform: translateY(-50%) translateX(2px);
}
.visor-sidebar .vs-signout::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(255, 107, 107, 0.08) 0%,
        rgba(167, 139, 250, 0.04) 40%,
        transparent 100%);
    opacity: 0;
    transition: opacity 220ms ease;
    pointer-events: none;
}
.visor-sidebar .vs-signout:hover {
    color: #ffb2b2;
}
.visor-sidebar .vs-signout:hover::before {
    opacity: 1;
}
.visor-sidebar .vs-signout:hover .vs-icon {
    color: #ff8b8b;
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.5));
    transform: translateY(-50%) translateX(2px);
}

/* Focus ring — aurora teal */
.visor-sidebar a:focus-visible,
.visor-sidebar button:focus-visible {
    outline: 2px solid rgba(94, 229, 224, 0.55);
    outline-offset: -2px;
    border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   PAGE LAYOUT — push content right of the sidebar
   ══════════════════════════════════════════════════════════════ */
body.page-id-28206.logged-in .page_wrap,
body.page-id-28207.logged-in .page_wrap {
    padding-left: calc(200px + 32px) !important;
    transition: padding-left 360ms cubic-bezier(0.32, 0.72, 0.24, 1);
    box-sizing: border-box;
    will-change: padding-left;
}
body.page-id-28206.logged-in.pannel-sidebar-deactive .page_wrap,
body.page-id-28207.logged-in.pannel-sidebar-deactive .page_wrap {
    padding-left: calc(84px + 32px) !important;
}

/* Footer: sit naturally within page_wrap (which already has padding-left for
   the sidebar). No negative margin — the sidebar's dark background covers
   the left gap seamlessly. Content columns span the full remaining width. */
body.page-id-28206.logged-in .footer_wrap,
body.page-id-28207.logged-in .footer_wrap {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* page_content_wrap has padding-bottom:7.4rem by default; padding-top is
   already zeroed in membership-styles-v6.css but bottom is not, creating
   a gap between the last content card and the footer. */
body.page-id-28206.logged-in .page_content_wrap,
body.page-id-28207.logged-in .page_content_wrap {
    padding-bottom: 0 !important;
}

/* Mobile */
@media (max-width: 767px) {
    .visor-sidebar { width: 180px; }
    .visor-sidebar.vs-collapsed { width: 64px; }
    body.page-id-28206.logged-in .page_wrap,
    body.page-id-28207.logged-in .page_wrap {
        padding-left: 180px;
    }
    body.page-id-28206.logged-in.pannel-sidebar-deactive .page_wrap,
    body.page-id-28207.logged-in.pannel-sidebar-deactive .page_wrap {
        padding-left: 64px;
    }
}
