/* =========================================================
   CodifyKit WooCommerce Account Authentication
   Scoped to .ckauth-shell only.
========================================================= */

.ckauth-shell,
.ckauth-shell *,
.ckauth-shell *::before,
.ckauth-shell *::after{
  box-sizing:border-box;
}

.ckauth-shell{
  --cka-text:#24292f;
  --cka-muted:#7b828a;
  --cka-line:#e5e8ec;
  --cka-soft:#f6f7f9;
  --cka-black:#0f1113;
  --cka-radius:16px;

  position:relative;
  isolation:isolate;
  width:100vw;
  max-width:100vw;
  min-height:calc(100svh - 100px);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding:64px 24px 84px;
  background:
    radial-gradient(680px 390px at 9% 16%,rgba(31,38,46,.075),transparent 70%),
    radial-gradient(620px 380px at 92% 82%,rgba(83,91,100,.075),transparent 72%),
    linear-gradient(135deg,#f2f4f6 0%,#fbfcfd 46%,#eef1f4 100%);
  color:var(--cka-text);
  font-family:"Inter",sans-serif;
}

.ckauth-decoration{
  position:absolute;
  z-index:0;
  pointer-events:none;
}

.ckauth-decoration--left{
  left:max(4vw,24px);
  top:170px;
  width:150px;
  height:150px;
  border-radius:50%;
  border:1px solid rgba(80,89,99,.08);
  background:rgba(255,255,255,.4);
}

.ckauth-decoration--left::before,
.ckauth-decoration--right::before{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#d9dde2;
  box-shadow:
    22px 0 #e2e5e9,
    44px 0 #d9dde2,
    0 22px #e2e5e9,
    22px 22px #d9dde2,
    44px 22px #e2e5e9,
    0 44px #d9dde2,
    22px 44px #e2e5e9,
    44px 44px #d9dde2;
  opacity:.5;
}

.ckauth-decoration--left::before{
  left:-10px;
  top:104px;
}

.ckauth-decoration--right{
  right:max(5vw,28px);
  bottom:90px;
  width:180px;
  height:180px;
  border-radius:50%;
  background:rgba(230,233,237,.7);
}

.ckauth-decoration--right::before{
  right:28px;
  bottom:-12px;
}

.ckauth-card{
  position:relative;
  z-index:2;
  width:min(100%,540px);
  padding:40px 44px 32px;
  border:1px solid #dde2e7;
  border-radius:20px;
  background:rgba(255,255,255,.96);
  box-shadow:0 28px 80px rgba(22,29,37,.11);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.ckauth-card--reset{
  width:min(100%,560px);
}

.ckauth-view[hidden]{
  display:none!important;
}

.ckauth-view.is-active{
  display:block;
}

.ckauth-card__header{
  margin-bottom:30px;
  text-align:center;
}

.ckauth-kicker{
  display:inline-block;
  margin-bottom:10px;
  color:#9298a0;
  font-size:9px;
  line-height:1;
  font-weight:750;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.ckauth-card__header h1{
  margin:0!important;
  color:#20252b!important;
  font-size:31px!important;
  line-height:1.15!important;
  font-weight:730!important;
  letter-spacing:-.035em!important;
}

.ckauth-card__header p{
  max-width:430px;
  margin:10px auto 0!important;
  color:#7a8189!important;
  font-size:12.5px!important;
  line-height:1.65!important;
}

/* ---------- Social login ---------- */

.ckauth-social{
  width:100%;
  margin:0 0 20px;
}

.ckauth-social .nsl-container,
.ckauth-social .nsl-container-buttons,
.ckauth-social .nsl-container-block,
.ckauth-social .nsl-container-inline{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}

.ckauth-social .nsl-button,
.ckauth-social a[data-plugin="nsl"],
.ckauth-social [data-provider="google"]{
  width:100%!important;
  max-width:none!important;
  min-height:52px!important;
  justify-content:center!important;
  border-radius:11px!important;
  box-shadow:none!important;
}

.ckauth-divider{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
  margin:0 0 20px;
  color:#999fa6;
  font-size:10px;
}

.ckauth-divider::before,
.ckauth-divider::after{
  content:"";
  height:1px;
  background:#e6e9ed;
}

/* ---------- Woo forms ---------- */

.ckauth-shell .ckauth-form,
.ckauth-shell form.login,
.ckauth-shell form.register,
.ckauth-shell form.lost_reset_password{
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

.ckauth-shell .form-row,
.ckauth-shell .woocommerce-form-row{
  width:100%!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
}

.ckauth-field{
  margin-bottom:15px!important;
}

.ckauth-field label{
  display:block!important;
  margin:0 0 7px!important;
  color:#444b52!important;
  font-size:11px!important;
  line-height:1.3!important;
  font-weight:650!important;
}

.ckauth-field .required{
  color:#111315!important;
}

.ckauth-shell input[type="text"],
.ckauth-shell input[type="email"],
.ckauth-shell input[type="password"]{
  width:100%!important;
  height:46px!important;
  min-height:46px!important;
  margin:0!important;
  padding:0 13px!important;
  border:1px solid #d8dde2!important;
  border-radius:10px!important;
  outline:0!important;
  background:#fff!important;
  color:#242a30!important;
  font-family:"Inter",sans-serif!important;
  font-size:13px!important;
  line-height:1!important;
  box-shadow:none!important;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease!important;
}

.ckauth-shell input[type="text"]:focus,
.ckauth-shell input[type="email"]:focus,
.ckauth-shell input[type="password"]:focus{
  border-color:#989fa7!important;
  box-shadow:0 0 0 3px rgba(35,41,47,.06)!important;
}

.ckauth-password-wrap{
  position:relative;
  display:block;
}

.ckauth-password-wrap input{
  padding-right:48px!important;
}

.ckauth-password-toggle{
  position:absolute!important;
  top:50%!important;
  right:7px!important;
  width:34px!important;
  height:34px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#81878e!important;
  cursor:pointer!important;
  transform:translateY(-50%)!important;
  box-shadow:none!important;
}

.ckauth-password-toggle:hover{
  background:#f4f5f7!important;
  color:#32383e!important;
}

.ckauth-password-toggle svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.ckauth-password-toggle.is-visible svg{
  opacity:.65;
}

.ckauth-generated-password-note{
  margin:0 0 16px!important;
  padding:11px 12px!important;
  border:1px solid #e5e8eb;
  border-radius:9px;
  background:#f7f8fa;
  color:#737a82;
  font-size:10.5px;
  line-height:1.55;
}

/* ---------- Options ---------- */

.ckauth-login-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:2px 0 16px;
}

.ckauth-check{
  display:inline-flex!important;
  align-items:center;
  gap:7px;
  margin:0!important;
  color:#747b83!important;
  font-size:10.5px!important;
  font-weight:500!important;
  cursor:pointer;
}

.ckauth-check input[type="checkbox"]{
  width:15px!important;
  height:15px!important;
  min-width:15px!important;
  margin:0!important;
  accent-color:#111315;
}

.ckauth-forgot-link{
  color:#626a72!important;
  font-size:10.5px!important;
  font-weight:600!important;
  text-decoration:none!important;
}

.ckauth-forgot-link:hover{
  color:#111315!important;
}

/* ---------- Existing hook integrations: captcha/privacy ---------- */

.ckauth-hook-area{
  width:100%;
  margin:0 0 16px;
  color:#777e86;
  font-size:10.5px;
  line-height:1.55;
}

.ckauth-hook-area:empty{
  display:none;
}

.ckauth-hook-area p{
  margin:0 0 10px!important;
  color:#777e86!important;
  font-size:10.5px!important;
  line-height:1.55!important;
}

.ckauth-hook-area a{
  color:#343b42!important;
  text-decoration:underline!important;
  text-underline-offset:2px;
}

.ckauth-hook-area .g-recaptcha,
.ckauth-hook-area .cf-turnstile,
.ckauth-hook-area [class*="captcha"],
.ckauth-hook-area [class*="recaptcha"]{
  max-width:100%;
  margin:10px 0 4px!important;
}

/* ---------- Buttons ---------- */

.ckauth-submit-row{
  margin-top:4px!important;
}

.ckauth-primary-button,
.ckauth-shell button.ckauth-primary-button,
.ckauth-shell .woocommerce-button.ckauth-primary-button{
  width:100%!important;
  min-width:0!important;
  height:48px!important;
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0 18px!important;
  border:1px solid #0f1113!important;
  border-radius:11px!important;
  background:#0f1113!important;
  color:#fff!important;
  font-family:"Inter",sans-serif!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:650!important;
  text-shadow:none!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:background-color .18s ease,transform .18s ease!important;
}

.ckauth-primary-button:hover{
  background:#292d31!important;
  border-color:#292d31!important;
  color:#fff!important;
  transform:translateY(-1px);
}

/* ---------- Footer switch ---------- */

.ckauth-card__footer{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  margin-top:22px;
  padding-top:21px;
  border-top:1px solid #e8ebee;
  color:#8b9198;
  font-size:10.5px;
}

.ckauth-card__footer button{
  all:unset!important;
  color:#30363c!important;
  font-size:10.5px!important;
  font-weight:700!important;
  cursor:pointer!important;
}

.ckauth-card__footer button:hover{
  text-decoration:underline!important;
  text-underline-offset:3px;
}

.ckauth-card__footer--single a{
  color:#454c54!important;
  font-size:10.5px!important;
  font-weight:650!important;
  text-decoration:none!important;
}

.ckauth-card__footer--single a:hover{
  color:#111315!important;
}

/* ---------- Woo notices on logged-out account flows ---------- */

.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper{
  width:min(calc(100% - 40px),520px);
  margin:22px auto 0;
}

.woocommerce-account:not(.logged-in) .woocommerce-error,
.woocommerce-account:not(.logged-in) .woocommerce-message,
.woocommerce-account:not(.logged-in) .woocommerce-info{
  margin:0 0 12px!important;
  padding:12px 14px!important;
  border:1px solid #e1e5e9!important;
  border-top:1px solid #e1e5e9!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#50575f!important;
  font-size:10.5px!important;
  line-height:1.55!important;
  box-shadow:none!important;
}

.woocommerce-account:not(.logged-in) .woocommerce-error::before,
.woocommerce-account:not(.logged-in) .woocommerce-message::before,
.woocommerce-account:not(.logged-in) .woocommerce-info::before{
  display:none!important;
}

/* Woo password-strength meter */
.ckauth-shell .woocommerce-password-strength{
  margin:7px 0 0!important;
  padding:7px 9px!important;
  border-radius:8px!important;
  background:#f1f3f5!important;
  color:#666e76!important;
  font-size:9.5px!important;
  font-weight:600!important;
}

.ckauth-shell .woocommerce-password-hint{
  display:block;
  margin-top:7px;
  color:#92989f;
  font-size:9px;
  line-height:1.45;
}

/* Remove theme styles that can force black Woo forms. */
.ckauth-shell .woocommerce-form,
.ckauth-shell .woocommerce-ResetPassword{
  color:var(--cka-text)!important;
}

/* =========================================================
   Tablet / Mobile
========================================================= */

@media(max-width:800px){
  .ckauth-shell{
    min-height:calc(100svh - 76px);
    padding:46px 18px 72px;
  }

  .ckauth-decoration--left,
  .ckauth-decoration--right{
    opacity:.6;
  }

  .ckauth-card{
    padding:31px 28px 26px;
  }
}

@media(max-width:520px){
  .ckauth-shell{
    min-height:calc(100svh - 70px);
    padding:30px 14px 54px;
    background:linear-gradient(145deg,#f2f4f6 0%,#fafbfc 55%,#edf0f3 100%);
  }

  .ckauth-card{
    padding:26px 20px 23px;
    border-radius:16px;
  }

  .ckauth-card__header{
    margin-bottom:22px;
  }

  .ckauth-card__header h1{
    font-size:26px!important;
  }

  .ckauth-card__header p{
    font-size:12px!important;
  }

  .ckauth-login-options{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .ckauth-decoration{
    display:none;
  }

  .ckauth-hook-area .g-recaptcha{
    transform-origin:left top;
  }
}


/* V2 refinements */
.ckauth-view--register .ckauth-card__header,
.ckauth-view--login .ckauth-card__header{
  margin-bottom:28px;
}

.ckauth-view--register .ckauth-card__header p,
.ckauth-view--login .ckauth-card__header p{
  display:none!important;
}

/* Make Nextend Google action look like a clear primary authentication option. */
.ckauth-social .nsl-container a[data-provider="google"]{
  display:block!important;
  width:100%!important;
  color:#171b20!important;
  text-decoration:none!important;
}

.ckauth-social .nsl-container a[data-provider="google"] .nsl-button,
.ckauth-social .nsl-button-google{
  min-height:52px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #cfd5db!important;
  border-radius:11px!important;
  background:#ffffff!important;
  color:#171b20!important;
  box-shadow:0 5px 16px rgba(22,29,37,.055)!important;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}

.ckauth-social .nsl-container a[data-provider="google"]:hover .nsl-button,
.ckauth-social .nsl-button-google:hover{
  border-color:#aeb6bf!important;
  background:#f7f8f9!important;
  box-shadow:0 8px 22px rgba(22,29,37,.075)!important;
  transform:translateY(-1px);
}

.ckauth-social .nsl-button-google .nsl-button-svg-container{
  flex:0 0 auto!important;
  margin:0!important;
  padding:0 12px!important;
  background:transparent!important;
}

.ckauth-social .nsl-button-google svg{
  width:20px!important;
  height:20px!important;
}

.ckauth-social .nsl-button-google .nsl-button-label-container,
.ckauth-social .nsl-button-google>span:last-child{
  flex:1 1 auto!important;
  margin:0!important;
  padding:0 42px 0 8px!important;
  color:#171b20!important;
  font-family:"Inter",sans-serif!important;
  font-size:13px!important;
  line-height:52px!important;
  font-weight:620!important;
  text-align:center!important;
}

.ckauth-social .nsl-button-google b{
  font-weight:760!important;
}

/* The generic form-row rule intentionally resets WooCommerce floats.
   Re-apply real vertical spacing with higher specificity. */
.ckauth-shell .ckauth-form .ckauth-field{
  margin:0 0 19px!important;
}

.ckauth-shell .ckauth-form .ckauth-field + .ckauth-field{
  margin-top:3px!important;
}

.ckauth-shell .ckauth-login-options{
  margin:7px 0 20px!important;
}

.ckauth-shell .ckauth-submit-row{
  margin:8px 0 0!important;
}

/* Password reset confirmation */
.ckauth-confirmation-card{
  text-align:center;
}

.ckauth-success-icon{
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 18px;
  border-radius:50%;
  background:#111315;
  color:#fff;
  box-shadow:0 10px 24px rgba(17,19,21,.15);
}

.ckauth-success-icon svg{
  width:25px;
  height:25px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.ckauth-card__header--confirmation{
  margin-bottom:18px;
}

.ckauth-confirmation-note{
  padding:13px 14px;
  border:1px solid #e2e6ea;
  border-radius:10px;
  background:#f7f8f9;
  color:#70777f;
  font-size:10.5px;
  line-height:1.6;
  text-align:left;
}

/* Full-width breakout also needs to win against theme/container limits. */
.woocommerce-account:not(.logged-in) .ckauth-shell{
  max-width:100vw!important;
}

@media(max-width:1100px){
  .ckauth-shell{
    min-height:calc(100svh - 76px);
  }
}

@media(max-width:600px){
  .ckauth-shell{
    min-height:calc(100svh - 70px);
  }
}
