/* Shared: reset password modal (dashboard + pre-auth routes).
 * Load with fusionauth-portal.css (or equivalent) for --evs-font / --evs-base-brand-red. */

.snout-and-whiskers {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.snout-and-whiskers-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ─── Reset Password modal (Figma Forgot Password / 998:9605) ─── */
.evs-reset-password-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Pre-auth: no dimmer; purple authorize background stays visible (card hidden separately). */
.evs-reset-password-overlay--auth-bg {
  background: transparent;
  pointer-events: none;
}

.evs-reset-password-overlay--auth-bg .evs-reset-password-modal {
  pointer-events: auto;
}

.evs-reset-password-modal {
  /* Figma Color:-Alert-Red for this flow (distinct from brand coral buttons) */
  --evs-reset-password-alert-red: #c81010;
  /* Figma Base Brand Red — Send Again / Return to portal (node 1002:1168) */
  --evs-reset-password-brand-red: var(--evs-base-brand-red, #fc595b);
  --overlay-black-40-black: rgba(0, 0, 0, 0.4);
  --color-alert-green: #1fbc4b;
  position: relative;
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 40px;
  box-shadow: 0 0 4px 4px rgba(161, 135, 196, 0.12);
  padding: 36px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  font-family: var(--evs-font);
  color: #333333;
  box-sizing: border-box;
}

/* Figma success step — wider panel, generous padding */
.evs-reset-password-modal--success-step {
  max-width: 900px;
  padding: 64px 80px;
}

.evs-reset-password-modal--success-step .evs-reset-password-modal__subtitle {
  max-width: none;
  align-self: stretch;
}

/* My Account tab: no snout row — nudge header below the close control. */
.evs-reset-password-modal--account-tab .evs-reset-password-modal__header {
  padding-top: 12px;
}

.evs-reset-password-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  line-height: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.evs-reset-password-modal__close:hover {
  opacity: 0.75;
}

.evs-reset-password-modal__close img {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.evs-reset-password-modal__deco {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.evs-reset-password-modal__header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.evs-reset-password-modal__title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 36px;
  color: #333333;
}

.evs-reset-password-modal__subtitle {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 26px;
  color: #666666;
  max-width: 420px;
}

.evs-reset-password-modal__success-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 16px;
  width: 100%;
}

/* Button group — Figma: centered row, 10px gap (not space-between) */
.evs-reset-password-modal__success-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  width: 100%;
  margin: 0 auto;
}

.evs-reset-password-modal__email-sent {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 360px;
  min-height: 48px;
  max-height: 48px;
  padding: 13px 28px;
  box-sizing: border-box;
  border-radius: 100px;
  background: linear-gradient(
      0deg,
      var(--overlay-black-40-black, rgba(0, 0, 0, 0.4)) 0%,
      var(--overlay-black-40-black, rgba(0, 0, 0, 0.4)) 100%
    ),
    var(--color-alert-green, #1fbc4b);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--Spacers-4, 4px);
}

.evs-reset-password-modal__email-sent-label {
  font-family: var(--evs-font);
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.54px;
  color: #ffffff;
}

.evs-reset-password-modal__email-sent-check {
  flex-shrink: 0;
  display: block;
}

/* Send Again — smaller secondary pill */
.evs-reset-password-modal__send-again {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: auto;
  max-width: 200px;
  min-height: 48px;
  max-height: 48px;
  padding: 11px 18px;
  box-sizing: border-box;
  border-radius: 100px;
  border: 2px solid var(--evs-base-brand-red, #fc595b);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--Spacers-4, 4px);
  font-family: var(--evs-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.48px;
  color: var(--evs-reset-password-brand-red);
  word-wrap: break-word;
  overflow-wrap: break-word;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.evs-reset-password-modal__send-again:hover:not(:disabled) {
  background: rgba(252, 89, 91, 0.06);
}

.evs-reset-password-modal__send-again:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.evs-reset-password-modal__send-again:focus {
  outline: none;
}

.evs-reset-password-modal__send-again:focus-visible {
  outline: 2px solid #4b1e4c;
  outline-offset: 2px;
}

.evs-reset-password-modal__send-again-error {
  margin: 0;
  padding: 0 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--evs-reset-password-alert-red, #c81010);
  text-align: center;
  max-width: 360px;
}

/* Figma Text / Primary — Return to portal (text link + icon, no pill) */
.evs-reset-password-modal__return-portal {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  max-width: none;
  margin: 0 auto;
  min-height: 0;
  padding: 8px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--evs-reset-password-brand-red);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.evs-reset-password-modal__return-portal:hover {
  opacity: 0.88;
}

.evs-reset-password-modal__return-portal:focus {
  outline: none;
}

.evs-reset-password-modal__return-portal:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.evs-reset-password-modal__return-portal-icon-wrap {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.evs-reset-password-modal__return-portal-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.evs-reset-password-modal__return-portal-text {
  font-family: var(--evs-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.48px;
  color: var(--evs-reset-password-brand-red);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.evs-reset-password-modal__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

.evs-reset-password-field-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

.evs-reset-password-field-group__label {
  margin: 0;
  align-self: flex-start;
  font-family: var(--evs-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #666666;
}

.evs-reset-password-field-group__label--error {
  color: var(--evs-reset-password-alert-red, #c81010);
}

.evs-reset-password-field-group__hint {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  color: #666666;
}

.evs-reset-password-field-group__hint--error {
  color: var(--evs-reset-password-alert-red, #c81010);
}

.evs-reset-password-field {
  width: 100%;
  height: 44px;
  border: 1px solid #b2b2b2;
  border-radius: 4px;
  padding: 0 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: #ffffff;
}

.evs-reset-password-field--filled:not(.evs-reset-password-field--error),
.evs-reset-password-field:focus-within:not(.evs-reset-password-field--error) {
  border-color: #666666;
}

.evs-reset-password-field--error {
  border: 2px solid var(--evs-reset-password-alert-red, #c81010);
  padding: 0 14px;
}

.evs-reset-password-field__error-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.evs-reset-password-field__input {
  border: none;
  padding: 0;
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  font-family: var(--evs-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #000000;
  background: transparent;
}

.evs-reset-password-field__input:focus {
  outline: none;
}

.evs-reset-password-field__input::placeholder {
  color: #999999;
}

.evs-reset-password-modal__error {
  margin: 0;
  padding: 0 8px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  color: var(--evs-reset-password-alert-red, #c81010);
  text-align: center;
}

.evs-reset-password-modal__actions {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  align-self: center;
  padding-top: 0;
}

.evs-reset-password-modal__btn {
  box-sizing: border-box;
  width: 100%;
  min-height: 58px;
  padding: 18px 28px;
  border-radius: 100px;
  border: none;
  font-family: var(--evs-font);
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.54px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.evs-reset-password-modal__btn--disabled {
  background: #e5e5e5;
  color: #808080;
  cursor: not-allowed;
}

.evs-reset-password-modal__btn--primary {
  background: var(--evs-base-brand-red, #fc595b);
  color: #000000;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.evs-reset-password-modal__btn--primary:hover:not(:disabled) {
  background:
    linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.2) 100%
    ),
    var(--evs-base-brand-red, #fc595b);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 640px) {
  .evs-reset-password-modal--success-step {
    padding: 40px 24px;
  }

  .evs-reset-password-modal__success-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }

  .evs-reset-password-modal__email-sent {
    max-width: none;
  }

  .evs-reset-password-modal__send-again {
    max-width: none;
    width: 100%;
  }
}
