/* Scrollable panel content, like new_character */
#edituser-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;   /* Enable vertical scroll */
  max-height: 80vh;   /* Keep within viewport under header */
  padding: 12px;
}

#edituser-form {
  width: 100%;
  max-width: 320px;
}

/* Inputs */
#edituser-form input,
#edituser-form select {
  font-family: Arial, sans-serif;
  font-size: 14px;
  width: 100%;
  max-width: 300px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;

  margin-top: 0;         /* remove default browser gap above input */
  margin-bottom: 12px;   /* space before the next label */
  box-sizing: border-box;
}

#edituser-photo-selector {
  width: 100%;
  max-width: 300px;
  margin: 0 0 12px;
}

.edituser-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 2px 0 12px;
  font-size: 13px;
  color: #333;
}

#edituser-form .edituser-check-row input {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.edituser-setting-card {
  width: 100%;
  max-width: 300px;
  margin: 6px 0 12px;
  padding: 12px;
  border: 1px solid rgba(36, 112, 162, 0.25);
  border-radius: 8px;
  background: rgba(36, 112, 162, 0.08);
  box-sizing: border-box;
}

.edituser-setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edituser-setting-title {
  margin-bottom: 6px;
  color: #1f5d85;
  font-weight: 700;
}

.edituser-setting-copy {
  margin: 0 0 8px;
  color: #344;
  font-size: 13px;
  line-height: 1.35;
}

.edituser-toggle-switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  margin: 0;
}

#edituser-form .edituser-toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
}

.edituser-toggle-track {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #b7bdc7;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: background 160ms ease, opacity 160ms ease;
}

.edituser-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease;
}

#edituser-form .edituser-toggle-switch input:checked + .edituser-toggle-track {
  background: #1f7bc1;
}

#edituser-form .edituser-toggle-switch input:checked + .edituser-toggle-track .edituser-toggle-thumb {
  transform: translateX(22px);
}

#edituser-form .edituser-toggle-switch input:focus-visible + .edituser-toggle-track {
  outline: 2px solid rgba(31, 123, 193, 0.45);
  outline-offset: 3px;
}

#edituser-form .edituser-toggle-switch input:disabled + .edituser-toggle-track {
  cursor: default;
  opacity: 0.55;
}

/* Buttons */
#edituser-form button {
  font-family: Arial, sans-serif;
  font-size: 14px;
  width: 100%;
  max-width: 300px;
  margin-top: 8px;
  padding: 8px;
  cursor: pointer;
  box-sizing: border-box;
}


/* Error text */
#edituser-err {
  color: #d44;
  min-height: 20px;
  font-size: 13px;
  text-align: center;
}


#edituser-changepw-btn {
  margin-top: 20px;   /* space above each button */
}

.edituser-danger-zone {
  width: 100%;
  max-width: 300px;
  margin: 18px 0 8px;
  padding: 12px;
  border: 1px solid rgba(164, 51, 51, 0.35);
  border-radius: 8px;
  background: rgba(164, 51, 51, 0.08);
  box-sizing: border-box;
}

.edituser-danger-zone.hidden {
  display: none;
}

.edituser-danger-title {
  margin-bottom: 6px;
  color: #a43333;
  font-weight: 700;
}

.edituser-danger-copy {
  margin: 0 0 10px;
  color: #513636;
  font-size: 13px;
  line-height: 1.35;
}
