/* Spawn — Premium account settings sheets (each surface has its own personality) */

.spawn-sheet {
  position: relative;
  width: 100%;
  max-width: none;
  will-change: transform;
}

.spawn-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-pill);
  margin: 12px auto 0;
  background: rgba(255, 255, 255, 0.2);
}

.spawn-sheet__hero {
  padding: var(--space-4) var(--space-5) var(--space-3);
}

.spawn-sheet__kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.8;
}

.spawn-sheet__title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.spawn-sheet__desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
}

.spawn-sheet__body {
  padding: 0 var(--space-5) var(--space-4);
}

.spawn-sheet__footer {
  padding: var(--space-3) var(--space-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.spawn-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.spawn-toggle-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.spawn-toggle-row__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
}

.spawn-toggle-row__copy {
  flex: 1;
  min-width: 0;
}

.spawn-toggle-row__copy strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.spawn-toggle-row__copy span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.spawn-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.spawn-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.spawn-switch__track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--duration-normal), box-shadow var(--duration-normal);
  cursor: pointer;
}

.spawn-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.spawn-switch input:checked + .spawn-switch__track {
  background: linear-gradient(135deg, var(--switch-on, var(--accent)), color-mix(in srgb, var(--switch-on, var(--accent)) 70%, #fff));
  box-shadow: 0 0 20px color-mix(in srgb, var(--switch-on, var(--accent)) 45%, transparent);
}

.spawn-switch input:checked + .spawn-switch__track::after {
  transform: translateX(22px);
}

.spawn-scrim--feed .spawn-sheet__hero {
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0, 212, 238, 0.2), transparent);
}

.spawn-feed-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  border-radius: 14px;
  border-left: 3px solid var(--channel-accent, var(--accent));
  background: linear-gradient(90deg, color-mix(in srgb, var(--channel-accent, var(--accent)) 12%, transparent), rgba(255, 255, 255, 0.02));
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.spawn-feed-channel strong { font-size: 14px; display: block; }
.spawn-feed-channel span { font-size: 12px; color: var(--muted); }

.spawn-scrim--notif .spawn-sheet__hero {
  background: radial-gradient(ellipse 70% 50% at 80% 0%, rgba(251, 191, 36, 0.15), transparent);
}

.spawn-scrim--notif .spawn-toggle-row { --switch-on: #fbbf24; }
.spawn-scrim--notif .spawn-toggle-row__icon { background: rgba(251, 191, 36, 0.12); }

.spawn-scrim--username .spawn-sheet__hero {
  background: radial-gradient(ellipse 60% 50% at 20% 0%, rgba(232, 121, 249, 0.18), transparent);
}

.spawn-scrim--username .uname-preview {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(232, 121, 249, 0.08);
  border: 1px dashed rgba(232, 121, 249, 0.3);
  text-align: center;
}

.stack-screen.spawn-stack--privacy {
  background: linear-gradient(180deg, #0a1220 0%, var(--bg-void) 40%);
}

.spawn-privacy-panel {
  padding: var(--space-4);
  max-width: 520px;
  margin: 0 auto;
}

.spawn-privacy-panel__hero { margin-bottom: var(--space-5); }

.spawn-privacy-panel__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e879f9;
  margin-bottom: var(--space-2);
}

.spawn-privacy-panel h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.spawn-privacy-panel__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.privacy-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.privacy-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.privacy-card:hover { background: rgba(255, 255, 255, 0.05); }

.privacy-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.privacy-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(232, 121, 249, 0.1);
  border: 1px solid rgba(232, 121, 249, 0.15);
}

.privacy-card__copy strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.privacy-card__copy span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.privacy-card__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.privacy-card:has(input:checked) {
  border-color: rgba(232, 121, 249, 0.45);
  background: rgba(232, 121, 249, 0.08);
  box-shadow: 0 0 24px rgba(232, 121, 249, 0.08);
}

.privacy-card:has(input:checked) .privacy-card__check {
  border-color: #e879f9;
  background: #e879f9;
  box-shadow: inset 0 0 0 3px #1a0f24;
}

.spawn-scrim--danger .spawn-sheet__hero {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 69, 58, 0.12), transparent);
}

.spawn-danger-box {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 69, 58, 0.25);
  background: rgba(255, 69, 58, 0.06);
  margin-bottom: var(--space-4);
}

.spawn-danger-box p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.spawn-danger-box strong { color: var(--error); }

.account-section--owner .account-section__label { color: #fbbf24; }

.account-section--owner .account-settings-group {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.06), rgba(28, 28, 30, 0.65));
}

.account-owner-server-name {
  margin: -4px 4px var(--space-3);
  font-size: 12px;
  color: #fbbf24;
  letter-spacing: 0.04em;
}

.stack-screen.open.spawn-stack--privacy .spawn-privacy-panel {
  animation: privacyPanelIn 0.45s var(--ease-out-expo) backwards;
}

@keyframes privacyPanelIn {
  from { opacity: 0; transform: translateY(16px); }
}
