/* ==========================================================================
   Settings + Profile — appearance, theme cards, toggles, and profile controls
   ========================================================================== */

/* --- Sections --- */
.set-section { margin-top: var(--sp-6); }
.set-section:first-of-type { margin-top: var(--sp-5); }
.set-section__head {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3); color: var(--text);
}
.set-section__head .msym { color: var(--primary-hover); }
.set-section__head h2, .set-section__head h3 { font-size: var(--fs-md); }

/* --- Cards --- */
.set-card { padding: var(--sp-5); }
.set-card__hint { color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.set-divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; }

/* --- A label/desc + control row --- */
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
.set-row__text { min-width: 0; }
.set-row__text strong { display: block; color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.set-row__text small { display: block; color: var(--text-muted); font-size: var(--fs-xs); margin-top: 3px; line-height: 1.5; }
.set-row__control { flex-shrink: 0; }

/* --- Theme cards --- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.theme-card {
  display: flex; flex-direction: column;
  text-align: left;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.theme-card:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.theme-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.theme-card__preview { padding: var(--sp-3); background: var(--bg-alt); }
.theme-card__meta {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
}
.theme-card__meta strong { display: block; color: var(--text); font-size: var(--fs-sm); }
.theme-card__meta small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.theme-card__radio {
  width: 22px; height: 22px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  color: transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.theme-card.is-selected .theme-card__radio { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --- Mini theme mockups --- */
.tp {
  display: flex; gap: 0;
  height: 96px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.25);
}
.tp__side {
  width: 26px; flex-shrink: 0;
  border-right: 1px solid;
  padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tp__dot { width: 10px; height: 10px; border-radius: 3px; opacity: 0.9; }
.tp__main { flex: 1; padding: 9px; display: flex; flex-direction: column; gap: 7px; }
.tp__title { height: 8px; width: 55%; border-radius: 3px; opacity: 0.92; }
.tp__card {
  border: 1px solid; border-radius: 5px; padding: 7px;
  display: flex; flex-direction: column; gap: 5px; flex: 1;
}
.tp__line { height: 5px; width: 80%; border-radius: 3px; opacity: 0.7; }
.tp__line--short { width: 50%; opacity: 0.5; }
.tp__chip { height: 6px; width: 30%; border-radius: 3px; }

.tp-split { display: flex; height: 96px; border-radius: var(--radius-sm); overflow: hidden; }
.tp-split__pane { flex: 1; min-width: 0; overflow: hidden; }
.tp-split__pane .tp { height: 96px; border: none; border-radius: 0; }
.tp-split__pane--light { border-left: 2px solid rgba(255,255,255,0.5); }

/* --- Select --- */
.set-select-wrap { position: relative; }
.set-select { min-width: 240px; cursor: pointer; appearance: none; padding-right: 40px; }
.set-select-wrap::after {
  content: "expand_more"; font-family: "Material Symbols Rounded";
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* --- Roblox avatar --- */
.rbx-avatar {
  position: relative; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
  background: var(--avatar-fallback);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.rbx-avatar__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rbx-avatar--system { background: linear-gradient(135deg, #0b3350, #01121f); }
.rbx-avatar__img--pad { inset: 15%; width: 70%; height: 70%; object-fit: contain; }

/* ==========================================================================
   Profile
   ========================================================================== */
.profile-banner {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-5);
}
.profile-banner__meta h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.profile-banner__tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5);
  margin-top: var(--sp-5);
  align-items: stretch; /* keep the two panels the same height so bottoms line up */
}
.profile-grid > * { margin: 0; }

.contact-preview {
  margin-top: var(--sp-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-alt);
}
.contact-preview__head {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-wide);
  color: var(--text-muted); margin-bottom: 6px;
}
.contact-preview__text { color: var(--text); font-size: var(--fs-sm); line-height: 1.55; }
.contact-preview__text .is-muted { color: var(--text-muted); font-style: italic; }

/* Radio cards (mail privacy) */
.radio-cards { display: flex; flex-direction: column; gap: var(--sp-2); }
.radio-card {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--transition), background var(--transition);
}
.radio-card:hover { border-color: var(--border-gold); }
.radio-card.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.radio-card__dot {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  border-radius: 50%; border: 2px solid var(--border-strong);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.radio-card.is-selected .radio-card__dot { border-color: var(--primary); box-shadow: inset 0 0 0 4px var(--primary); }
.radio-card strong { display: block; color: var(--text); font-size: var(--fs-sm); }
.radio-card small { display: block; color: var(--text-muted); font-size: var(--fs-xs); margin-top: 2px; }

/* Save action belongs to the editable form above it: sit close under the last
   field, then leave a clear section break before the "Your data" card so the
   button never reads as attached to GDPR. */
/* Breathing room so Description isn't glued to the contact/privacy row above.
   ~24px of this collapses against the grid's own margin, so sp-7 nets a clean
   visible gap consistent with the rest of the page rhythm. */
.profile-desc { margin-top: var(--sp-7); }

.profile-savebar {
  display: flex;
  justify-content: flex-end;
  margin: var(--sp-3) 0 var(--sp-7);
}
.profile-gdpr { margin-top: 0; }

/* --- Responsive --- */
@media (max-width: 760px) {
  .theme-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .set-select, .set-select-wrap { width: 100%; min-width: 0; }
  .profile-banner { flex-direction: column; text-align: center; }
  .profile-banner__tags { justify-content: center; }
  .profile-savebar { justify-content: stretch; }
  .profile-savebar .btn { width: 100%; }
}
