/* Account Settings Page */
.account-page {
  min-height: calc(100vh - 90px);
  padding: 2rem 1.5rem 4rem;
  background: var(--app-background);
  color: #f8fafc;
}
.account-container {
  width: min(640px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}
.account-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
}
.account-header p {
  margin: 0;
  color: var(--app-muted);
  font-size: 1.1rem;
}
.account-card {
  padding: 1.75rem;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-large);
  background: var(--app-panel);
}
.account-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.4rem;
}
.account-form {
  display: grid;
  gap: 1.2rem;
}
.account-alert {
  margin-bottom: 1.25rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(255, 116, 116, 0.34);
  border-radius: var(--radius-medium);
  background: rgba(255, 116, 116, 0.1);
  color: #ffb2b2;
  font-size: 0.82rem;
  line-height: 1.5;
}
.account-alert--success {
  border-color: rgba(82, 199, 122, 0.34);
  background: rgba(82, 199, 122, 0.1);
  color: var(--success);
}

.account-card-hint {
  margin: -0.75rem 0 1.25rem;
  color: var(--app-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.account-card-hint code {
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: var(--app-input);
  font-size: 0.85em;
}

.account-form textarea {
  width: 100%;
  min-height: 96px;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(101, 128, 181, 0.45);
  border-radius: var(--radius-medium);
  outline: none;
  background: rgba(7, 14, 27, 0.72);
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.account-form textarea::placeholder {
  color: var(--text-subtle);
}

.account-form textarea:hover {
  border-color: rgba(91, 143, 243, 0.72);
}

.account-form textarea:focus {
  border-color: var(--accent);
  background: rgba(8, 18, 36, 0.95);
  box-shadow: 0 0 0 4px rgba(244, 197, 66, 0.12);
}

.account-form textarea.input-error {
  border-color: var(--danger);
}

.account-form textarea.input-error:focus {
  box-shadow: 0 0 0 4px rgba(255, 116, 116, 0.12);
}

/* Avatar picker */

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  padding: 0.25rem;
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  background: var(--app-input);
  object-fit: contain;
}

.avatar-preview[hidden] {
  display: none;
}

.avatar-picker-controls {
  display: flex;
  flex: 1 1 240px;
  gap: 0.5rem;
}

.avatar-picker .combobox {
  position: relative;
  flex: 1;
}

.avatar-picker .combobox input {
  width: 100%;
}

.avatar-picker .combobox-list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  margin: 0;
  padding: 0.3rem;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: var(--app-header);
  box-shadow: 0 12px 30px rgba(3, 10, 24, 0.45);
}

.avatar-picker .combobox-list[hidden] {
  display: none;
}

.avatar-picker .combobox-option {
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  color: #dce7f6;
  font-size: 0.9rem;
  cursor: pointer;
}

.avatar-picker .combobox-option:hover,
.avatar-picker .combobox-option.is-active {
  background: rgba(20, 132, 245, 0.18);
  color: #f8fafc;
}

.avatar-picker .combobox-empty {
  padding: 0.5rem 0.6rem;
  color: var(--app-muted);
  font-size: 0.88rem;
}

.avatar-remove {
  white-space: nowrap;
}
