/* public/css/vp-shell.css
   App shell: header, menu drawer, toast, KYC notice, dashboard sidebar overrides.
   This is the ONLY place header / menu / user dropdown / toast are styled.
   Load after css/vibepass.css and css/pwa-install.css. */

#vp-shell { display: contents; }

/* =====================================================================
   HEADER: Apple-style global nav. 44px frosted bar, logo centred, hairline-free
   at the top of the page. A thin hairline fades in once the page scrolls.
   ===================================================================== */
:root{--vp-h:44px;--vp-header-h:44px;--header-h:44px;--vp-ease:cubic-bezier(.32,.72,0,1)}
.vp-header{--hb:var(--bg,#fff);--hg1:rgba(0,0,0,.05);--hg2:rgba(0,0,0,.09);--hpa:var(--accent,#7c3aed);--hts:rgba(0,0,0,.8);
    position:-webkit-sticky;position:sticky;top:var(--aff-h,0px);z-index:70;padding-top:env(safe-area-inset-top,0px);
    background:rgba(255,255,255,.72);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
    color:#1d1d1f;border:0;box-shadow:none;
    transition:background-color .35s var(--vp-ease),box-shadow .35s ease}
html.dark .vp-header{--hb:#000;--hg1:rgba(255,255,255,.08);--hg2:rgba(255,255,255,.14);--hts:rgba(245,245,247,.8);background:rgba(0,0,0,.88);color:#f5f5f7}
/* hairline once the page has scrolled (.is-stuck is toggled in vibepass.js) */
.vp-header.is-stuck{box-shadow:0 .5px 0 var(--hg2)}
/* while the menu is open the bar turns solid, so bar and panel read as one surface */
html.vp-lock .vp-header{background:var(--bg,#fff);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
/* max-width raised from 1024px to 1280px so the left nav and the centred logo have room on desktop */
.vp-header .vp-header-in{position:relative;display:flex;align-items:center;gap:8px;width:100%;max-width:1280px;height:44px;min-height:0;margin:0 auto;
    padding:0 max(22px,env(safe-area-inset-right)) 0 max(22px,env(safe-area-inset-left))}
/* left block can never grow into the centred logo: it stops 90px short of the middle */
.vp-header .vp-left{position:relative;z-index:3;flex:0 1 auto;min-width:0;max-width:calc(50% - 90px);display:flex;align-items:center;justify-content:flex-start;gap:0}
.vp-header .vp-right{position:relative;z-index:2;flex:none;display:flex;align-items:center;gap:0;margin-left:auto}
/* logo stays dead centre at every width */
.vp-header .vp-logo{position:absolute;left:50%;top:0;transform:translateX(-50%);z-index:1;display:flex;align-items:center;height:44px;margin:0;padding:0}
.vp-header .vp-logo img{display:block;height:22px;width:auto;max-width:none}

/* hamburger: two thin lines that share one centre (y = 22px) and cross into an X */
.vp-header .vp-burger{position:relative;display:block;flex:none;width:44px;height:44px;margin:0 2px 0 -14px;padding:0;border:0;border-radius:0;
    background:none;box-shadow:none;color:var(--hts);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:color .2s}
.vp-header .vp-burger:hover{color:inherit}
.vp-header .vp-burger i{position:absolute;left:14px;top:21.3px;width:16px;height:1.4px;margin:0;border-radius:1px;background:currentColor;pointer-events:none;
    transition:transform .5s var(--vp-ease)}
.vp-header .vp-burger i:nth-child(1){transform:translateY(-3.2px)}
.vp-header .vp-burger i:nth-child(2){transform:translateY(3.2px)}
.vp-header .vp-burger.is-open i:nth-child(1){transform:rotate(45deg)}
.vp-header .vp-burger.is-open i:nth-child(2){transform:rotate(-45deg)}

.vp-header .vp-nav{display:flex;align-items:center;gap:0;margin:0;min-width:0;white-space:nowrap}
.vp-header .vp-nav a{display:flex;align-items:center;flex:none;height:44px;padding:0 clamp(6px,1.1vw,14px);font-size:12px;font-weight:400;letter-spacing:-.01em;line-height:1;
    color:var(--hts);text-decoration:none;transition:color .2s}
.vp-header .vp-nav a:hover{color:inherit}
/* Apple style: links rest at 80%, the current page goes to full strength (no colour change) */
.vp-header .vp-nav a.is-active:not(.vp-nav-aff){color:inherit}
/* Affiliate lives in the menu only. It is hidden in the top bar so it can never touch the centred logo. */
.vp-header .vp-nav a.vp-nav-aff{display:none}

.vp-header .vp-icon-btn{position:relative;display:grid;place-items:center;width:36px;height:44px;padding:0;border:0;border-radius:0;background:none;color:var(--hts);cursor:pointer;transition:color .2s}
.vp-header .vp-icon-btn:hover{color:inherit;background:none}
.vp-header .vp-badge{position:absolute;top:9px;right:3px;min-width:15px;height:15px;padding:0 4px;border-radius:99px;background:var(--hpa);color:#fff;font-size:10px;font-weight:800;line-height:15px;text-align:center}
.vp-header .vp-badge[hidden]{display:none}

/* Icon guard: header icon sizes never depend on utility classes loading */
.vp-header svg{flex:none}
.vp-header .vp-icon-btn svg{width:18px;height:18px}
.vp-header .vp-user>button svg{width:12px;height:12px;opacity:.6}

.vp-header .vp-user-wrap{position:relative;display:flex;align-items:center}
.vp-header .vp-user{position:relative}
.vp-header .vp-user>button{display:flex;align-items:center;gap:2px;height:44px;padding:0 6px;border:0;border-radius:0;background:none;color:inherit;cursor:pointer}
.vp-header .vp-avatar{width:24px;height:24px;border-radius:50%;object-fit:cover;display:inline-grid;place-items:center;background:var(--hpa);color:#fff;font-weight:800;font-size:11px}
.vp-header .vp-pop{border:0;position:absolute;right:0;top:calc(100% + 6px);width:230px;padding:8px;border-radius:20px;background:var(--hb);box-shadow:0 20px 60px rgba(0,0,0,.2),0 0 0 1px var(--hg2);transform-origin:top right}
.vp-header .vp-pop a,.vp-header .vp-pop button{display:block;width:100%;text-align:left;padding:11px 14px;border:0;border-radius:12px;background:none;color:inherit;font:inherit;font-size:14.5px;font-weight:600;text-decoration:none;cursor:pointer}
.vp-header .vp-pop a:hover,.vp-header .vp-pop button:hover{background:var(--hg1)}
.vp-header .vp-pop .danger{color:#dc2626}
.pop-enter-active,.pop-leave-active{transition:opacity .16s,transform .2s var(--vp-ease)}
.pop-enter-from,.pop-leave-to{opacity:0;transform:scale(.96) translateY(-6px)}

.vp-header .vp-auth{display:flex;align-items:center;gap:4px;margin-left:4px}
.vp-header .vp-auth .btn{min-height:0;height:28px;padding:0 13px;font-size:12px;font-weight:600;letter-spacing:-.01em;border-radius:999px;box-shadow:none}
/* Sign up pill: solid ink, no violet */
.vp-header .vp-auth .btn-primary,.vp-header .vp-auth .btn-primary:hover{background:var(--text,#1d1d1f);color:var(--bg,#fff);border-color:transparent}
.vp-header .vp-auth .btn-primary:hover{opacity:.85}
.vp-header :focus-visible{outline:2px solid var(--hpa);outline-offset:2px;border-radius:8px}

/* Theme button hides on narrow screens (the menu has its own theme chip) */
@media (max-width:833px){
    .vp-header .vp-theme-btn{display:none}
}
/* Top-bar links hide below 1024px, because six links plus the burger no longer fit beside the
   centred logo (this was the Affiliate / logo collision). Everything stays reachable in the menu. */
@media (max-width:1023px){
    .vp-header .vp-nav{display:none}
}
@media (max-width:480px){
    .vp-header .vp-header-in{padding-left:16px;padding-right:8px}
    .vp-header .vp-auth .btn-ghost{display:none}
}

/* =====================================================================
   MENU: full-screen panel that unfolds from under the bar (Apple style).
   --vp-menu-top is set by vibepass.js to the real bottom edge of the header.
   Closes softly; on touch you can also swipe up (see initMenuSwipe in vibepass.js).
   ===================================================================== */
html.vp-lock,html.vp-lock body{overflow:hidden}
.vp-scrim{display:none}
#vp-shell .vp-menu{position:fixed;top:var(--vp-menu-top,calc(var(--aff-h,0px) + 44px + env(safe-area-inset-top,0px)));right:0;bottom:0;left:0;z-index:60;
    display:flex!important;flex-direction:column;width:100%;max-width:none;height:auto;overflow:hidden;clip-path:none;
    background:var(--bg,#fff);transform:translate3d(0,-14px,0);transform-origin:top center;opacity:0;visibility:hidden;pointer-events:none;will-change:transform,opacity;
    touch-action:pan-y;overscroll-behavior:contain;
    transition:opacity .34s var(--vp-ease),transform .5s var(--vp-ease),visibility 0s linear .5s}
html.dark #vp-shell .vp-menu{background:#000}
#vp-shell .vp-menu.open{transform:none;opacity:1;visibility:visible;pointer-events:auto;box-shadow:none;
    transition:opacity .3s var(--vp-ease),transform .5s var(--vp-ease),visibility 0s}
/* while a finger is dragging, follow it with no easing */
#vp-shell .vp-menu.is-dragging,#vp-shell .vp-menu.is-dragging .m-item{transition:none!important}
/* opaque strip hidden behind the header so no page content can peek through a sub-pixel gap */
#vp-shell .vp-menu::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:24px;background:inherit;pointer-events:none}

.vp-menu .vp-menu-in{flex:1 1 auto;min-height:0;width:100%;max-width:680px;margin:0 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
    scrollbar-width:none;-ms-overflow-style:none;padding:24px 28px calc(40px + env(safe-area-inset-bottom,0px));display:grid;align-content:start;gap:0}
.vp-menu .vp-menu-in::-webkit-scrollbar{display:none;width:0;height:0}
.vp-menu .vp-menu-in:focus{outline:none}

/* items fade and rise in one after another; on close they leave together */
.vp-menu .m-item{opacity:0;transform:translate3d(0,-8px,0);transition:opacity .2s ease,transform .2s ease}
.vp-menu.open .m-item{opacity:1;transform:none;
    transition:opacity .45s var(--vp-ease) calc(var(--i,0) * 40ms + 90ms),transform .55s var(--vp-ease) calc(var(--i,0) * 40ms + 90ms)}
@keyframes vp-soft{from{opacity:0}to{opacity:1}}
.vp-menu .m-group[open]>.m-list{animation:vp-soft .4s ease both}

/* small grabber hint at the bottom edge, touch screens only */
.vp-menu .vp-grab{position:absolute;left:50%;bottom:calc(10px + env(safe-area-inset-bottom,0px));width:36px;height:4px;margin-left:-18px;border-radius:4px;background:currentColor;opacity:.18;pointer-events:none}
@media (hover:hover) and (pointer:fine){.vp-menu .vp-grab{display:none}}

.vp-menu .m-user{display:flex;align-items:center;gap:12px;padding:0 0 18px;border:0;background:none;border-radius:0}
.vp-menu .m-user img,.vp-menu .m-user .vp-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;flex:none;display:grid;place-items:center;background:var(--accent,#7c3aed);color:#fff;font-weight:800;font-size:18px}
.vp-menu .m-user>div{min-width:0}
.vp-menu .m-user b{display:flex;align-items:center;gap:6px;font-size:15.5px}
.vp-menu .m-user small{display:block;margin-top:1px;font-size:12.5px;color:var(--text-secondary,#6b6880);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vp-menu .m-tick{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--accent,#7c3aed);color:#fff}
.vp-menu .m-cta{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 0 18px}

.vp-menu .m-main{display:grid;gap:0;margin:0 0 14px}
.vp-menu .m-big{display:flex;align-items:center;justify-content:space-between;padding:7px 0;font-family:inherit;font-size:clamp(1.6rem,5.4vw,1.9rem);font-weight:600;letter-spacing:-.012em;line-height:1.15;color:inherit;text-decoration:none;transition:color .25s ease,opacity .15s ease}
.vp-menu .m-big:hover,.vp-menu .m-big.is-active{color:var(--accent,#7c3aed)}
.vp-menu .m-big:active{opacity:.55}

.vp-menu .m-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:14px 0 6px;cursor:pointer;user-select:none;font-size:12px;font-weight:600;color:var(--text-secondary,#6b6880)}
.vp-menu .m-group>summary::-webkit-details-marker{display:none}
.vp-menu .m-group>summary svg{width:14px;height:14px;transition:transform .45s var(--vp-ease)}
.vp-menu .m-group[open]>summary svg{transform:rotate(180deg)}
.vp-menu .m-list{display:grid;gap:0;padding:2px 0 8px}
.vp-menu .m-row{display:flex;align-items:center;gap:12px;padding:6px 0;color:inherit;font-size:17px;font-weight:600;text-decoration:none;transition:color .25s ease,opacity .15s ease}
.vp-menu .m-row svg{display:none}
.vp-menu .m-row span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vp-menu .m-row em{font-style:normal;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--accent,#7c3aed);color:#fff;font-size:11px;font-weight:800;line-height:20px;text-align:center}
.vp-menu .m-row:hover,.vp-menu .m-row.is-active{color:var(--accent,#7c3aed)}
.vp-menu .m-row:active{opacity:.55}

.vp-menu .m-bottom{flex:none;display:flex;gap:8px;padding:12px 28px calc(14px + env(safe-area-inset-bottom,0px));max-width:680px;width:100%;margin:0 auto;box-sizing:border-box}
.vp-menu .m-chip{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:58px;padding:8px 6px;border:0;border-radius:14px;background:var(--hg1,rgba(0,0,0,.05));color:inherit;font:inherit;font-size:11.5px;font-weight:650;cursor:pointer;transition:background .3s ease,transform .2s ease}
.vp-menu .m-chip svg{width:19px;height:19px;color:var(--accent,#7c3aed)}
.vp-menu .m-chip span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vp-menu .m-chip:hover{background:var(--hg2,rgba(0,0,0,.09))}.vp-menu .m-chip:active{transform:scale(.97)}
.vp-menu .m-chip.danger,.vp-menu .m-chip.danger svg{color:#dc2626}
.vp-menu .m-chip:disabled{opacity:.55;cursor:wait}
.vp-menu form.contents{display:contents}

/* toast */
.vp-toast{position:fixed;z-index:95;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translate(-50%,16px);opacity:0;pointer-events:none;max-width:calc(100vw - 32px);padding:12px 18px;border-radius:14px;background:var(--text,#16131f);color:var(--bg,#fff);font-size:14px;font-weight:600;transition:opacity .2s,transform .25s cubic-bezier(.22,1,.36,1)}
.vp-toast.show{opacity:1;transform:translate(-50%,0)}

/* Creator KYC status notice: slim bar with a button. Scoped strongly to protect it from page-wide SVG rules */
#page .vp-kyc-notice{display:block!important;width:100%;max-width:1280px;margin:8px auto 0;padding:0 16px;box-sizing:border-box}
#page .vp-kyc-notice-in{--kc:var(--accent,#7c3aed);display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;gap:6px 10px!important;width:100%;box-sizing:border-box;padding:8px 8px 8px 12px;border:1px solid color-mix(in srgb,var(--kc) 22%,transparent);border-radius:14px;background:color-mix(in srgb,var(--kc) 6%,var(--bg,#fff));color:var(--text,#201b2b)}
#page .vp-kyc-notice-in.is-pending{--kc:#d97706}
#page .vp-kyc-notice-in.is-rejected{--kc:#dc2626}
#page .vp-kyc-notice-mark{display:block!important;position:static!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;max-height:18px!important;flex:0 0 18px!important;color:var(--kc);margin:0!important;overflow:visible}
#page .vp-kyc-notice-copy{display:block!important;min-width:0;flex:1 1 200px!important;font-size:12.5px!important;line-height:1.4!important}
#page .vp-kyc-notice-copy strong{display:inline!important;margin:0 6px 0 0!important;font-size:12.5px!important;line-height:1.4!important;font-weight:750!important}
#page .vp-kyc-notice-copy p{display:inline!important;margin:0!important;font-size:12.5px!important;line-height:1.4!important;color:var(--text-secondary,#6b6880)}
#page .vp-kyc-notice-copy .vp-kyc-reason{display:block!important;margin:4px 0 0!important;padding:0!important;border:0!important}
#page .vp-kyc-notice-copy .vp-kyc-reason strong{display:inline!important;font-size:12.5px!important}
#page .vp-kyc-notice-action{display:inline-flex!important;align-items:center;justify-content:center;gap:5px;flex:0 0 auto!important;margin:0 0 0 auto!important;padding:7px 14px;border-radius:99px;background:var(--kc);color:#fff!important;font-size:12.5px!important;line-height:1.2!important;font-weight:700;text-decoration:none;white-space:nowrap;box-shadow:0 6px 14px -8px var(--kc);transition:filter .25s ease,transform .2s ease}
#page .vp-kyc-notice-action:hover{filter:brightness(1.1);text-decoration:none}
#page .vp-kyc-notice-action:active{transform:scale(.97)}
@media(max-width:600px){#page .vp-kyc-notice{margin-top:6px;padding:0 10px}#page .vp-kyc-notice-in{padding:8px 8px 8px 10px;border-radius:12px}}

/* Desktop sidebar: no visible scrollbar/track, soft fade at the edges, smooth hover states.
   (Overrides only; the base .vp-aside rules live in css/vibepass.css) */
.vp-dash .vp-aside{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;
    -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 12px,#000 calc(100% - 20px),transparent 100%);
    mask-image:linear-gradient(to bottom,transparent 0,#000 12px,#000 calc(100% - 20px),transparent 100%);
    padding-top:max(var(--aside-pt,0px),14px);padding-bottom:20px}
.vp-dash .vp-aside::-webkit-scrollbar{display:none;width:0;height:0}
.vp-dash .vp-aside .sb-link{transition:background .18s ease,color .18s ease,transform .18s ease}
.vp-dash .vp-aside .sb-link:active{transform:scale(.985)}
.vp-dash .vp-aside .sb-sep{height:0;border:0;background:none;margin:6px 0;opacity:0}
.vp-aside svg{flex:none}
.vp-aside .sb-link svg{width:20px;height:20px}
.vp-aside .m-tick svg{width:11px;height:11px}

@media (prefers-reduced-motion:reduce){
    #vp-shell .vp-menu,.vp-menu .m-item,.vp-header .vp-burger i{transition:opacity .15s linear!important;transition-delay:0s!important;transform:none!important}
    .vp-header .vp-burger i:nth-child(1){transform:translateY(-3.2px)!important}
    .vp-header .vp-burger i:nth-child(2){transform:translateY(3.2px)!important}
    .vp-header .vp-burger.is-open i:nth-child(1){transform:rotate(45deg)!important}
    .vp-header .vp-burger.is-open i:nth-child(2){transform:rotate(-45deg)!important}
}
button.m-row{width:100%;text-align:left;background:none;border:0;font:inherit;color:inherit;cursor:pointer}

/* =====================================================================
   NO-PURPLE (light mode): notices stay white with a thin accent outline.
   Header, hamburger and menu are already neutral in the rules above.
   ===================================================================== */
html:not(.dark) #page .vp-kyc-notice-in{background:#fff}
html:not(.dark) #page .vp-kyc-notice-action{background:#fff;color:var(--kc)!important;box-shadow:inset 0 0 0 1.5px var(--kc)}

/* Dark mode: menu chips need a light tint (the header-scoped vars do not reach the menu) */
html.dark .vp-menu .m-chip{background:rgba(255,255,255,.08)}
html.dark .vp-menu .m-chip:hover{background:rgba(255,255,255,.14)}

/* Desktop dashboard sidebar height: clears the sticky header and the offers bar */
@media (min-width:1024px){
    .vp-aside{max-height:calc(100vh - var(--header-h) - var(--aff-h,0px) - 40px)!important}
}
/* ===== Menu: tighter, centered, Apple-style ===== */
.vp-menu .vp-menu-in{
  align-content:start; grid-auto-rows:max-content; grid-template-rows:none;
  padding:12px 24px calc(120px + env(safe-area-inset-bottom,0px));
  text-align:center;
}
.vp-menu .vp-menu-in > *:first-child{margin-top:0}
.vp-menu .vp-menu-in > :empty{display:none}

/* user: centered stack */
.vp-menu .m-user{flex-direction:column;gap:8px;padding:8px 0 20px;text-align:center}
.vp-menu .m-user img,.vp-menu .m-user .vp-avatar{width:64px;height:64px}
.vp-menu .m-user b{justify-content:center;font-size:17px}
.vp-menu .m-user small{font-size:13px}

/* main links: big, centered, hairline-separated */
.vp-menu .m-main{margin:0 0 8px}
.vp-menu .m-big{position:relative;justify-content:center;padding:13px 0;
  font-size:clamp(1.5rem,6vw,1.85rem);font-weight:600;letter-spacing:-.02em;
  border-top:.5px solid var(--hg2,rgba(0,0,0,.09))}
.vp-menu .m-main .m-big:first-child{border-top:0}
.vp-menu .m-big > i,.vp-menu .m-big > em,.vp-menu .m-big > .dot{position:absolute;right:4px;top:50%;transform:translateY(-50%)}

/* account group */
.vp-menu .m-group>summary{justify-content:center;gap:6px;padding:18px 0 8px;font-size:13px}
.vp-menu .m-list{justify-items:center;gap:2px}
.vp-menu .m-row{justify-content:center;padding:8px 0;font-size:19px;font-weight:600}
.vp-menu .m-row span{flex:0 1 auto}

/* bottom chips: floating, frosted, rounder */
.vp-menu .m-bottom{padding:10px 20px calc(18px + env(safe-area-inset-bottom,0px));
  background:linear-gradient(to top,var(--bg,#fff) 70%,transparent)}
.vp-menu .m-chip{border-radius:18px;min-height:62px}
.vp-menu .vp-grab{display:none}
