/* Guru Form Validator — checkout personal-information account modes.
 * This stylesheet is loaded in <head> only when the feature is enabled.
 * Its pre-init rules prevent the native optional password from flashing before JS runs.
 */

#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .form-informations,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .field-password-policy,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .js-password-form__input-wrapper,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form [data-ps-ref="password-field"],
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .js-password-form__check,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .js-password-form__check + label,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form label[for="password-form__check"],
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form #password-form__check,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form input[type="password"][name="password"],
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form label[for="field-password"],
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .field-password-policy .form-control-comment,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form .form-group:has(input[type="password"]) .form-control-comment,
#checkout-personal-information-step:not(.guru-fv-personal-ready) #checkout-guest-form p:has(.font-weight-bold):has(.font-italic):has(.text-muted) {
  display: none !important;
}

.guru-fv-personal-password-hidden,
.guru-fv-native-create-account-hidden,
.guru-fv-password-optional-hidden,
.guru-fv-create-account-toggle--hidden {
  display: none !important;
  visibility: hidden !important;
}

.guru-fv-create-account-toggle {
  margin: .75rem 0 1rem;
}

.guru-fv-create-account-toggle__label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 0;
  cursor: pointer;
  line-height: 1.45;
}

.guru-fv-create-account-toggle__input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: .18rem 0 0;
  cursor: pointer;
}

.guru-fv-create-account-toggle__text {
  display: inline;
  color: inherit;
}

.guru-fv-create-account-toggle__text strong {
  font-weight: 700;
}

.guru-fv-password-label-required .guru-fv-required-star,
.guru-fv-required-star {
  display: inline-block;
  margin-left: .2rem;
  color: #dc3545;
  font-weight: 700;
}

/* The custom registration item deliberately reuses the theme's native .nav-link styles. */
.guru-fv-personal-register-item,
.guru-fv-personal-separator-item {
  list-style: none;
}


/* Checkout personal-information tabs: Guest / Register / Sign in.
 * The custom skin is deliberately mobile-only. From 721px upward the theme keeps
 * full control of the native PrestaShop navigation appearance.
 */
@media (max-width: 720px) {
  #checkout-personal-information-step .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  #checkout-personal-information-step .nav > .nav-item {
    width: 100%;
    margin: 0 0 8px !important;
  }

  #checkout-personal-information-step [data-guru-fv-personal-tab] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin: 0 !important;
    padding: 11px 14px !important;
    background: #f7f7f7;
    border: 1px solid #dddddd !important;
    border-radius: 5px;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: normal;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
  }

  #checkout-personal-information-step [data-guru-fv-personal-tab]:hover,
  #checkout-personal-information-step [data-guru-fv-personal-tab]:focus {
    background: #ffffff;
    border-color: #c8c8c8 !important;
    color: inherit;
    text-decoration: none !important;
  }

  #checkout-personal-information-step [data-guru-fv-personal-tab].active,
  #checkout-personal-information-step [data-guru-fv-personal-tab][aria-selected="true"] {
    background: #ffffff;
    border-color: #bcbcbc !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    font-weight: 700;
  }

  #checkout-personal-information-step [data-guru-fv-personal-tab]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  #checkout-personal-information-step .guru-fv-personal-separator-item,
  #checkout-personal-information-step .nav-separator {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .guru-fv-create-account-toggle__label {
    gap: .55rem;
  }
}
