/*
 This page has a single column of content, unlike the other .feature sections,
 which pair an image with text. Center that column, and undo the row-reverse
 global.css applies to odd .feature sections, which would otherwise shove our
 lone child against the right edge. The selector needs two classes to outweigh
 .feature:nth-child(odd).
*/
.feature.delete-account {
  flex-direction: row;
  justify-content: center;
  margin-top: 10rem;
  margin-bottom: 11.25rem;
}

.delete-account p {
  width: 618px;
  max-width: 100%;
}

/* FORM (shares the look of the fields on the contact page) */

.form-group {
  margin-bottom: 3rem;
  font-size: 1.25rem;
  font-family: Lato, sans-serif;
}

.form-group label {
  display: block;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-group input {
  font-size: inherit;
  padding: 1rem;
  color: #666;
  line-height: 1.4;
  border-radius: 0.75rem;
  width: 500px;
  max-width: 100%;
  outline: none;
  border: solid 2px #ccc;
  transition: box-shadow 0.1s ease-in-out, border 0.1s ease-in-out;
}

.form-group input:focus {
  border: solid 2px #5cd1ff;
  border-radius: 0.75rem;
  box-shadow: 0 0 4px 2px rgba(92, 209, 255, 0.8);
  transition: box-shadow 0.1s ease-in-out, border 0.1s ease-in-out;
}

.delete-account input:disabled,
.delete-account .btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.delete-account .btn-danger {
  background: #ff5d58;
  border-color: #ff5d58;
}

.delete-account .btn-danger:focus {
  border: solid 2px #ff5d58;
  box-shadow: 0 0 4px 2px rgba(255, 93, 88, 0.5);
}

.delete-account .error-message {
  color: #ff5d58;
  font-weight: bold;
  margin-bottom: 1.875rem;
}

/* PROGRESS INDICATOR */

.delete-account .progress {
  display: flex;
  align-items: center;
  margin-top: 1.875rem;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
}

.delete-account .progress[hidden] {
  display: none;
}

/*
 The spinner animates a transform so browsers can keep it moving on the
 compositor. Stretching the password blocks the main thread for several
 seconds, and a spinner that freezes along with it is worse than none at all.
*/
.delete-account .spinner {
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
  border: 3px solid rgba(92, 209, 255, 0.3);
  border-top-color: #5cd1ff;
  border-radius: 50%;
  animation: delete-account-spin 0.8s linear infinite;
}

@keyframes delete-account-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .delete-account .spinner {
    animation-duration: 2.4s;
  }
}

@media screen and (max-width: 640px) {
  .delete-account {
    margin-top: 5rem;
    padding: 0 2rem;
  }

  .delete-account .btn,
  .form-group input {
    width: 100%;
    display: block;
  }
}
