/* INITIAL CONDITIONAL UI STATE */
#viewedUserHeader:not([data-own="true"]):not([data-own="false"]){visibility:hidden}
#viewedUserHeader[data-own="true"] #viewedUserFollowButton{display:none!important}

/* Reserve the signed-in Messages control before its deferred controller mounts. */
#authBox:not(:has(#groovyChatHeaderBox)) #notificationBox:not([hidden]){margin-right:50px}

/* MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav,.mobile-profile-scrim{display:none}
#mobileSearchUserButton{display:none!important}

@media screen and (max-width:760px){
  #authBox:not(:has(#groovyChatHeaderBox)) #notificationBox:not([hidden]){margin-right:45px}

  html:has(body.groovy-chat-open),
  body.groovy-chat-open{
    overflow:hidden!important;
    overscroll-behavior:none;
  }

  body.mobile-bottom-nav-enabled{
    padding-bottom:calc(86px + env(safe-area-inset-bottom));
  }

  body.mobile-bottom-nav-enabled.selection-mode-active{
    padding-bottom:calc(218px + env(safe-area-inset-bottom));
  }

  body.mobile-bottom-nav-enabled.selection-mode-active .selection-action-bar{
    bottom:calc(78px + env(safe-area-inset-bottom));
  }

  body.mobile-bottom-nav-enabled .header .library-tabs{
    display:none!important;
  }

  body.mobile-bottom-nav-enabled #profileButton{
    display:none!important;
  }

  body.mobile-bottom-nav-enabled .mobile-user-search-button:not([hidden]){
    display:flex!important;
    width:40px;
    height:40px;
    flex:0 0 40px;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid rgba(255,255,255,.1);
    border-radius:50%;
    background:#121214;
    color:#9b9ba1;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    transition:border-color .15s ease,background .15s ease,color .15s ease,transform .12s ease;
  }

  body.mobile-bottom-nav-enabled .mobile-user-search-button svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
  }

  body.mobile-bottom-nav-enabled .mobile-user-search-button:active{
    border-color:rgba(255,100,24,.45);
    background:#19191b;
    color:#ff6a22;
    transform:scale(.94);
  }

  .mobile-bottom-nav{
    position:fixed;
    z-index:850;
    left:0;
    right:0;
    bottom:0;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:stretch;
    gap:0;
    min-height:68px;
    padding:5px max(5px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));
    border:0;
    border-top:1px solid rgba(255,255,255,.115);
    border-radius:0;
    background:linear-gradient(180deg,rgba(24,24,27,.985),rgba(12,12,14,.995));
    box-shadow:0 -10px 30px rgba(0,0,0,.36),inset 0 1px rgba(255,255,255,.035);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
  }

  .mobile-bottom-nav[hidden]{display:none}

  .mobile-bottom-nav-button{
    position:relative;
    display:flex;
    min-width:0;
    height:56px;
    min-height:56px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding:5px 2px 4px;
    border:0;
    border-radius:0;
    background:transparent;
    color:#85858d;
    font:inherit;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
    transition:background .15s ease,color .15s ease,transform .12s ease;
  }

  .mobile-bottom-nav-button:active{transform:scale(.94)}

  .mobile-bottom-nav-button svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.75;
    stroke-linecap:round;
    stroke-linejoin:round;
    transition:transform .16s ease;
  }

  .mobile-bottom-nav-button .mobile-more-icon{
    stroke-width:3.25;
  }

  .mobile-bottom-nav-button span{
    max-width:100%;
    overflow:hidden;
    font-size:9px;
    font-weight:720;
    line-height:1;
    letter-spacing:.01em;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .mobile-bottom-nav-button.active{
    border-radius:14px;
    background:linear-gradient(145deg,rgba(255,100,24,.15),rgba(255,100,24,.045));
    color:#ff7432;
  }

  .mobile-bottom-nav-button.active:after{
    content:"";
    position:absolute;
    left:50%;
    bottom:2px;
    width:22px;
    height:2px;
    border-radius:99px;
    background:#ff6418;
    box-shadow:0 0 10px rgba(255,100,24,.35);
    transform:translateX(-50%);
  }

  .mobile-bottom-nav-button.active svg{transform:translateY(-1px)}

  .mobile-profile-scrim{
    position:fixed;
    z-index:840;
    inset:0;
    display:block;
    border:0;
    background:rgba(0,0,0,.46);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
  }

  .mobile-profile-scrim[hidden]{display:none}

  body.mobile-bottom-nav-enabled #profileMenu{
    position:fixed;
    z-index:910;
    left:50%;
    right:auto;
    top:auto;
    bottom:calc(78px + env(safe-area-inset-bottom));
    width:min(410px,calc(100vw - 12px));
    max-height:min(68vh,560px);
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
    padding:21px 7px 8px;
    overflow-y:auto;
    overscroll-behavior:contain;
    border:1px solid rgba(255,255,255,.12);
    border-radius:20px;
    background:
      radial-gradient(circle at 10% 0,rgba(255,100,24,.08),transparent 34%),
      linear-gradient(155deg,rgba(29,29,32,.99),rgba(15,15,17,.995));
    box-shadow:0 24px 70px rgba(0,0,0,.72),inset 0 1px rgba(255,255,255,.045);
    transform:translateX(-50%);
    transform-origin:bottom center;
  }

  body.mobile-bottom-nav-enabled #profileMenu:before{
    content:"";
    position:absolute;
    left:50%;
    top:8px;
    width:38px;
    height:4px;
    border-radius:99px;
    background:#4b4b51;
    transform:translateX(-50%);
  }

  body.mobile-bottom-nav-enabled #profileMenu.open{
    display:grid;
    animation:mobile-profile-sheet-in .18s cubic-bezier(.2,.8,.2,1);
  }

  body.mobile-bottom-nav-enabled #profileMenu .profile-header,
  body.mobile-bottom-nav-enabled #profileMenu .profile-divider,
  body.mobile-bottom-nav-enabled #profileMenu #logoutButton{
    grid-column:1/-1;
  }

  body.mobile-bottom-nav-enabled #profileMenu .profile-header{
    margin-bottom:3px;
    padding:5px 7px 12px;
  }

  body.mobile-bottom-nav-enabled #profileMenu > .menu-button,
  body.mobile-bottom-nav-enabled #profileMenu #logoutButton{
    min-width:0;
    min-height:48px;
    padding-left:34px;
    padding-right:7px;
    border:1px solid rgba(255,255,255,.055);
    border-radius:11px;
    background:rgba(255,255,255,.025);
    font-size:11.5px;
    letter-spacing:-.01em;
    white-space:nowrap;
  }

  body.mobile-bottom-nav-enabled #profileMenu > .menu-button:before,
  body.mobile-bottom-nav-enabled #profileMenu #logoutButton:before{
    left:10px;
  }

  body.mobile-bottom-nav-enabled #profileMenu .groovy-chat-menu-icon{
    left:10px;
  }

  body.mobile-bottom-nav-enabled #profileMenu > .menu-button:active,
  body.mobile-bottom-nav-enabled #profileMenu #logoutButton:active{
    background:rgba(255,100,24,.1);
    transform:scale(.98);
  }

  body.mobile-bottom-nav-enabled #profileMenu #priceAlertsButton{
    display:none!important;
  }

  body.mobile-bottom-nav-enabled .scroll-top-button{
    bottom:calc(82px + env(safe-area-inset-bottom));
  }

  body.mobile-bottom-nav-enabled .install-app-banner{
    bottom:calc(82px + env(safe-area-inset-bottom));
  }

  body.mobile-bottom-nav-enabled .groovy-footer{
    margin-bottom:0;
  }

  @keyframes mobile-profile-sheet-in{
    from{opacity:0;transform:translate(-50%,12px) scale(.985)}
    to{opacity:1;transform:translateX(-50%) scale(1)}
  }
}

@media screen and (max-width:390px){
  .mobile-bottom-nav-button span{font-size:8.5px}
  .mobile-bottom-nav-button svg{width:21px;height:21px}
}

@media (prefers-reduced-motion:reduce){
  .mobile-bottom-nav-button,
  .mobile-bottom-nav-button svg{transition:none}
  body.mobile-bottom-nav-enabled #profileMenu.open{animation:none}
}
