/* The Settings modal (views/modals/profile.jsx) in the trophy-hall look:
   wood frame, stone wall inside, iron brackets, sections as stone panels,
   gold for save, wood for everything else. Theme tokens are re-pointed
   inside, so the rules in style.css read light-on-dark in both themes.
   Linked after style.css in views/layout.jsx. */

.settings-hall {
  --text: #f6e9cc;
  --papyrus-text: #ffe9b0;
  --papyrus-edge: rgba(255, 220, 160, 0.16);
  --number: #d4c39f;
  --panel-bg: rgba(18, 14, 10, 0.62);
  --surface-subtle: rgba(0, 0, 0, 0.3);
  --surface-hover: rgba(255, 210, 58, 0.08);
  --surface-border: rgba(255, 220, 160, 0.16);
  --surface-border-hover: rgba(255, 210, 58, 0.5);
  --resource-panel-border: rgba(255, 220, 160, 0.16);
  --primary-bg: #f0b52e;
  --sh-gold: #ffd23a;
  --sh-ink-dim: #d4c39f;
  --sh-edge: rgba(255, 220, 160, 0.16);
  --sh-panel: rgba(18, 14, 10, 0.62);
  font-family: "Comfortaa", sans-serif;
  color: var(--text);
}

/* ── Frame ── */
#modal > .modal-content.profile-modal.settings-hall {
  overflow: visible;
  padding: 0;
  border: 12px solid transparent;
  border-radius: 10px;
  background:
    linear-gradient(rgba(14, 12, 10, 0.7), rgba(14, 12, 10, 0.8)) padding-box,
    url("/gui/backgroundwalltexture.webp") center top / 260px auto repeat padding-box,
    url("/gui/wooden_texture.png") center / 300px auto repeat border-box;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.65),
    inset 0 0 0 2px rgba(0, 0, 0, 0.55),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
}
.settings-hall .ach-hall-bracket {
  position: absolute;
  top: -22px;
  height: 56px;
  width: auto;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
.settings-hall .ach-hall-bracket-l { left: -24px; }
.settings-hall .ach-hall-bracket-r { right: -24px; transform: scaleX(-1); }
.settings-hall .modal-scroll-body { padding: 16px 18px 18px; max-height: calc(80vh - 24px); }

/* ── Header ── */
.settings-hall .profile-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sh-edge);
  flex-wrap: wrap;
}
.settings-hall .profile-header::before,
.settings-hall .profile-section::before,
.settings-hall .profile-section-card::before,
.settings-hall .checkbox-label::before { display: none; }
.settings-hall .profile-header i { color: var(--sh-gold); font-size: 1.5rem; }
.settings-hall .profile-header h1 {
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
  letter-spacing: 0.04em;
  color: #ffe9b0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.settings-hall .account-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(126, 224, 126, 0.12);
  border: 1px solid rgba(126, 224, 126, 0.45);
  color: #b8f0b8;
  font-size: 0.75rem;
}
.settings-hall .account-badge i { color: #7ee07e; font-size: 0.85rem; }

/* ── Sections as stone panels ── */
.settings-hall .profile-section,
.settings-hall .profile-section-card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--sh-panel);
  border: 1px solid var(--sh-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.35);
}
.settings-hall .section-title {
  margin-bottom: 12px;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe9b0;
}
.settings-hall .section-title i { color: var(--sh-gold); }
.settings-hall .form-group label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sh-ink-dim);
}
.settings-hall .form-group input,
.settings-hall .form-group textarea,
.settings-hall select {
  border-radius: 10px;
  border: 1px solid var(--sh-edge);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
}
.settings-hall .form-group input:focus,
.settings-hall .form-group textarea:focus { border-color: rgba(255, 210, 58, 0.7); box-shadow: none; }
.settings-hall .form-hint,
.settings-hall .checkbox-hint { color: var(--sh-ink-dim); }
.settings-hall .checkbox-label {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--sh-edge);
}
.settings-hall .checkbox-text { color: #fff; }
.settings-hall a:not([class]) { color: #ffe27a; }

/* ── Buttons ── */
.settings-hall .profile-btn-save,
.settings-hall .profile-btn-close,
.settings-hall .profile-btn-logout,
.settings-hall .profile-notif-test-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font: 800 0.86rem/1 "Cinzel", serif;
  letter-spacing: 0.03em;
  text-shadow: none;
  cursor: pointer;
}
.settings-hall .profile-btn-save,
.settings-hall .profile-btn-save:active {
  border: 2px solid #7a5310;
  background: linear-gradient(180deg, #ffe48a 0%, #f0b52e 55%, #c98a12 100%);
  color: #3d2000;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #6b4410;
}
.settings-hall .profile-btn-save i { color: #3d2000; }
.settings-hall .profile-btn-save:hover {
  background: linear-gradient(180deg, #ffe48a 0%, #f0b52e 55%, #c98a12 100%);
  filter: brightness(1.06);
  transform: none;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #6b4410;
}
.settings-hall .profile-btn-close,
.settings-hall .profile-btn-logout,
.settings-hall .profile-notif-test-btn {
  border: 1px solid rgba(200, 150, 12, 0.55);
  background: linear-gradient(180deg, rgba(48, 44, 40, 0.92), rgba(22, 20, 18, 0.95));
  color: var(--text);
  box-shadow: none;
}
.settings-hall .profile-btn-close i,
.settings-hall .profile-btn-logout i,
.settings-hall .profile-notif-test-btn i { color: var(--sh-gold); }
.settings-hall .profile-btn-close:hover,
.settings-hall .profile-btn-logout:hover,
.settings-hall .profile-notif-test-btn:hover {
  border-color: rgba(230, 206, 106, 0.9);
  background: linear-gradient(180deg, rgba(58, 52, 44, 0.95), rgba(28, 24, 20, 0.95));
  color: #fff;
  transform: none;
}
.settings-hall .profile-btn-logout:hover { border-color: rgba(255, 138, 122, 0.8); }
.settings-hall .form-actions {
  position: sticky;
  bottom: -18px;
  z-index: 1;
  margin: 16px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--sh-edge);
  background: linear-gradient(rgba(20, 16, 12, 0.92), rgba(14, 12, 10, 0.98));
}
.settings-hall .form-actions button { border-radius: 10px; padding: 12px 16px; }
.settings-hall .form-result { background: rgba(0, 0, 0, 0.35); }

@media (max-width: 768px) {
  #modal > .modal-content.profile-modal.settings-hall { border-width: 10px; }
  .settings-hall .modal-scroll-body { padding: 12px 10px 14px; }
  .settings-hall .profile-section,
  .settings-hall .profile-section-card { padding: 12px; }
  .settings-hall .form-actions { bottom: -14px; margin: 14px -10px -14px; padding: 10px; }
  .settings-hall .ach-hall-bracket { top: -18px; height: 44px; }
  .settings-hall .ach-hall-bracket-l { left: -18px; }
  .settings-hall .ach-hall-bracket-r { right: -18px; }
}

/* playerprofile.css styles a .profile-header card for the profile page
   (light in the light theme); here the header is just the title row. */
.settings-hall .profile-header {
  background: none;
  border-radius: 0;
  padding: 0 0 12px;
  box-shadow: none;
  text-align: left;
}
/* Phones: Save and Close side by side, so the sticky bar stays one row. */
@media (max-width: 768px) {
  .settings-hall .form-actions { flex-direction: row; gap: 8px; }
  .settings-hall .form-actions button { flex: 1; padding: 11px 8px; font-size: 0.82rem; }
}

/* ── Language picker ── */
.settings-hall .settings-locale-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  cursor: pointer;
}
.settings-hall .settings-locale-select:focus { border-color: rgba(255, 210, 58, 0.7); outline: none; }
.settings-hall .settings-locale-select option { background: #2a2118; color: #fff; }
