/**
 * Account edit/cancel pages inside the SM shell.
 */

/* Password strength meter. */
.sm-account-form .password-strength {
  margin-top: var(--sm-space-2);
}
.sm-account-form .password-strength__meter {
  height: 0.4rem;
  overflow: hidden;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-night);
  border: 1px solid var(--sm-line);
}
.sm-account-form .password-strength__indicator {
  height: 100%;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-red);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.sm-account-form .password-strength__indicator.is-fair {
  background: var(--sm-amber);
}
.sm-account-form .password-strength__indicator.is-good {
  background: var(--sm-cyan);
}
.sm-account-form .password-strength__indicator.is-strong {
  background: var(--sm-green);
}
.sm-account-form .password-strength__title,
.sm-account-form .password-confirm-message {
  margin-top: var(--sm-space-1);
  color: var(--sm-mist);
  font-size: var(--sm-text-xs);
}
.sm-account-form .password-strength__text,
.sm-account-form .password-confirm-message span {
  font-weight: 700;
  color: var(--sm-ink);
}
.sm-account-form .password-confirm-message .ok {
  color: var(--sm-green);
}
.sm-account-form .password-confirm-message .error {
  color: var(--sm-red);
}
.sm-account-form .password-suggestions {
  margin: var(--sm-space-3) 0;
  padding: var(--sm-space-3) var(--sm-space-4);
  border-left: 4px solid var(--sm-amber);
  border-radius: var(--sm-radius-chip);
  background: rgba(255, 193, 77, 0.1);
  color: var(--sm-ink);
  font-size: var(--sm-text-sm);
}
.sm-account-form .password-suggestions ul {
  margin: var(--sm-space-1) 0 0;
  padding-left: var(--sm-space-5);
}

/* Picture upload: the file picker as a dark field; Drupal uploads on its
   own once a file is chosen, so its Upload button stays hidden. */
.sm-account-form input[type="file"] {
  max-width: 100%;
  padding: var(--sm-space-2);
  border: 1px dashed var(--sm-line);
  border-radius: var(--sm-radius-field);
  background: var(--sm-navy);
  color: var(--sm-mist);
  font: inherit;
  font-size: var(--sm-text-sm);
}
.sm-account-form input[type="file"]::file-selector-button {
  margin-right: var(--sm-space-3);
  padding: 0.45rem 1rem;
  border: 1px solid var(--sm-line);
  border-radius: var(--sm-radius-pill);
  background: var(--sm-navy-3);
  color: var(--sm-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.sm-account-form input[type="file"]::file-selector-button:hover {
  border-color: var(--sm-amber);
}
.js .sm-account-form .js-hide {
  display: none;
}
.sm-account-form .image-widget img {
  border-radius: var(--sm-radius-field);
}

/* Status and roles (admins only): checkboxes in a tidy grid. */
.sm-account-form #edit-roles,
.sm-account-form .form-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: var(--sm-space-2) var(--sm-space-4);
}
.sm-account-form .form-checkboxes .form-item,
.sm-account-form .form-radios .form-item {
  margin: 0;
}
