/* ZUPIX v176 — compact desktop header actions.
   Keep the full Pro/Favorites labels without the oversized empty action boxes
   introduced in v175. Ordinary actions keep their existing geometry. */
@media (min-width:1081px){
  html body .z18-actions > .z18-pro-action{
    width:64px!important;
    min-width:64px!important;
    max-width:64px!important;
    flex-basis:64px!important;
  }

  html body .z18-actions > .z18-icon-action[href="/favorites"],
  html body .z18-actions > .z18-icon-action[href^="/login?next=%2Ffavorites"]{
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    flex-basis:72px!important;
  }

  html body .z18-actions > .z18-pro-action small,
  html body .z18-actions > .z18-icon-action[href="/favorites"] small,
  html body .z18-actions > .z18-icon-action[href^="/login?next=%2Ffavorites"] small{
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
  }
}


/* ZUPIX v177 — sell first + avatar-only profile trigger. */
html body .z18-actions > .z18-profile-toggle{
  width:56px!important;
  min-width:56px!important;
  max-width:56px!important;
  flex:0 0 56px!important;
  height:66px!important;
  padding:5px!important;
  gap:0!important;
  justify-content:center!important;
  align-items:center!important;
  margin-left:2px!important;
}
html body .z18-actions > .z18-profile-toggle .z18-profile-copy,
html body .z18-actions > .z18-profile-toggle > i{
  display:none!important;
}

@media(max-width:900px){
  html body .z18-actions > .z18-profile-toggle{
    width:56px!important;
    min-width:56px!important;
    max-width:56px!important;
    flex-basis:56px!important;
    margin-left:0!important;
  }
}


/* ZUPIX v178 — equal desktop header action grid + logout row. */
@media (min-width:1081px){
  html body .z18-actions{
    gap:2px!important;
  }

  /* Every visible action uses the same footprint, so icon centers form one
     straight, evenly-spaced row. Labels may render at their natural width. */
  html body .z18-actions > .z18-sell-action,
  html body .z18-actions > .z18-pro-action,
  html body .z18-actions > .z18-icon-action,
  html body .z18-actions > .z18-profile-toggle{
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    flex:0 0 68px!important;
    height:66px!important;
    box-sizing:border-box!important;
  }

  html body .z18-actions > .z18-sell-action,
  html body .z18-actions > .z18-pro-action,
  html body .z18-actions > .z18-icon-action{
    padding:5px 4px!important;
    align-items:center!important;
    justify-content:center!important;
  }

  html body .z18-actions > .z18-sell-action small,
  html body .z18-actions > .z18-pro-action small,
  html body .z18-actions > .z18-icon-action small{
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
    text-align:center!important;
  }

  /* Avatar has no caption, so pin it to the same top line as the 32px action
     icons instead of vertically centering it in the whole 66px cell. */
  html body .z18-actions > .z18-profile-toggle{
    margin-left:0!important;
    padding:8px 4px 5px!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:center!important;
  }
}

html body .z18-profile-menu-logout{
  margin:7px 0 0!important;
  padding:7px 0 0!important;
  border-top:1px solid #edf0f5!important;
}
html body .z18-profile-menu-logout button{
  width:100%!important;
  min-height:52px!important;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  padding:7px 9px!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  color:#d64646!important;
  font:inherit!important;
  text-align:left!important;
  cursor:pointer!important;
  box-sizing:border-box!important;
  transition:background .15s ease,color .15s ease!important;
}
html body .z18-profile-menu-logout button:hover,
html body .z18-profile-menu-logout button:focus-visible{
  background:#fff3f3!important;
  color:#c73535!important;
  outline:0!important;
}
html body .z18-profile-menu-logout-icon{
  width:36px!important;
  height:36px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:10px!important;
  background:#fff1f1!important;
  color:currentColor!important;
}
html body .z18-profile-menu-logout-icon svg{
  width:20px!important;
  height:20px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.75!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
html body .z18-profile-menu-logout button>span:last-child{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
}
html body .z18-profile-menu-logout b{
  font-size:13px!important;
  font-weight:650!important;
  line-height:1.2!important;
}
html body .z18-profile-menu-logout small{
  color:#a66f74!important;
  font-size:10.5px!important;
  font-weight:450!important;
  line-height:1.2!important;
}


/* ZUPIX v179 — guest login action matches the compact right-side menu.
   The old wide profile-style login block is replaced by a normal action cell:
   round Z icon above + \"Войти\" caption below. */
html body .z18-actions > .z18-login-action{
  text-decoration:none!important;
}
html body .z18-actions > .z18-login-action > .z18-login-icon{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  border-radius:50%!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,#5f39d8,#6d3ee9)!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1!important;
  box-shadow:0 6px 14px rgba(91,61,218,.16)!important;
}
html body .z18-actions > .z18-login-action:hover > .z18-login-icon,
html body .z18-actions > .z18-login-action:focus-visible > .z18-login-icon{
  color:#fff!important;
  transform:translateY(-1px)!important;
}
html body .z18-actions > .z18-login-action small{
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  text-align:center!important;
}

@media (min-width:1081px){
  html body .z18-actions > .z18-login-action{
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    flex:0 0 68px!important;
    height:66px!important;
    padding:5px 4px!important;
    box-sizing:border-box!important;
    align-items:center!important;
    justify-content:center!important;
  }
}

/* ZUPIX v180 — exact guest login alignment.
   Use the very same two-row action grid as Sell / Favorites / Chats so the
   icon center and caption baseline are pixel-aligned with their neighbours. */
html body .z18-actions > .z18-login-action{
  display:grid!important;
  grid-template-rows:32px 14px!important;
  align-content:center!important;
  justify-content:stretch!important;
  justify-items:center!important;
  align-items:center!important;
  row-gap:5px!important;
  padding:5px 4px!important;
}
html body .z18-actions > .z18-login-action > .z18-login-icon{
  grid-row:1!important;
  align-self:center!important;
  justify-self:center!important;
  margin:0!important;
}
html body .z18-actions > .z18-login-action > small{
  grid-row:2!important;
  align-self:center!important;
  justify-self:center!important;
  margin:0!important;
  padding:0!important;
  line-height:1.15!important;
}


/* ZUPIX v181 — unified guest header action baseline.
   Keep Sell / Favorites / Chats / Login on the exact same vertical rhythm on
   login and register pages: one icon row, one caption row, same baseline. */
@media (min-width:1081px){
  html body .z18-actions{
    align-items:flex-start!important;
    gap:4px!important;
  }

  html body .z18-actions > .z18-sell-action,
  html body .z18-actions > .z18-icon-action,
  html body .z18-actions > .z18-login-action{
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    flex:0 0 68px!important;
    height:66px!important;
    display:grid!important;
    grid-template-rows:32px 14px!important;
    align-content:center!important;
    justify-items:center!important;
    align-items:center!important;
    row-gap:5px!important;
    padding:5px 4px!important;
    box-sizing:border-box!important;
  }

  html body .z18-actions > .z18-sell-action > .z18-sell-plus,
  html body .z18-actions > .z18-icon-action > span,
  html body .z18-actions > .z18-login-action > .z18-login-icon{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    margin:0!important;
    align-self:center!important;
    justify-self:center!important;
  }

  html body .z18-actions > .z18-sell-action > .z18-sell-plus{
    font-size:22px!important;
    line-height:1!important;
  }

  html body .z18-actions > .z18-icon-action > span svg{
    width:22px!important;
    height:22px!important;
  }

  html body .z18-actions > .z18-sell-action > small,
  html body .z18-actions > .z18-icon-action > small,
  html body .z18-actions > .z18-login-action > small{
    margin:0!important;
    padding:0!important;
    line-height:1.15!important;
    align-self:center!important;
    justify-self:center!important;
    text-align:center!important;
  }
}

/* ZUPIX v184 — final right-side header geometry.
   Every desktop action shares one cell, one icon row and one caption baseline. */
@media (min-width:1081px){
  html body .z18-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:2px!important;
  }
  html body .z18-actions > .z18-sell-action,
  html body .z18-actions > .z18-pro-action,
  html body .z18-actions > .z18-icon-action,
  html body .z18-actions > .z18-login-action,
  html body .z18-actions > .z18-profile-toggle{
    position:relative!important;
    width:68px!important;
    min-width:68px!important;
    max-width:68px!important;
    flex:0 0 68px!important;
    height:66px!important;
    display:grid!important;
    grid-template-rows:36px 14px!important;
    align-content:center!important;
    justify-items:center!important;
    align-items:center!important;
    row-gap:3px!important;
    margin:0!important;
    padding:4px!important;
    box-sizing:border-box!important;
    border-radius:14px!important;
  }
  html body .z18-actions > .z18-sell-action > .z18-sell-plus,
  html body .z18-actions > .z18-pro-action > span,
  html body .z18-actions > .z18-icon-action > span,
  html body .z18-actions > .z18-login-action > .z18-login-icon{
    grid-row:1!important;
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    margin:0!important;
    align-self:center!important;
    justify-self:center!important;
  }
  html body .z18-actions > .z18-profile-toggle > .z18-avatar{
    grid-row:1!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    margin:0!important;
    align-self:center!important;
    justify-self:center!important;
  }
  html body .z18-actions > .z18-sell-action > small,
  html body .z18-actions > .z18-pro-action > small,
  html body .z18-actions > .z18-icon-action > small,
  html body .z18-actions > .z18-login-action > small,
  html body .z18-actions > .z18-profile-toggle > .z18-profile-label{
    grid-row:2!important;
    display:block!important;
    width:auto!important;
    min-width:max-content!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    color:#778398!important;
    font-family:Onest,system-ui,sans-serif!important;
    font-size:11.5px!important;
    font-weight:650!important;
    line-height:14px!important;
    text-align:center!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
    align-self:center!important;
    justify-self:center!important;
  }
  html body .z18-actions > .z18-profile-toggle:hover > .z18-profile-label,
  html body .z18-actions > .z18-profile-toggle:focus-visible > .z18-profile-label,
  html body .z18-actions > .z18-profile-toggle.active > .z18-profile-label{
    color:#6244e9!important;
  }
  html body .z18-actions > .z18-icon-action > em{
    top:1px!important;
    right:4px!important;
  }
}

/* Keep the profile caption readable in the expanded mobile action menu too. */
html body .z18-actions > .z18-profile-toggle > .z18-profile-label{
  color:#778398;font-size:11.5px;font-weight:650;line-height:1.1;
}


/* ZUPIX v185 — lighter right-side action captions.
   Reduce visual weight by roughly 25% while preserving size and geometry. */
html body .z18-actions > .z18-sell-action > small,
html body .z18-actions > .z18-pro-action > small,
html body .z18-actions > .z18-icon-action > small,
html body .z18-actions > .z18-login-action > small,
html body .z18-actions > .z18-profile-toggle > .z18-profile-label{
  font-weight:500!important;
}
