.validate-page {
  position: relative;
  justify-items: center;
}

@media (width >= 460px) {
  .validate-page {
    background-image: url('/assets/images/access_bg.png');
    background-position: 50% 0;
    background-repeat: no-repeat;
    background-size: auto 100%;
  }
}


.validate-form {
  place-self: center;
  display: grid;
  row-gap: var(--spacing-4);
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--size-33), var(--size-36))
  );
}

.validate-form__title {
  text-align: center;
  margin-bottom: var(--spacing-3);

  font-family: var(--heading-font);
  font-size: var(--heading-sm-size);
  line-height: var(--heading-sm-leading-loose);
  font-weight: var(--heading-sm-weight);
  color: var(--clr-onSurface-brand);
  text-transform: uppercase;
  letter-spacing: .05em;
}

@media (width >= 60rem) {

  .validate-form {
    row-gap: var(--spacing-6);

  }

  .validate-form__title {
    font-size: var(--heading-md-size);
    line-height: var(--heading-md-leading-loose);
    font-weight: var(--heading-md-weight);
  }
}

/* Field Help */

.field-help {
  --_z-index: 10;
  z-index: var(--_z-index);

  position: absolute;
  right: 0;
  bottom: 100%;
  transform: translate(4px, 32px);

  height: 48px;
  width: 48px;

  -webkit-tap-highlight-color: transparent;
}


.field-help__button {
  position: relative;
  display: grid;
  place-items: center;

  height: 48px;
  width: 48px;

  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;

}

.field-help__button span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--clr-surface-04);
  color: var(--clr-onSurface-04);
  border: 1px solid var(--clr-forSurface-04);
  transition: background 300ms ease-out, color 300ms ease-out, border 300ms ease-out;
  line-height: 24px;
}

.field-help__button:hover span {
  background: var(--clr-surface-05);
  border: 1px solid var(--clr-forSurface-05);
  color: var(--clr-brand-300);
}

.field-help__button:focus-visible span {
  outline: 2px solid var(--clr-brand-500);
  outline-offset: 2px;
}

.field-help__message {
  position: absolute;
  width: clamp(var(--size-33), 28ch, 100%);
  right: 0;
  padding: var(--spacing-2) var(--spacing-3);
  transform: translateX(-8px) scale(0);
  transform-origin: top right;
  border-radius: var(--radius-2);

  background: var(--clr-surface-04);
  border: 1px solid var(--clr-forSurface-04);
  box-shadow: -6px 6px 20px var(--clr-black--50);

  color: var(--clr-onSurface-04);
  font-size: 0.875rem;

  transition: transform 300ms ease-out;
}

.field-help.active {
  z-index: calc(var(--_z-index) + 1);
}

.field-help.active .field-help__message {
  transform: translateX(-8px) scale(1);
}

/* Error Message */

.error-message {
  padding: var(--spacing-3) var(--spacing-4);
  background: #621515;
  border-radius: var(--radius-2);
  border: 1px solid #732424;
  color: #D0B9B8;

  font-size: 0.825rem;
  font-weight: 500;
  text-align: center;

  span {
    font-size: 1rem;
    font-weight: 600;
    color: #FDF6F6;
    display: block;
    margin-bottom: var(--spacing-1);
  }
}

/* Complete Message */


.success {
  place-self: center;
  display: grid;
  grid-template-columns: minmax(var(--size-33), var(--size-35));
  justify-items: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  gap: var(--spacing-8);
}

.success-header {
  display: grid;
  justify-items: center;
  gap: var(--spacing-2);
}

.success-header__title {
  color: #A2E198;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1em;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.success-header__icon {
  width: 48px;
  height: 48px;
}

.success-header__icon path {
  fill: #58914D;
}

.success-header__description {
  color: var(--clr-white--80);
  text-align: center;
  font-family: Work Sans;
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.5em;
}

.success-warning {
  display: grid;
  gap: var(--spacing-1);
  padding-inline: var(--spacing-6);
  padding-block: var(--spacing-4);
  border-radius: var(--radius-3);
  background: rgb(51, 39, 65);
  border: 1px solid var(--clr-white--10);
  text-wrap: balance;

}

.success-warning h3 {
  color: rgb(171, 165, 255);
  text-align: center;
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.25em;
  text-transform: uppercase;
}

.success-warning p {
  color: rgb(175, 159, 189);
  text-align: center;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.25em;
}

.loading-icon {
  display: inline-block;
  animation: spin 600ms linear infinite;

  path {
    fill: black;
  }
}

/* Keyframes for spinning */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dialog {
  max-width: 400px;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  overflow: hidden;
  position: fixed; /* Fixa o modal na tela */
  top: 50%; /* Centraliza verticalmente */
  left: 50%; /* Centraliza horizontalmente */
  transform: translate(-50%, -50%); /* Centraliza o modal */
  margin: 0; /* Remove margens automáticas */
}

.dialog__footer {
  display: flex;
  justify-content: center; /* Centraliza os botões horizontalmente */
  gap: 10px; /* Espaço entre os botões */
  margin-top: 20px; /* Espaçamento superior para separar os botões do conteúdo */
}