/* Security-hardening UI compatibility helpers.
 * Keep this file intentionally small and loaded last so security changes do not
 * regress established header/auth presentation when older CSS bundles are cached.
 */
.preserve-user-lines{white-space:pre-line}

/* Critical header identity: never allow older theme rules to collapse the logo. */
.jolfa-nail-header .jolfa-nail-brand,
.jolfa-nail-header .jolfa-nail-brand .site-brand{min-width:0}
.jolfa-nail-header .jolfa-nail-brand .site-brand>img{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 48px!important;
  width:48px!important;
  height:48px!important;
  max-width:48px!important;
  max-height:48px!important;
  object-fit:contain!important;
  object-position:center!important;
}

/* Header account controls use the same Vazirmatn metrics in every locale. */
.jolfa-nail-header .jolfa-nail-auth,
.jolfa-nail-header .jolfa-nail-auth span,
.jolfa-nail-header .header-cart-button,
.jolfa-nail-header .panel-menu,
.jolfa-nail-header .panel-menu a,
.jolfa-nail-header .panel-menu button{
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif!important;
}
.jolfa-nail-header .jolfa-nail-auth{
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:0!important;
}

/* Logout is a real POST button after CSRF hardening; style the button itself,
 * rather than relying on link-only menu rules. */
.account-logout-form{
  display:block!important;
  width:100%!important;
  margin:8px 0 0!important;
  padding:8px 0 0!important;
  border-top:1px solid color-mix(in srgb,var(--danger) 18%,var(--border))!important;
}
.jolfa-nail-header .panel-menu .account-logout-action[type=submit]{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:100%!important;
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid color-mix(in srgb,var(--danger) 18%,var(--border))!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--danger) 7%,var(--surface))!important;
  color:color-mix(in srgb,var(--danger) 90%,#6b1520)!important;
  box-shadow:none!important;
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1!important;
  text-align:start!important;
  cursor:pointer!important;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease!important;
}
.jolfa-nail-header .panel-menu .account-logout-action[type=submit]::before{display:none!important}
.jolfa-nail-header .panel-menu .account-logout-action[type=submit] i{
  width:20px!important;
  display:grid!important;
  place-items:center!important;
  color:var(--danger)!important;
  transition:color .18s ease,transform .18s ease!important;
}
.jolfa-nail-header .panel-menu .account-logout-action[type=submit]:hover,
.jolfa-nail-header .panel-menu .account-logout-action[type=submit]:focus-visible{
  background:var(--danger)!important;
  border-color:var(--danger)!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}
.jolfa-nail-header .panel-menu .account-logout-action[type=submit]:hover i,
.jolfa-nail-header .panel-menu .account-logout-action[type=submit]:focus-visible i{color:#fff!important;transform:translateX(-1px)}
html[dir="ltr"] .jolfa-nail-header .panel-menu .account-logout-action[type=submit]:hover i,
html[dir="ltr"] .jolfa-nail-header .panel-menu .account-logout-action[type=submit]:focus-visible i{transform:translateX(1px)}

/* Signed-in panel chooser logout button. */
.login-panel-chooser__logout-form{
  display:flex!important;
  justify-content:center!important;
  width:100%!important;
  margin-top:18px!important;
}
.login-panel-chooser__logout[type=submit]{
  appearance:none!important;
  -webkit-appearance:none!important;
  min-height:44px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  margin:0!important;
  padding:0 16px!important;
  border:1px solid color-mix(in srgb,var(--danger) 20%,var(--border))!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--danger) 6%,#fff)!important;
  color:#a52b3e!important;
  box-shadow:0 6px 16px rgba(128,26,48,.06)!important;
  font-family:"Vazirmatn",Tahoma,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1!important;
  cursor:pointer!important;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease!important;
}
.login-panel-chooser__logout[type=submit]:hover,
.login-panel-chooser__logout[type=submit]:focus-visible{
  background:#a52b3e!important;
  border-color:#a52b3e!important;
  color:#fff!important;
  box-shadow:0 9px 20px rgba(128,26,48,.16)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}

@media(max-width:760px){
  .jolfa-nail-header .jolfa-nail-brand .site-brand>img{
    flex-basis:44px!important;
    width:44px!important;
    height:44px!important;
    max-width:44px!important;
    max-height:44px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .jolfa-nail-header .panel-menu .account-logout-action[type=submit],
  .login-panel-chooser__logout[type=submit]{transition:none!important}
}
