/**
 * Kakooti header account dropdown redesign.
 * Visual-only overrides scoped to logged-out visitors.
 */

body.kk-account-redesign {
  --kk-login-ink: #032a2b;
  --kk-login-primary: #064143;
  --kk-login-primary-deep: #032a2b;
  --kk-login-paper: #fbf9f3;
  --kk-login-soft: #f4efe2;
  --kk-login-gold: #d4af37;
  --kk-login-gold-deep: #96741f;
  --kk-login-gold-light: #f3e2ac;
  --kk-login-line: rgba(3, 42, 43, 0.14);
  --kk-login-muted: #687675;
}

body.kk-account-redesign .wd-dropdown-register {
  width: 390px !important;
  max-width: calc(100vw - 20px) !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.42) !important;
  border-radius: 0 0 20px 20px !important;
  background: var(--kk-login-paper) !important;
  box-shadow: 0 20px 48px rgba(3, 42, 43, 0.2) !important;
}

body.kk-account-redesign .wd-dropdown-register .login-dropdown-inner {
  padding: 18px 20px 20px;
  background:
    radial-gradient(circle at 95% 0%, rgba(212, 175, 55, 0.12), transparent 32%),
    var(--kk-login-paper);
}

body.kk-account-redesign .wd-dropdown-register .wd-heading {
  display: grid !important;
  min-height: 48px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;
  margin: 0 0 12px !important;
  padding: 4px !important;
  border: 1px solid var(--kk-login-line);
  border-radius: 14px;
  background: var(--kk-login-soft);
}

body.kk-account-redesign .wd-dropdown-register .wd-heading::before,
body.kk-account-redesign .wd-dropdown-register .wd-heading::after {
  display: none !important;
}

body.kk-account-redesign .wd-dropdown-register .wd-heading .title,
body.kk-account-redesign .wd-dropdown-register .wd-heading .create-account-link {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
}

body.kk-account-redesign .wd-dropdown-register .wd-heading .title {
  background: linear-gradient(135deg, var(--kk-login-primary), var(--kk-login-primary-deep));
  box-shadow: 0 7px 16px rgba(3, 42, 43, 0.15);
  color: #fff !important;
}

body.kk-account-redesign .wd-dropdown-register .wd-heading .create-account-link {
  background: transparent;
  color: var(--kk-login-gold-deep) !important;
  text-decoration: none !important;
}

body.kk-account-redesign .wd-dropdown-register .wd-heading .create-account-link:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--kk-login-ink) !important;
}

body.kk-account-redesign .wd-dropdown-register .kk-login-subtitle {
  margin: 0 1px 15px;
  color: var(--kk-login-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.85;
  text-align: right;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login {
  margin: 0;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login > p {
  margin: 0 0 13px !important;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 2px 6px;
  color: var(--kk-login-ink) !important;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.7;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login label .required {
  color: #b34545 !important;
  font-size: 13px;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login .input-text {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 1px solid rgba(150, 116, 31, 0.27) !important;
  border-radius: 12px !important;
  outline: 0;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(3, 42, 43, 0.03) inset !important;
  color: var(--kk-login-ink) !important;
  font-size: 13px !important;
  line-height: 1.5;
  direction: rtl;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login .input-text::placeholder {
  color: #9aa5a3;
  opacity: 1;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login .input-text:hover {
  border-color: rgba(150, 116, 31, 0.5) !important;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login .input-text:focus {
  border-color: var(--kk-login-gold) !important;
  background: #fffefb !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16) !important;
}

body.kk-account-redesign .wd-dropdown-register .password-input {
  display: block;
  position: relative;
  width: 100%;
}

body.kk-account-redesign .wd-dropdown-register .password-input .input-text {
  padding-inline-end: 50px !important;
}

body.kk-account-redesign .wd-dropdown-register .show-password-input {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 48px;
  min-width: 48px;
  height: 48px;
  margin: 0 !important;
  border: 0 !important;
  border-inline-start: 1px solid var(--kk-login-line) !important;
  border-radius: 12px 0 0 12px !important;
  background: var(--kk-login-soft) !important;
  color: var(--kk-login-primary) !important;
}

body.kk-account-redesign .wd-dropdown-register .show-password-input:hover {
  background: var(--kk-login-gold-light) !important;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login__submit {
  display: flex !important;
  width: 100% !important;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  margin: 2px 0 0 !important;
  padding: 11px 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--kk-login-gold-light) 0%, var(--kk-login-gold) 48%, var(--kk-login-gold-deep) 100%) !important;
  box-shadow: 0 9px 22px rgba(150, 116, 31, 0.22) !important;
  color: var(--kk-login-ink) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.5;
  text-shadow: none !important;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login__submit:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

body.kk-account-redesign .wd-dropdown-register .login-form-footer {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0 !important;
  padding-top: 13px;
  border-top: 1px solid var(--kk-login-line);
}

body.kk-account-redesign .wd-dropdown-register .login-form-footer .lost_password {
  color: var(--kk-login-gold-deep) !important;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.7;
  text-decoration: none !important;
}

body.kk-account-redesign .wd-dropdown-register .login-form-footer .lost_password:hover {
  color: var(--kk-login-primary) !important;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login__rememberme {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  color: var(--kk-login-muted) !important;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login__rememberme input {
  width: 16px;
  height: 16px;
  margin: 0 !important;
  accent-color: var(--kk-login-gold-deep);
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login input:-webkit-autofill {
  -webkit-text-fill-color: var(--kk-login-ink);
  box-shadow: 0 0 0 1000px #fff inset !important;
}

body.kk-account-redesign .wd-dropdown-register :focus-visible {
  outline: 2px solid var(--kk-login-gold) !important;
  outline-offset: 2px;
}

body.kk-account-redesign .wd-dropdown-register .woocommerce-error,
body.kk-account-redesign .wd-dropdown-register .woocommerce-message {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.8;
}

@media (max-width: 480px) {
  body.kk-account-redesign .wd-dropdown-register {
    width: calc(100vw - 20px) !important;
    border-radius: 0 0 17px 17px !important;
  }

  body.kk-account-redesign .wd-dropdown-register .login-dropdown-inner {
    padding: 14px;
  }

  body.kk-account-redesign .wd-dropdown-register .wd-heading {
    min-height: 45px;
    margin-bottom: 10px !important;
  }

  body.kk-account-redesign .wd-dropdown-register .wd-heading .title,
  body.kk-account-redesign .wd-dropdown-register .wd-heading .create-account-link {
    min-height: 37px;
    padding-inline: 6px !important;
    font-size: 11px;
  }

  body.kk-account-redesign .wd-dropdown-register .kk-login-subtitle {
    margin-bottom: 11px;
    font-size: 10px;
  }

  body.kk-account-redesign .wd-dropdown-register .woocommerce-form-login .input-text,
  body.kk-account-redesign .wd-dropdown-register .show-password-input {
    height: 46px !important;
    min-height: 46px !important;
  }

  body.kk-account-redesign .wd-dropdown-register .login-form-footer {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.kk-account-redesign .wd-dropdown-register * {
    transition: none !important;
  }
}
