/* Sickos navigation v2: quiet global bar + typographic disclosure menu. */

#appShell > .view:not(.active) { display: none !important; }

@media (min-width: 768px) {
  body.sickosNavV2 { --sickos-nav-height: 62px; }
  body.sickosNavV2.workspaceMenuOpen { overflow: hidden; }

  body.sickosNavV2 .topbar {
    position: sticky !important;
    top: 0;
    z-index: 3100 !important;
    display: flex !important;
    gap: 6px !important;
    min-height: var(--sickos-nav-height) !important;
    padding: 7px clamp(12px, 2.2vw, 32px) !important;
    overflow: visible !important;
    border-bottom: 1px solid rgba(20, 20, 22, .1) !important;
    background: rgba(255, 255, 255, .9) !important;
    box-shadow: none !important;
    backdrop-filter: saturate(180%) blur(22px) !important;
  }

  body.sickosNavV2 .brand {
    min-width: 124px !important;
    min-height: 46px;
    border-radius: 12px;
  }
  body.sickosNavV2 .topbarLockup > img { width: 37px !important; height: 37px !important; }
  body.sickosNavV2 .topbarLockup b { font-size: 12px !important; }

  body.sickosNavV2 .workspaceSwitcher { position: static; z-index: auto; }
  body.sickosNavV2 .workspaceSwitcher { margin-right: auto; }
  body.sickosNavV2 .workspaceMenuToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-width: 118px;
    min-height: 44px;
    padding: 0 13px;
    border: 0;
    border-radius: 12px;
    color: #1d1d1f;
    background: transparent;
    text-align: center;
    box-shadow: none;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, transform .18s ease;
  }
  body.sickosNavV2 .workspaceMenuToggle:hover,
  body.sickosNavV2 .workspaceSwitcher.open .workspaceMenuToggle {
    border-color: transparent;
    background: #f5f5f7;
    box-shadow: none;
  }
  body.sickosNavV2 .workspaceMenuToggle:active { transform: scale(.975); }
  body.sickosNavV2 .workspaceMenuGlyph { display: none; }
  body.sickosNavV2 .workspaceMenuCopy { display: block; min-width: 0; }
  body.sickosNavV2 .workspaceMenuCopy small { display: none; }
  body.sickosNavV2 .workspaceMenuCopy b {
    display: block;
    overflow: hidden;
    max-width: 144px;
    color: inherit;
    font-size: 12px;
    font-weight: 680;
    line-height: 1;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.sickosNavV2 .workspaceMenuChevron {
    flex: none;
    width: 12px;
    height: 12px;
    color: #707076;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  }

  body.sickosNavV2 .workspaceSwitcher .topnav {
    position: fixed !important;
    top: var(--sickos-nav-height) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 3050 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: clamp(34px, 7vw, 110px) !important;
    width: 100vw !important;
    height: calc(100dvh - var(--sickos-nav-height)) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(26px, 4vw, 54px) max(7vw, calc((100vw - 1160px) / 2)) clamp(38px, 6vw, 72px) !important;
    overflow: auto !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(20, 20, 22, .1) !important;
    border-radius: 0 !important;
    color: #1d1d1f !important;
    background: #fafafc !important;
    box-shadow: 0 24px 60px rgba(20, 20, 22, .12) !important;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transform-origin: 50% 0;
    pointer-events: none;
    backdrop-filter: saturate(180%) blur(28px);
    transition: opacity .2s ease, transform .38s cubic-bezier(.32, .72, 0, 1), visibility 0s linear .38s;
  }
  body.sickosNavV2 .workspaceSwitcher.open .topnav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  body.sickosNavV2 .workspaceMenuHead {
    position: absolute;
    top: 15px;
    right: max(20px, 4vw);
    display: block;
    min-height: 0;
    padding: 0;
  }
  body.sickosNavV2 .workspaceMenuTitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  body.sickosNavV2 .workspaceMenuHead > button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #424245 !important;
    background: #e8e8ed !important;
    font-size: 23px !important;
    font-weight: 400;
    line-height: 1;
    transition: background .18s ease, transform .18s ease;
  }
  body.sickosNavV2 .workspaceMenuHead > button:hover { background: #dedee3 !important; }
  body.sickosNavV2 .workspaceMenuHead > button:active { transform: scale(.94); }
  body.sickosNavV2 .workspaceMenuSection {
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
  }
  body.sickosNavV2 .workspaceMenuLabel {
    display: block;
    margin: 0 0 14px 1px;
    color: #6e6e73;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
  }
  body.sickosNavV2 .workspaceMenuGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 20px !important;
    align-items: center;
    gap: 12px;
    min-height: 47px !important;
    padding: 3px 1px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #1d1d1f !important;
    background: transparent !important;
    font-size: clamp(20px, 2vw, 29px) !important;
    font-weight: 680 !important;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-align: left;
    box-shadow: none !important;
    cursor: pointer;
    transition: color .18s ease, transform .18s ease !important;
  }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button:hover {
    border-color: transparent !important;
    color: #e81717 !important;
    background: transparent !important;
    transform: translateX(4px);
  }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button:active { transform: translateX(4px) scale(.985); }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button.active { color: #e81717 !important; background: transparent !important; }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button::after {
    width: 7px;
    height: 7px;
    justify-self: end;
    border-radius: 50%;
    background: transparent;
    content: "";
    transform: scale(.4);
    transition: transform .2s ease, background .2s ease;
  }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button.active::after { background: #e81717; transform: scale(1); }
  body.sickosNavV2 .workspaceSwitcher .topnav .workspaceMenuGrid > button > i { display: none; }

  body.sickosNavV2 .searchWrap {
    display: none !important;
  }
  body.sickosNavV2 #sidebarToggle,
  body.sickosNavV2 #refreshLibrary,
  body.sickosNavV2 #logout.ownerSignOut,
  body.sickosNavV2 .accountProfile {
    min-width: 44px !important;
    width: 44px;
    height: 44px;
    border-radius: 12px !important;
  }
  body.sickosNavV2 #logout.ownerSignOut { justify-content: center; padding: 0 !important; }
  body.sickosNavV2 #logout.ownerSignOut span,
  body.sickosNavV2 .accountProfile > span { display: none !important; }
  body.sickosNavV2 .accountProfile { justify-content: center; padding: 5px !important; }
  body.sickosNavV2 .accountProfile > i { width: 32px; height: 32px; }

  body.sickosNavV2.workspaceMenuOpen::after {
    position: fixed;
    inset: var(--sickos-nav-height) 0 0;
    z-index: 3000;
    background: rgba(20, 20, 22, .2);
    pointer-events: none;
    content: "";
    animation: sickosNavScrimIn .2s ease both;
  }
  @keyframes sickosNavScrimIn { from { opacity: 0; } }
}

@media (min-width: 768px) and (max-width: 1040px) {
  body.sickosNavV2 .topbar {
    padding-inline: 10px !important;
  }
  body.sickosNavV2 .brand { min-width: 44px !important; }
  body.sickosNavV2 .topbarLockup > span { display: none !important; }
  body.sickosNavV2 .workspaceMenuToggle { min-width: 106px; padding-inline: 9px; }
  body.sickosNavV2 .searchWordmark,
  body.sickosNavV2 .searchDivider,
  body.sickosNavV2 .searchWrap kbd { display: none !important; }
  body.sickosNavV2 .searchWrap { min-width: 110px; }
}

@media (max-width: 767px) {
  html.mobileReady .scMobileTop {
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 8px 0 16px;
    border-bottom-color: rgba(20, 20, 22, .1);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(22px);
  }
  html.mobileReady .scMobileBrand { min-width: 48px; min-height: 48px; }
  html.mobileReady .scMobileBrand img { width: 37px; height: 37px; }
  html.mobileReady .scIconButton { width: 46px; height: 46px; border-radius: 50%; }
  html.mobileReady .scIconButton:active { background: #f1f1f3; }
  html.mobileReady .scMenuToggle:focus-visible {
    outline: 3px solid rgba(232, 23, 23, .32) !important;
    outline-offset: 1px !important;
    box-shadow: none !important;
  }
  html.mobileReady .scMenuToggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 130px;
    min-height: 46px;
    padding: 0 12px 0 15px;
    border: 1px solid rgba(20, 20, 22, .1);
    border-radius: 999px;
    color: #1d1d1f;
    background: #f5f5f7;
  }
  html.mobileReady .scMenuCurrent {
    overflow: hidden;
    max-width: 132px;
    font-size: 12px;
    font-weight: 720;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html.mobileReady .scMenuGlyph { position: relative; flex: 0 0 22px; width: 22px; height: 22px; }

  html.mobileReady .scMobileMenu {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 110;
    overflow: hidden;
    background: #fafafc;
    clip-path: none;
    transform: translateY(-14px);
    transition: opacity .22s ease, transform .42s cubic-bezier(.32, .72, 0, 1), visibility 0s linear .42s;
  }
  html.mobileReady .scMobileMenu.show {
    transform: translateY(0);
    transition-delay: 0s;
  }
  html.mobileReady .scMobileMenuContent {
    width: 100%;
    max-width: none;
    padding: calc(76px + env(safe-area-inset-top)) 28px calc(24px + env(safe-area-inset-bottom));
  }
  html.mobileReady .scMenuLinks,
  html.mobileReady .scMenuGroup,
  html.mobileReady .scMenuGrid,
  html.mobileReady .scMenuPrimary .scMenuGrid {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0;
  }
  html.mobileReady .scMenuGroupLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  html.mobileReady .scMenuLink,
  html.mobileReady .scMenuPrimary .scMenuLink {
    display: grid;
    grid-template: none;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    justify-items: stretch;
    gap: 10px;
    width: 100%;
    min-height: 57px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    color: #1d1d1f;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transform: translateY(-8px);
    text-align: left;
  }
  html.mobileReady .scMenuLink .scMenuIcon { display: none; }
  html.mobileReady .scMenuLink b,
  html.mobileReady .scMenuPrimary .scMenuLink b {
    min-width: 0;
    font-size: clamp(25px, 7.4vw, 34px);
    font-weight: 680;
    line-height: 1.05;
    letter-spacing: -.042em;
  }
  html.mobileReady .scMenuLink > i,
  html.mobileReady .scMenuPrimary .scMenuLink > i {
    display: block;
    width: 7px;
    height: 7px;
    justify-self: end;
    border-radius: 50%;
    background: transparent;
    transform: scale(.5);
  }
  html.mobileReady .scMenuLink.active { color: #e81717; background: transparent; }
  html.mobileReady .scMenuLink.active > i { background: #e81717; transform: scale(1); }
  html.mobileReady .scMenuLink:active { color: #e81717; background: transparent; transform: scale(.985); }
  html.mobileReady .scMobileMenu.show .scMenuLink { animation-name: sickosMobileNavIn; }
  html.mobileReady .scMenuFooter {
    align-items: center;
    margin-top: auto;
    padding: 22px 0 2px;
    border-top-color: rgba(20, 20, 22, .12);
  }
  html.mobileReady .scMenuFooter > span { font-size: 11px; }
  html.mobileReady .scMenuFooter button {
    min-height: 44px;
    padding: 0 4px;
    color: #49494d;
    font-size: 12px;
  }
  @keyframes sickosMobileNavIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sickosNavV2 .workspaceMenuToggle,
  body.sickosNavV2 .workspaceMenuChevron,
  body.sickosNavV2 .workspaceSwitcher .topnav,
  body.sickosNavV2 .workspaceSwitcher .topnav button,
  html.mobileReady .scMobileMenu,
  html.mobileReady .scMenuLink { transition: none !important; animation: none !important; }
  html.mobileReady .scMobileMenu.show .scMenuLink { opacity: 1; transform: none; }
}
