
/* TOPBAR-POLISH-V3 */

/* sticky nie może kończyć się na wysokości viewportu */
html{
  height:auto!important;
  min-height:100%!important;
}

body{
  height:auto!important;
  min-height:100vh!important;
}

/* cały górny pasek zostaje przy scrollu */
.topbar{
  position:sticky!important;
  top:0!important;
  z-index:930!important;

  background:rgba(12,16,21,.94)!important;

  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);

  box-shadow:
    0 1px 0 rgba(255,255,255,.035),
    0 8px 26px rgba(0,0,0,.14);
}

/* command rail pod topbarem */
.tabs{
  top:var(--iwbp-topbar-h,49px)!important;
  z-index:920!important;
}


/* =====================================================
   ACTIONS
   ===================================================== */

.topbar-actions-v2{
  margin-left:auto!important;

  display:flex!important;
  align-items:center!important;

  gap:8px!important;
}


/* social */
.topbar-social-v3{
  width:34px;
  height:34px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  color:#66737e;

  border:0;
  background:transparent;

  text-decoration:none;

  transition:
    color .16s ease,
    background .16s ease;
}

.topbar-social-v3:hover{
  color:#d7e0e6;
  background:rgba(255,255,255,.035);
}

.topbar-social-v3 svg{
  display:block;
  width:17px;
  height:17px;
  fill:currentColor;
}


/* =====================================================
   SIGN IN + CONNECT shared style
   ===================================================== */

.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4),
.topbar-connect-v2{
  position:relative!important;
  overflow:hidden!important;

  height:38px!important;
  min-height:38px!important;

  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;

  box-sizing:border-box!important;

  border:1px solid rgba(255,255,255,.085)!important;
  border-radius:6px!important;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.030),
      rgba(255,255,255,.012)
    )!important;

  color:#aebac3!important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025)!important;

  font-family:'Inter',system-ui,sans-serif!important;
  font-size:11px!important;
  font-weight:700!important;

  text-decoration:none!important;

  transform:none!important;

  transition:
    color .16s ease,
    border-color .16s ease,
    background .16s ease!important;
}


/* SIGN IN */
.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4){
  min-width:86px!important;
  width:auto!important;

  padding:0 14px!important;
  margin:0!important;

  gap:8px!important;
}


/* CONNECT */
.topbar-connect-v2{
  min-width:142px!important;
  padding:0 17px!important;
}


/* hover bez glow */
.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4):hover,
.topbar-connect-v2:hover{
  color:#eef4f7!important;

  border-color:rgba(0,229,255,.18)!important;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.047),
      rgba(255,255,255,.018)
    )!important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035)!important;

  transform:none!important;
}


/* =====================================================
   SWEEP
   ===================================================== */

.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4)::before,
.topbar-connect-v2::before{
  content:"";

  position:absolute;
  z-index:1;

  top:-40%;
  bottom:-40%;
  left:-52%;

  width:32%;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.025) 24%,
      rgba(255,255,255,.14) 50%,
      rgba(255,255,255,.025) 76%,
      transparent
    );

  transform:skewX(-21deg);

  opacity:0;
  pointer-events:none;
}

.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4):hover::before,
.topbar-connect-v2:hover::before{
  animation:iwbpTopbarSweepV3 .62s ease-out;
}

@keyframes iwbpTopbarSweepV3{
  0%{
    left:-52%;
    opacity:0;
  }

  15%{
    opacity:1;
  }

  82%{
    opacity:1;
  }

  100%{
    left:125%;
    opacity:0;
  }
}

.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4) > *,
.topbar-connect-v2 > *{
  position:relative;
  z-index:2;
}


/* caret Sign in */
.topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4)::after{
  content:"";

  position:relative;
  z-index:2;

  width:5px;
  height:5px;

  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;

  transform:rotate(45deg) translateY(-1px);

  opacity:.62;
}


/* =====================================================
   AUTH — SIGN IN NATYCHMIAST
   ===================================================== */

/* kasujemy opóźnienie AUTH-NO-FLASH dla zwykłego Sign in */
#global-auth-entry-v1:not(.auth-resolved-v5):not(.account-topbar-v2){
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}


/*
  Gdy auth już wie, że user jest zalogowany,
  ale duży chip jeszcze się buduje, nie zostawiamy pustej dziury.
*/
#global-auth-entry-v1.account-topbar-v2:not(.account-chip-v4){
  visibility:visible!important;
  opacity:1!important;

  pointer-events:none!important;

  display:inline-flex!important;

  min-width:86px!important;
  width:86px!important;

  grid-template-columns:none!important;

  padding:0 14px!important;
}

#global-auth-entry-v1.account-topbar-v2:not(.account-chip-v4) > *{
  display:none!important;
}

#global-auth-entry-v1.account-topbar-v2:not(.account-chip-v4)::after{
  content:"Sign in";

  display:block!important;

  width:auto!important;
  height:auto!important;

  border:0!important;

  color:#aebac3;

  transform:none!important;

  font-size:11px;
  font-weight:700;

  opacity:1!important;
}


/* =====================================================
   LOGIN DROPDOWN OPEN + CLOSE
   ===================================================== */

#web-login-v1{
  display:flex!important;

  visibility:hidden;
  opacity:0;

  pointer-events:none;

  transition:
    opacity .16s ease,
    visibility 0s linear .16s!important;
}

#web-login-v1.open{
  visibility:visible;
  opacity:1;

  pointer-events:auto;

  transition:
    opacity .18s ease,
    visibility 0s!important;
}

#web-login-v1 .web-login-v1-card{
  top:calc(var(--iwbp-topbar-h,49px) + 7px)!important;

  opacity:0;

  transform:
    translateY(-8px)
    scale(.985);

  transform-origin:top right;

  transition:
    opacity .17s ease,
    transform .17s ease!important;

  animation:none!important;
}

#web-login-v1.open .web-login-v1-card{
  opacity:1;

  transform:
    translateY(0)
    scale(1);
}


/* =====================================================
   MOBILE
   ===================================================== */

@media(max-width:700px){

  .topbar-social-v3{
    display:none;
  }

  .topbar-actions-v2{
    gap:5px!important;
  }

  .topbar-connect-v2{
    min-width:0!important;
    padding:0 10px!important;
  }

  .topbar-actions-v2 #global-auth-entry-v1:not(.account-chip-v4){
    min-width:72px!important;
    padding:0 10px!important;
  }
}
