/* Shared site themes are selected by the administrator and loaded after base styles. */
:root[data-site-theme] { --border-color: var(--border-glass); --accent-soft: color-mix(in srgb, var(--accent-neon) 14%, transparent); }
:root[data-site-theme="samara-gold"] {
  --bg-dark: #17130e;
  --panel-glass: #211b13;
  --card-glass: #282117;
  --card-glass-hover: #352b1c;
  --border-glass: #493b25;
  --border-glow: #70582f;
  --inner-box-bg: #1b160f;
  --text-bright: #fff4d6;
  --text-sub: #d0bea0;
  --text-dim: #b3a185;
  --accent-neon: #f5bd32;
  --btn-liquid-bg: #9b6911;
  --accent-soft: #ffe3a3;
  --bg-gradient: none; --dropdown-bg: #211b13; --svg-path-main: #fff4d6; --cliq-logo-color: #fff4d6;
}
:root[data-site-theme="gold-light"] {
  --bg-dark: #faf6ec;
  --panel-glass: #fffdf8;
  --card-glass: #ffffff;
  --card-glass-hover: #f4ead5;
  --border-glass: #e0d0ac;
  --border-glow: #bfa36b;
  --inner-box-bg: #f5eddd;
  --text-bright: #2c2416;
  --text-sub: #695839;
  --text-dim: #786747;
  --accent-neon: #926315;
  --btn-liquid-bg: #926315;
  --accent-soft: #eee0c0;
  --bg-gradient: none; --dropdown-bg: #fffdf8; --svg-path-main: #2c2416; --cliq-logo-color: #2c2416;
}
:root[data-site-theme="ocean"] {
  --bg-dark: #0b1522;
  --panel-glass: #101e2f;
  --card-glass: #12263a;
  --card-glass-hover: #1b344d;
  --border-glass: #29465f;
  --border-glow: #416880;
  --inner-box-bg: #0d1b2b;
  --text-bright: #e8f5ff;
  --text-sub: #b3cddd;
  --text-dim: #8eafc4;
  --accent-neon: #69c9f4;
  --btn-liquid-bg: #146b99;
  --accent-soft: #193c55;
  --bg-gradient: none; --dropdown-bg: #101e2f; --svg-path-main: #e8f5ff; --cliq-logo-color: #e8f5ff;
}
:root[data-site-theme="emerald"] {
  --bg-dark: #0c1915;
  --panel-glass: #10231b;
  --card-glass: #142b22;
  --card-glass-hover: #1e3b2e;
  --border-glass: #2c4e3e;
  --border-glow: #44715b;
  --inner-box-bg: #0d2018;
  --text-bright: #e9fbf2;
  --text-sub: #b6d3c3;
  --text-dim: #92b4a2;
  --accent-neon: #6bd9ab;
  --btn-liquid-bg: #23734f;
  --accent-soft: #1c4030;
  --bg-gradient: none; --dropdown-bg: #10231b; --svg-path-main: #e9fbf2; --cliq-logo-color: #e9fbf2;
}

:root[data-site-theme="gold-light"] { --accent-green:#237442; --accent-red:#ba3434; --accent-amber:#976413; }
:root[data-site-theme="light"] { --text-dim:#6b7180; }
body.is-admin .nav-link.active { background:var(--accent-soft); }
.site-settings-button, .site-settings-back { align-items:center;justify-content:center;gap:6px;padding:9px 12px;border:1px solid var(--border-glass);border-radius:8px;background:var(--card-glass);color:var(--text-bright);font:inherit;cursor:pointer; }
.site-settings-button { display:none;white-space:nowrap;font-size:13px; }
body.is-admin .site-settings-button { display:inline-flex; }
body:not(.is-admin) #view-settings { display:none!important; }
.settings-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px; }
.settings-heading p,.settings-hint { color:var(--text-sub);font-size:14px;line-height:1.8; }
.settings-heading h2 { font-size:26px; }
.settings-intro { display:flex;gap:16px;align-items:center;padding:20px;background:var(--panel-glass);border:1px solid var(--border-glass);border-radius:12px;margin-bottom:28px; }
.settings-intro img { object-fit:cover;border-radius:12px;flex-shrink:0; }
.settings-intro p { color:var(--text-sub);line-height:1.8;font-size:14px; }
.settings-theme-fieldset { border:0;min-width:0; }
.settings-theme-fieldset legend { font-weight:800;font-size:19px;margin-bottom:6px; }
.settings-theme-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0; }
.site-theme-choice { position:relative;display:flex;flex-direction:column;gap:10px;padding:14px;border:2px solid var(--border-glass);border-radius:12px;background:var(--panel-glass);cursor:pointer;min-width:0; }
.site-theme-choice.selected { border-color:var(--accent-neon); }
.site-theme-choice:focus-within { outline:2px solid var(--accent-neon);outline-offset:3px; }
.site-theme-choice input { position:absolute;top:22px;inset-inline-end:22px;accent-color:var(--accent-neon);width:18px;height:18px;z-index:1; }
.site-theme-sample { background:var(--sample-bg);color:var(--sample-text);height:115px;border-radius:8px;display:flex;overflow:hidden;direction:rtl;padding:12px;gap:10px; }
.sample-nav { width:24px;display:flex;flex-direction:column;gap:8px;padding-top:7px; }
.sample-nav span { height:5px;border-radius:4px;background:var(--sample-accent);opacity:.7; }
.sample-body { flex:1;min-width:0;padding-top:20px; }
.sample-body b { font-size:12px; }
.sample-stats { display:flex;gap:5px;margin-top:9px; }
.sample-stats i { background:var(--sample-panel);border-top:2px solid var(--sample-accent);height:24px;flex:1;border-radius:4px; }
.sample-bar { width:55%;height:6px;border-radius:4px;background:var(--sample-accent);margin-top:8px; }
.site-theme-name { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;font-weight:800; }
.site-theme-name small { font-size:10px;background:var(--accent-soft);color:var(--accent-neon);border-radius:5px;padding:3px 6px; }
.site-theme-description { color:var(--text-sub);font-size:12px;line-height:1.6; }
.site-theme-swatches { display:flex;gap:5px; }
.site-theme-swatches i { width:18px;height:18px;border:1px solid #8886;border-radius:50%; }
.settings-save-bar { display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:18px 0;margin-top:10px;border-top:1px solid var(--border-glass); }
#settings-status { flex-basis:100%;font-size:14px;line-height:1.7; }
#settings-apply:disabled { opacity:.55;cursor:default; }
@media(max-width:1000px) { .settings-theme-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .settings-heading { align-items:flex-start;flex-direction:column; }
  .settings-theme-grid { gap:10px; }
  .site-theme-choice { padding:9px; }
  .site-theme-choice input { top:16px;inset-inline-end:16px; }
  .settings-intro { padding:14px;gap:12px; }
  .site-theme-sample { height:100px;padding:8px;gap:5px; }
  .site-theme-name { font-size:14px; }
  .site-settings-button { padding:8px;font-size:11px;gap:4px; }
  .settings-save-bar > button { width:100%; }
}
@media(max-width:360px) { .settings-theme-grid { grid-template-columns:1fr; } }

/* Match the existing More menu breakpoint. */
@media (max-width:900px) {
  body.is-admin .header-controls > .site-settings-button { display:none; }
}
