/* Game settings form in the Settings tab (GameSettingsPanel.razor). Kept in its own file so it stays easy to find. */

.gs { margin: 0 0 1rem; }
.gs-head { align-items: flex-start; margin-bottom: 1rem; }
.gs-head p { margin-top: 0.25rem; max-width: 60ch; }
.gs-tools { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.gs-tools .gs-search { width: 18rem; max-width: 100%; }
.gs-tools .mud-input-control { margin-top: 0; }

.gs-file + .gs-file { margin-top: 1.5rem; }
.gs-file-title { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.gs-file-title code { font-weight: 400; font-size: 0.8rem; }
.gs-none { padding: 0.8rem 0; }

.gs-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.gs-group + .gs-group { margin-top: 0.6rem; }
.gs-group-head {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.75rem 0.9rem; border: 0; background: transparent; color: var(--text);
  font: inherit; text-align: left; justify-content: flex-start; cursor: pointer; border-radius: var(--radius-sm);
}
.gs-group-head:hover { background: var(--raised); }
.gs-group-head:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.gs-group-name { font-weight: 600; }
.gs-group-head .tag { margin-left: auto; }
.gs-chevron { flex: none; margin: 0 !important; color: var(--muted); transition: transform 0.15s ease; font-size: 1.25rem !important; }
.gs-group.open .gs-chevron { transform: rotate(90deg); }
.gs-group.open > .gs-group-head { border-bottom: 1px solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

.gs-fields { display: flex; flex-direction: column; }
.gs-field {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 20rem); gap: 0.5rem 1.5rem; align-items: start;
  padding: 0.85rem 0.9rem 0.85rem calc(0.9rem - 3px); border-left: 3px solid transparent;
}
.gs-field + .gs-field { border-top: 1px solid var(--line); }
.gs-field.edited { border-left-color: var(--gold); background: rgba(255, 215, 0, 0.035); }
.gs-text { min-width: 0; }
.gs-label { font-weight: 500; margin-right: 0.4rem; }
.gs-text .tag { vertical-align: 1px; margin-left: 0.15rem; }
.gs-dot { display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--gold); vertical-align: 2px; margin-right: 0.3rem; }
.gs-desc { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; max-width: 65ch; }
.gs-key { color: var(--muted); font-size: 0.78rem; margin-top: 0.25rem; overflow-wrap: anywhere; }
.gs-key code { font-size: 0.76rem; }
.gs-control { min-width: 0; }
.gs-control .mud-input-control { margin-top: 0; }
.gs-control .mud-switch { margin-left: -0.5rem; }
.gs-actions { display: flex; gap: 0.9rem; justify-content: flex-end; min-height: 0; }
.gs-actions:empty { display: none; }
.gs .link-button { border: 0; background: none; padding: 0.2rem 0; color: var(--muted); font: inherit; font-size: 0.82rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.gs .link-button:hover { color: var(--text); }
.gs .link-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gs .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gs-raw .gs-label code { font-size: 0.85rem; overflow-wrap: anywhere; }
.gs-other-help { padding: 0.7rem 0.9rem 0; }
.gs-managed { margin: 0.8rem 0 0; line-height: 1.7; }
.gs-managed-item { margin-left: 0.3rem; }

/* Stays at the bottom of the screen while there is something to save. */
.gs-savebar {
  position: sticky; bottom: 0.75rem; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap;
  margin-top: 1rem; padding: 0.65rem 0.75rem 0.65rem 1rem;
  border: 1px solid rgba(255, 215, 0, 0.45); border-radius: var(--radius-sm);
  background: var(--raised); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.gs-savebar-text { font-weight: 500; }

@media (max-width: 700px) {
  .gs-head > div:first-child { width: 100%; }
  .gs-tools, .gs-tools .gs-search { width: 100%; }
  .gs-field { grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
  .gs-actions { justify-content: flex-start; }
  .gs-savebar { bottom: 0.5rem; }
  .gs-savebar .row { margin-left: auto; }
}
