/* Settings modal: tab bar + 5 tab pages (Minibia parity) */

/* O modal inteiro tem que caber no viewport (720p): trava a altura e rola o corpo */
#settings-modal {
  max-width: 94vw;
  max-height: 92vh;
}

#settings-modal .modal-body {
  padding: 8px;
  max-height: calc(92vh - 70px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.settings-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  border-bottom: 1px solid #444;
  padding-bottom: 6px;
}

.settings-tab-btn {
  background: #2a2a2a;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px 4px 0 0;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.settings-tab-btn.active {
  background: #3a3a3a;
  color: #fff;
  border-bottom-color: #3a3a3a;
}

.settings-tab-content {
  display: none;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 4px;
}

/* Gameplay tem 8 checkboxes: sem wrap elas esticam o modal além do viewport */
#settings-modal .checkboxes {
  flex-wrap: wrap;
  justify-content: flex-start;
  row-gap: 2px;
}

#settings-modal .checkboxes label {
  flex: 0 0 auto;
  padding: 2px 10px 2px 0;
}

.settings-tab-content.active {
  display: block;
}

.settings-section-title {
  font-weight: bold;
  margin: 8px 0 4px 0;
  color: #eee;
  font-size: 13px;
}

.settings-help {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border: 1px solid #777;
  border-radius: 50%;
  font-size: 10px;
  color: #aaa;
  margin-left: 4px;
  cursor: help;
}

.settings-note {
  font-size: 11px;
  color: #999;
  margin: 2px 0 6px 0;
}

/* Functional body classes driven by Settings.__applyState */

body.hide-names #text-wrapper .text-window > span {
  display: none;
}

body.ui-scale-75 #interface { zoom: 0.75; }
body.ui-scale-90 #interface { zoom: 0.9; }
body.ui-scale-110 #interface { zoom: 1.1; }
body.ui-scale-125 #interface { zoom: 1.25; }

body.aspect-stretch #screen {
  width: 100% !important;
  height: 100% !important;
}

body.status-bottom #status-bar {
  order: 99;
}

body.wider-ui .window {
  min-width: 216px;
}
