/**
 * OptionFunds shared navigation styles
 * File: ./css/site-nav.css
 */

:root{
  --of-nav-navy:#071426;
  --of-nav-navy-2:#0b1f3a;
  --of-nav-blue:#2563eb;
  --of-nav-blue-dark:#1d4ed8;
  --of-nav-text:#0f172a;
  --of-nav-muted:#64748b;
  --of-nav-border:#e2e8f0;
  --of-nav-surface:#ffffff;
  --of-nav-soft:#f8fafc;
  --of-nav-topbar-height:68px;
  --of-nav-sidebar-width:292px;
}

body.of-nav-open{
  overflow:hidden!important;
}

.of-topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:2500;
  height:var(--of-nav-topbar-height);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:20px;
  padding:0 22px;
  border-bottom:1px solid rgba(226,232,240,.92);
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 28px rgba(15,23,42,.07);
  backdrop-filter:blur(18px);
}

.of-topbar-left,
.of-topbar-right{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

.of-topbar-right{
  justify-content:flex-end;
}

.of-menu-btn,
.of-sidebar-close,
.of-topbar-shortcut,
.of-account-button,
.of-auth-button{
  border:0;
  outline:none;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.of-menu-btn{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 42px;
  border:1px solid #dbeafe;
  border-radius:12px;
  color:var(--of-nav-blue);
  background:#eff6ff;
  font-size:17px;
  transition:.2s ease;
}

.of-menu-btn:hover{
  transform:translateY(-2px);
  color:#fff;
  border-color:var(--of-nav-blue);
  background:var(--of-nav-blue);
}

.of-topbar-brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--of-nav-text);
  text-decoration:none;
}

.of-brand-mark{
  width:42px;
  height:42px;
  min-width:42px;
  max-width:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 42px;
  overflow:hidden;
  border-radius:12px;
  background:transparent;
}

.of-brand-logo{
  width:42px;
  height:42px;
  min-width:42px;
  max-width:42px;
  display:block;
  object-fit:contain;
  object-position:center;
  border:0;
  background:transparent;
  filter:drop-shadow(0 8px 16px rgba(37,99,235,.22));
}

.of-brand-copy{
  min-width:0;
}

.of-brand-copy strong,
.of-brand-copy small{
  display:block;
}

.of-brand-copy strong{
  color:var(--of-nav-text);
  font-size:15px;
  font-weight:900;
  letter-spacing:-.02em;
}

.of-brand-copy small{
  margin-top:2px;
  color:var(--of-nav-muted);
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.of-topbar-page{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#334155;
  font-size:11px;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.of-page-indicator{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 6px rgba(34,197,94,.10);
}

.of-topbar-shortcut{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 40px;
  border:1px solid var(--of-nav-border);
  border-radius:12px;
  color:#475569;
  background:#fff;
  text-decoration:none;
  transition:.2s ease;
}

.of-topbar-shortcut:hover{
  transform:translateY(-2px);
  color:var(--of-nav-blue);
  border-color:#bfdbfe;
  background:#eff6ff;
}

.of-account-button{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  padding:5px 8px 5px 5px;
  border:1px solid var(--of-nav-border);
  border-radius:13px;
  color:var(--of-nav-text);
  background:#fff;
  text-align:left;
  transition:.2s ease;
}

.of-account-button:hover{
  border-color:#bfdbfe;
  box-shadow:0 8px 22px rgba(15,23,42,.07);
}

.of-topbar-avatar,
.of-account-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:12px;
  color:#fff;
  background:linear-gradient(135deg,var(--of-nav-blue),var(--of-nav-blue-dark));
  font-weight:900;
  text-transform:uppercase;
}

.of-topbar-avatar{
  width:34px;
  height:34px;
  font-size:10px;
}

.of-topbar-account-copy{
  min-width:0;
  max-width:150px;
}

.of-topbar-account-copy strong,
.of-topbar-account-copy small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.of-topbar-account-copy strong{
  color:var(--of-nav-text);
  font-size:10px;
  font-weight:850;
}

.of-topbar-account-copy small{
  margin-top:2px;
  color:var(--of-nav-muted);
  font-size:8px;
}

/* Sidebar */

.of-sidebar{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  z-index:3000;
  width:min(var(--of-nav-sidebar-width),calc(100vw - 28px));
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  border-right:1px solid rgba(255,255,255,.08);
  color:#fff;
  background:
    radial-gradient(circle at 0 0,rgba(59,130,246,.18),transparent 18rem),
    linear-gradient(180deg,var(--of-nav-navy),var(--of-nav-navy-2));
  box-shadow:24px 0 70px rgba(7,20,38,.30);
  transform:translateX(-105%);
  transition:transform .3s cubic-bezier(.2,.75,.2,1);
}

.of-sidebar.active{
  transform:translateX(0);
}

.of-sidebar-head{
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:15px 16px;
  border-bottom:1px solid rgba(255,255,255,.09);
}

.of-sidebar-brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:11px;
  color:#fff;
  text-decoration:none;
}

.of-sidebar-logo{
  width:46px;
  height:46px;
  min-width:46px;
  max-width:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 46px;
  overflow:hidden;
  border:0;
  border-radius:13px;
  background:transparent;
}

.of-sidebar-brand-logo{
  width:46px;
  height:46px;
  min-width:46px;
  max-width:46px;
  display:block;
  object-fit:contain;
  object-position:center;
  border:0;
  background:transparent;
  filter:drop-shadow(0 8px 14px rgba(37,99,235,.26));
}

.of-sidebar-brand strong,
.of-sidebar-brand small{
  display:block;
}

.of-sidebar-brand strong{
  font-size:16px;
  font-weight:900;
  letter-spacing:-.02em;
}

.of-sidebar-brand small{
  margin-top:2px;
  color:#94a3b8;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.of-sidebar-close{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 38px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:11px;
  color:#cbd5e1;
  background:rgba(255,255,255,.06);
  font-size:15px;
  transition:.2s ease;
}

.of-sidebar-close:hover{
  color:#fff;
  border-color:rgba(248,113,113,.35);
  background:rgba(239,68,68,.22);
}

.of-sidebar-body{
  min-height:0;
  overflow-y:auto;
  padding:13px 12px;
  scrollbar-width:thin;
  scrollbar-color:rgba(148,163,184,.38) transparent;
}

.of-sidebar-body::-webkit-scrollbar{
  width:6px;
}

.of-sidebar-body::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(148,163,184,.35);
}

.of-nav{
  display:grid;
  gap:17px;
}

.of-nav-section{
  display:grid;
  gap:7px;
}

.of-nav-heading{
  padding:0 11px;
  color:#64748b;
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.of-nav-list{
  display:grid;
  gap:4px;
}

.of-nav-link{
  position:relative;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 18px;
  gap:10px;
  align-items:center;
  min-height:48px;
  padding:5px 10px 5px 7px;
  border:1px solid transparent;
  border-radius:13px;
  color:#cbd5e1;
  text-decoration:none;
  font-size:12px;
  font-weight:750;
  transition:.2s ease;
}

.of-nav-link:hover{
  color:#fff;
  border-color:rgba(255,255,255,.08);
  background:rgba(255,255,255,.065);
}

.of-nav-link.active{
  color:#fff;
  border-color:rgba(147,197,253,.22);
  background:
    linear-gradient(90deg,rgba(37,99,235,.34),rgba(37,99,235,.12));
  box-shadow:inset 3px 0 0 #60a5fa;
}

.of-nav-icon{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  color:#94a3b8;
  background:rgba(255,255,255,.055);
  font-size:13px;
  transition:.2s ease;
}

.of-nav-link:hover .of-nav-icon,
.of-nav-link.active .of-nav-icon{
  color:#bfdbfe;
  background:rgba(59,130,246,.18);
}

.of-nav-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.of-nav-arrow{
  color:#475569;
  font-size:8px;
  opacity:0;
  transform:translateX(-3px);
  transition:.2s ease;
}

.of-nav-link:hover .of-nav-arrow,
.of-nav-link.active .of-nav-arrow{
  opacity:1;
  transform:none;
}

.of-sidebar-foot{
  padding:13px;
  border-top:1px solid rgba(255,255,255,.09);
  background:rgba(0,0,0,.10);
}

.of-account-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px;
  margin-bottom:9px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  background:rgba(255,255,255,.045);
}

.of-account-avatar{
  width:39px;
  height:39px;
  font-size:10px;
}

.of-account-details{
  min-width:0;
}

.of-account-details strong,
.of-account-details small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.of-account-details strong{
  color:#fff;
  font-size:11px;
  font-weight:850;
}

.of-account-details small{
  margin-top:3px;
  color:#94a3b8;
  font-size:8px;
}

.of-auth-button{
  width:100%;
  min-height:43px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 13px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:11px;
  color:#dbeafe;
  background:rgba(255,255,255,.07);
  font-size:11px;
  font-weight:850;
  transition:.2s ease;
}

.of-auth-button:hover{
  color:#fff;
  border-color:rgba(147,197,253,.28);
  background:rgba(37,99,235,.25);
}

.of-auth-button[data-authenticated="true"]:hover{
  border-color:rgba(248,113,113,.28);
  background:rgba(239,68,68,.22);
}

/* Overlay */

.of-overlay{
  position:fixed;
  inset:0;
  z-index:2900;
  pointer-events:none;
  opacity:0;
  background:rgba(7,20,38,.62);
  backdrop-filter:blur(5px);
  transition:opacity .25s ease;
}

.of-overlay.active{
  pointer-events:auto;
  opacity:1;
}

/* Prevent hidden UI flash before navigation initializes. */
html:not(.of-nav-ready) .of-topbar,
html:not(.of-nav-ready) .of-sidebar,
html:not(.of-nav-ready) .of-overlay{
  visibility:hidden;
}


@media(max-width:760px){
  .of-brand-mark,
  .of-brand-logo{
    width:38px;
    height:38px;
    min-width:38px;
    max-width:38px;
    flex-basis:38px;
  }

  .of-sidebar-logo,
  .of-sidebar-brand-logo{
    width:42px;
    height:42px;
    min-width:42px;
    max-width:42px;
    flex-basis:42px;
  }
}

@media(max-width:760px){
  .of-topbar{
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    padding:0 12px;
  }

  .of-topbar-page{
    display:none;
  }

  .of-topbar-account-copy{
    display:none;
  }

  .of-account-button{
    padding:4px;
  }

  .of-topbar-shortcut{
    display:none;
  }

  .of-brand-copy small{
    display:none;
  }
}

@media(max-width:420px){
  .of-brand-copy strong{
    font-size:14px;
  }

  .of-menu-btn{
    width:39px;
    height:39px;
    flex-basis:39px;
  }
}

@media(prefers-reduced-motion:reduce){
  .of-sidebar,
  .of-overlay,
  .of-menu-btn,
  .of-topbar-shortcut,
  .of-account-button,
  .of-nav-link,
  .of-nav-icon,
  .of-nav-arrow,
  .of-auth-button{
    transition:none!important;
  }
}

/* OPTIONFUNDS MOBILE SIDEBAR BOUNDARY FIX
   Keep this block at the very bottom of site-nav.css. */

@media (max-width:760px){
  .of-sidebar{
    top:0!important;
    right:auto!important;
    bottom:0!important;
    left:0!important;
    width:min(292px,calc(100dvw - 16px))!important;
    max-width:calc(100dvw - 16px)!important;
    height:100dvh!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    transform:translate3d(-101%,0,0)!important;
  }

  .of-sidebar.active{
    transform:translate3d(0,0,0)!important;
  }

  .of-sidebar-head{
    width:100%!important;
    min-width:0!important;
    min-height:70px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 34px!important;
    align-items:center!important;
    gap:8px!important;
    padding:10px 10px 10px 12px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  .of-sidebar-brand{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    overflow:hidden!important;
  }

  .of-sidebar-logo,
  .of-sidebar-brand-logo{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    flex:0 0 42px!important;
    transform:none!important;
  }

  .of-sidebar-brand-copy,
  .of-sidebar-brand > span:last-child{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .of-sidebar-brand strong,
  .of-sidebar-brand small{
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    transform:none!important;
  }

  .of-sidebar-brand strong{
    font-size:14px!important;
    line-height:1.08!important;
  }

  .of-sidebar-brand small{
    margin-top:3px!important;
    font-size:6.5px!important;
    line-height:1.1!important;
  }

  .of-sidebar-close{
    position:relative!important;
    top:auto!important;
    right:auto!important;
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    flex:0 0 34px!important;
    justify-self:end!important;
    align-self:center!important;
    margin:0!important;
    transform:none!important;
    box-sizing:border-box!important;
  }

  .of-sidebar-body{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:0!important;
    padding:11px 8px 12px 11px!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  .of-sidebar-body::-webkit-scrollbar{
    width:5px!important;
  }

  .of-sidebar-body::-webkit-scrollbar-track{
    margin:8px 0!important;
    background:transparent!important;
  }

  .of-sidebar-body::-webkit-scrollbar-thumb{
    border-radius:999px!important;
    background:rgba(148,163,184,.42)!important;
  }

  .of-nav,
  .of-nav-section,
  .of-nav-list,
  .of-nav-link{
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  .of-nav-link{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  .of-sidebar-foot{
    width:100%!important;
    max-width:100%!important;
    padding:11px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
}
