/* Hazirlikli V3.0.3 — UX / Mobile Shell Hardening
   Uses canonical token variables only; no parallel color system. */

html{scroll-padding-bottom:calc(96px + var(--hz-keyboard-offset,0px))}
body{overscroll-behavior-y:none}

/* Premium problem intake: calm, focused, not spreadsheet-like. */
.hzv3-problem,
.hzv3-create-lead,
.hzv3-input-card{
  position:relative;
  overflow:hidden;
}
.hzv3-problem::before,
.hzv3-create-lead::before,
.hzv3-input-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  border:1px solid transparent;
  border-radius:inherit;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.hzv3-problem:focus-within::before,
.hzv3-create-lead:focus-within::before,
.hzv3-input-card:focus-within::before{
  border-color:var(--accent-border);
  box-shadow:var(--shadow-soft);
}
.hzv3-textarea,
.hzv3-create-lead textarea{
  min-height:112px;
  line-height:1.55;
}
.hzv3-create-lead textarea{
  width:100%;
  margin-top:9px;
  padding:12px 13px;
  resize:none;
  border:1px solid var(--border);
  border-radius:15px;
  background:var(--surface);
  color:var(--text-primary);
  outline:none;
}
.hzv3-create-lead textarea::placeholder{color:var(--text-secondary)}

/* Child pages always expose an escape route. */
.hz-context-back,
.hz-settings-recovery-back{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  color:var(--text-primary);
  font-weight:800;
  text-decoration:none;
}

@media (max-width:767px){
  /* Auth is a viewport-first flow. Primary action is always reachable without hunting. */
  .hz-auth-page{padding-bottom:92px!important}
  .hz-auth-page section.hz-auth-flow{
    min-height:100dvh!important;
    align-items:start!important;
    padding:12px 18px 18px!important;
  }
  .hz-auth-page [data-language-switcher]{margin-bottom:6px!important}
  .hz-auth-page a.lg\:hidden.flex.items-center{margin-bottom:14px!important}
  .hz-auth-page a.lg\:hidden .w-11{width:40px!important;height:40px!important}
  .hz-auth-page h2{font-size:2rem!important;line-height:1.05!important;margin-top:7px!important}
  .hz-auth-page h2 + p{margin-top:8px!important;line-height:1.45!important;font-size:.95rem!important}
  .hz-auth-page form{margin-top:14px!important}
  .hz-auth-page form.space-y-5 > :not([hidden]) ~ :not([hidden]){margin-top:10px!important}
  .hz-auth-page .input{padding:11px 13px!important;min-height:48px!important}
  .hz-auth-page .turnstile-wrap{min-height:0!important}
  .hz-auth-page form p.text-xs{margin-top:5px!important;line-height:1.35!important}
  .hz-auth-page form button[type="submit"]{
    position:fixed!important;
    z-index:120!important;
    left:18px!important;
    right:18px!important;
    bottom:calc(12px + var(--hz-keyboard-offset,0px))!important;
    width:auto!important;
    min-height:54px!important;
    box-shadow:var(--shadow-soft)!important;
  }
  .hz-auth-page form + .h-px,
  .hz-auth-page form + .h-px + p{margin-bottom:4px!important}
  .hz-settings-recovery .hz-public-auth-return{display:none!important}
  .hz-settings-recovery-back{margin:0 0 12px}

  /* Keyboard-safe intake surfaces. */
  .hz-keyboard-open .hzv3-shell,
  .hz-keyboard-open .hz-native-content-root{
    padding-bottom:calc(110px + var(--hz-keyboard-offset,0px))!important;
  }
  .hzv3-textarea:focus,
  .hzv3-create-lead textarea:focus{
    border-color:var(--accent-border)!important;
    box-shadow:var(--shadow-soft)!important;
  }

  /* Child content begins with a visible return affordance. */
  .hz-page-workspace .hz-context-back,
  .hz-page-premium .hz-context-back,
  .hz-page-brand-profiles .hz-context-back{
    margin:12px 16px 4px!important;
  }
}
.hzv3-plan-intro{margin:0 0 12px;color:var(--text-secondary);line-height:1.55}
.hzv3-plan-intro p{margin:0}


/* V3.0.4 TOTAL HARDENED — mobile app hygiene */
@media(max-width:767px){
  .hz-floating-help,.hz-help-float,.help-bubble,[data-hz-help-float],[data-floating-help],[data-chat-widget],[data-support-widget],iframe[title*="chat" i],iframe[title*="support" i]{display:none!important;visibility:hidden!important;pointer-events:none!important}
  body.hz-page-login main,body.hz-page-signup main,body.hz-page-forgot-password main,body.hz-page-reset-password main{padding-top:12px!important;padding-bottom:12px!important}
  body.hz-page-login .card,body.hz-page-signup .card,body.hz-page-forgot-password .card,body.hz-page-reset-password .card{padding-top:16px!important;padding-bottom:16px!important}
  body.hz-page-login input,body.hz-page-signup input,body.hz-page-forgot-password input,body.hz-page-reset-password input{min-height:46px!important}
}


/* ============================================================
   V3.0.5 R3 — AUTH COMPOSITION LOCK
   Primary actions stay in document flow; login/signup/fallback
   links remain visible on normal phone viewports without a
   floating CTA covering the bottom of the screen.
============================================================ */
@media (max-width:767px){
  .hz-auth-page{
    min-height:100dvh!important;
    padding-bottom:max(18px,env(safe-area-inset-bottom,0px))!important;
  }
  .hz-auth-page section.hz-auth-flow{
    min-height:100dvh!important;
    display:block!important;
    padding:12px 18px calc(20px + env(safe-area-inset-bottom,0px))!important;
  }
  .hz-auth-page section.hz-auth-flow > .w-full{
    width:100%!important;
    max-width:620px!important;
    margin:0 auto!important;
  }
  .hz-auth-page [data-language-switcher]{
    margin:0 0 6px!important;
  }
  .hz-auth-page a.lg\:hidden.flex.items-center{
    margin:0 0 20px!important;
  }
  .hz-auth-page h2{
    margin-top:8px!important;
    font-size:2.45rem!important;
    line-height:1.03!important;
  }
  .hz-auth-page h2 + p{
    margin-top:12px!important;
    font-size:1rem!important;
    line-height:1.55!important;
  }
  .hz-auth-page form{
    margin-top:18px!important;
  }
  .hz-auth-page form.space-y-5 > :not([hidden]) ~ :not([hidden]){
    margin-top:14px!important;
  }
  .hz-auth-page .input{
    min-height:54px!important;
    padding:12px 14px!important;
  }
  .hz-auth-page form button[type="submit"]{
    position:static!important;
    inset:auto!important;
    width:100%!important;
    min-height:54px!important;
    margin-top:16px!important;
    box-shadow:var(--shadow-soft)!important;
  }
  .hz-auth-page form + .h-px{
    margin:18px 0!important;
  }
  .hz-auth-page form + .h-px + p{
    margin:0!important;
    padding:0 0 4px!important;
  }

  /* Login: CTA + account creation are a single first-viewport composition. */
  body.hz-page-login a.lg\:hidden.flex.items-center{
    margin-bottom:18px!important;
  }
  body.hz-page-login form{
    margin-top:18px!important;
  }
  body.hz-page-login form.space-y-5 > :not([hidden]) ~ :not([hidden]){
    margin-top:12px!important;
  }

  /* Signup deliberately leaves brand/company collection to onboarding.
     Removing the redundant optional field keeps account creation short. */
  body.hz-page-signup .signup-company-field{
    display:none!important;
  }
  body.hz-page-signup a.lg\:hidden.flex.items-center{
    margin-bottom:15px!important;
  }
  body.hz-page-signup h2{
    font-size:2.2rem!important;
  }
  body.hz-page-signup h2 + p{
    margin-top:8px!important;
    font-size:.92rem!important;
    line-height:1.4!important;
  }
  body.hz-page-signup form{
    margin-top:12px!important;
  }
  body.hz-page-signup form.space-y-5 > :not([hidden]) ~ :not([hidden]){
    margin-top:9px!important;
  }
  body.hz-page-signup label.flex.items-start{
    gap:10px!important;
    font-size:.84rem!important;
    line-height:1.35!important;
  }
  body.hz-page-signup .turnstile-wrap{
    margin-top:7px!important;
  }
  body.hz-page-signup form + .h-px{
    margin:14px 0!important;
  }

  /* Forgot password is the reference zero-scroll composition. */
  body.hz-page-forgot-password form{
    margin-top:18px!important;
  }
}

@media (max-width:767px) and (max-height:760px){
  .hz-auth-page section.hz-auth-flow{
    padding-top:8px!important;
  }
  .hz-auth-page a.lg\:hidden.flex.items-center{
    margin-bottom:12px!important;
  }
  .hz-auth-page h2{
    font-size:2.05rem!important;
  }
  .hz-auth-page h2 + p{
    font-size:.9rem!important;
    line-height:1.4!important;
  }
  .hz-auth-page form{
    margin-top:10px!important;
  }
  .hz-auth-page form.space-y-5 > :not([hidden]) ~ :not([hidden]){
    margin-top:8px!important;
  }
  .hz-auth-page .input{
    min-height:48px!important;
  }
  .hz-auth-page form + .h-px{
    margin:12px 0!important;
  }
}

/* ============================================================
   V3.0.5 R4 — AUTH VIEWPORT CONTRACT
   Center on a normal phone viewport; switch to natural top flow
   when the virtual keyboard reduces the visual viewport.
============================================================ */
@media (max-width:767px){
  .hz-auth-page{
    min-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding-bottom:0!important;
  }
  .hz-auth-page section.hz-auth-flow{
    min-height:100dvh!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    padding:10px 18px max(24px,env(safe-area-inset-bottom,0px))!important;
  }
  .hz-auth-page section.hz-auth-flow > .w-full{
    width:100%!important;
    max-width:620px!important;
    margin:0 auto!important;
    padding-bottom:max(4px,env(safe-area-inset-bottom,0px))!important;
  }
  .hz-auth-page [data-language-switcher]{margin:0 0 4px!important}
  .hz-auth-page a.lg\:hidden.flex.items-center{margin:0 0 12px!important}
  .hz-auth-page a.lg\:hidden .w-11{width:38px!important;height:38px!important}
  .hz-auth-page h2{font-size:2.05rem!important;line-height:1.03!important;margin-top:6px!important}
  .hz-auth-page h2 + p{margin-top:7px!important;font-size:.91rem!important;line-height:1.38!important}
  .hz-auth-page form{margin-top:11px!important}
  .hz-auth-page form.space-y-5 > :not([hidden]) ~ :not([hidden]){margin-top:8px!important}
  .hz-auth-page label{margin-bottom:5px!important}
  .hz-auth-page .input{min-height:49px!important;padding:10px 13px!important}
  .hz-auth-page .turnstile-wrap:empty{display:none!important;min-height:0!important;margin:0!important}
  .hz-auth-page form button[type="submit"]{
    position:static!important;
    inset:auto!important;
    width:100%!important;
    min-height:51px!important;
    margin-top:10px!important;
  }
  .hz-auth-page form + .h-px{margin:11px 0!important}
  .hz-auth-page form + .h-px + p{margin:0!important;padding-bottom:0!important}

  /* Login: account creation belongs to the same first-viewport composition. */
  body.hz-page-login #password + p{display:none!important}
  body.hz-page-login form{margin-top:10px!important}
  body.hz-page-login form.space-y-5 > :not([hidden]) ~ :not([hidden]){margin-top:8px!important}

  /* Signup: collect only account essentials here; brand context follows later. */
  body.hz-page-signup h2{font-size:1.95rem!important}
  body.hz-page-signup h2 + p{font-size:.86rem!important;line-height:1.32!important}
  body.hz-page-signup form{margin-top:9px!important}
  body.hz-page-signup #password + p{display:none!important}
  body.hz-page-signup label.flex.items-start{gap:8px!important;font-size:.78rem!important;line-height:1.28!important}
  body.hz-page-signup label.flex.items-start .block.text-xs{margin-top:3px!important;font-size:.72rem!important}
  body.hz-page-signup form + .h-px{margin:9px 0!important}

  body.hz-page-forgot-password form{margin-top:11px!important}

  /* Keyboard: never vertically center a form inside a shrunken visual viewport. */
  body.hz-keyboard-open.hz-auth-page section.hz-auth-flow{
    min-height:max(100dvh,var(--hz-visual-height,100dvh))!important;
    justify-content:flex-start!important;
    padding-top:8px!important;
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }
  body.hz-keyboard-open.hz-auth-page section.hz-auth-flow > .w-full{
    padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))!important;
  }
}

@media (max-width:767px) and (max-height:700px){
  .hz-auth-page section.hz-auth-flow{
    justify-content:flex-start!important;
    padding-top:6px!important;
    padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))!important;
  }
  .hz-auth-page a.lg\:hidden.flex.items-center{margin-bottom:8px!important}
  .hz-auth-page h2{font-size:1.85rem!important}
  .hz-auth-page h2 + p{font-size:.82rem!important;line-height:1.28!important}
  .hz-auth-page form{margin-top:8px!important}
  .hz-auth-page .input{min-height:46px!important}
}
