/* Shared play settings. Matches the ODJ fullscreen control rail. */

.game-settings {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  background: rgba(7, 10, 15, 0.94);
  color: #fff;
}

.game-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.9rem 0.9rem 0.55rem;
}

.game-settings-kicker,
.game-settings-group label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.game-settings-summary {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.75rem 0.7rem;
  background: rgba(255, 255, 255, 0.02);
}

.game-settings-summary .game-settings-kicker {
  margin-bottom: 0.45rem;
}

.game-settings-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.42rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.game-settings-row:last-child {
  border-bottom: 0;
}

.game-settings-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.game-settings-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.game-settings-controls {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.game-settings-select {
  display: none;
}

.game-settings-pills {
  display: flex;
  width: 100%;
  gap: 0.35rem;
}

.game-settings-pills.is-dense {
  flex-wrap: nowrap;
}

.game-settings-pill {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  padding: 0 0.4rem;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.game-settings-pills.is-dense .game-settings-pill {
  padding: 0 0.15rem;
  font-size: 0.78rem;
}

.game-settings-pill:hover:not(.is-on) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.game-settings-pill.is-on {
  background: linear-gradient(180deg, #1c1f28 0%, #0c0d11 100%);
  border-color: rgba(76, 110, 245, 0.65);
  box-shadow: 0 0 12px rgba(76, 110, 245, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-settings-pill.is-danger.is-on,
.game-settings-pill.is-high.is-on {
  border-color: rgba(224, 49, 49, 0.65);
  box-shadow: 0 0 12px rgba(224, 49, 49, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-settings-pill.is-low.is-on {
  border-color: rgba(47, 158, 68, 0.65);
  box-shadow: 0 0 12px rgba(47, 158, 68, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-settings-pill.is-medium.is-on {
  border-color: rgba(230, 119, 0, 0.65);
  box-shadow: 0 0 12px rgba(230, 119, 0, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-settings.is-locked .game-settings-pill,
.game-settings.is-locked .game-settings-side,
.game-settings.is-locked .game-settings-audio,
.game-settings.is-locked .game-settings-go,
.game-settings.is-locked .game-settings-select {
  pointer-events: none;
  opacity: 0.45;
}

.game-settings-deck {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.75rem 0.9rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 10, 15, 0.98);
}

.game-settings-stats {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.game-settings-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  text-align: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.game-settings-stat-label {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.55);
}

.game-settings-stat-value {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.game-settings-stat.is-highlight {
  background: rgba(47, 158, 68, 0.1);
  box-shadow: inset 0 0 18px rgba(47, 158, 68, 0.12);
}

.game-settings-stat.is-highlight .game-settings-stat-value {
  font-size: 1.55rem;
  color: #4ade80;
}

.game-settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.game-settings-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.game-settings-auto {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  height: 40px;
  min-width: 0;
  flex: 1 1 auto;
}

.game-settings-auto-short {
  display: none;
}

.game-settings-auto-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #aaa;
}

.game-settings-toggle {
  width: 46px;
  height: 26px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
}

.game-settings-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
}

.game-settings-toggle:disabled {
  opacity: 0.45;
  cursor: default;
}

.game-settings-toggle.is-on {
  background: #4c6ef5;
}

.keno-play .game-settings-toggle.is-on {
  background: #a6843c;
}

.game-settings-toggle.is-on::after {
  left: 23px;
}

.game-settings-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.game-settings-audio {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.game-settings-audio.is-muted {
  color: rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.2);
}

.game-settings-audio .game-settings-audio-off {
  display: none;
}

.game-settings-audio.is-muted .game-settings-audio-on {
  display: none;
}

.game-settings-audio.is-muted .game-settings-audio-off {
  display: inline;
}

.game-settings-go {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 1rem;
  border-radius: 10px;
  border: 2px solid rgba(63, 185, 90, 0.78);
  background: linear-gradient(180deg, #1c1f28 0%, #0c0d11 100%);
  box-shadow: 0 0 12px rgba(47, 158, 68, 0.09), inset 0 0 22px rgba(47, 158, 68, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.game-settings-go:hover:not(:disabled) {
  border-color: rgba(80, 205, 110, 0.95);
  background: linear-gradient(180deg, #22262f 0%, #14161c 100%);
}

.game-settings-go:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.game-settings-go i {
  font-size: 0.85em;
}

.game-settings-verify {
  text-align: center;
}

.game-settings-verify-btn {
  background: none;
  border: 0;
  color: #555;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.game-settings-verify-btn i {
  margin-right: 0.25rem;
  font-size: 0.7rem;
}

.game-settings-verify-btn:not(:disabled):hover {
  color: #aaa;
}

.game-settings-verify-btn:disabled {
  color: #333;
  cursor: default;
  opacity: 1;
}

/* Phone layout matches Hex Wheel: the game stays on top and the controls
   sit underneath in a compact column. The ODJ side rail is desktop only. */
@media (max-width: 900px) {
  .game-settings {
    background: transparent;
  }

  .game-settings-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .game-settings-side {
    flex: 1 1 calc(50% - 0.3rem);
    order: 1;
  }

  .game-settings-toolbar {
    order: 2;
    flex: 0 0 auto;
    width: auto;
  }

  .game-settings-auto {
    flex: 0 0 auto;
  }

  .game-settings-go {
    order: 2;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .game-settings-auto-long {
    display: none;
  }

  .game-settings-auto-short {
    display: inline;
  }

  .game-settings-stack {
    gap: 0.45rem;
    padding: 0.4rem 0.4rem 0.05rem;
  }

  .game-settings-summary {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
  }

  .game-settings-summary .game-settings-kicker,
  .game-settings-row[data-row="max"] {
    display: none;
  }

  .game-settings-row {
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0;
    border: 0;
  }

  .game-settings-row[data-row="left"] {
    justify-content: flex-end;
  }

  .game-settings-label {
    font-size: 0.85rem;
    letter-spacing: 0;
    text-transform: none;
    color: #aaa;
  }

  .game-settings-value {
    font-size: 0.95rem;
  }

  .game-settings-controls:has(.is-menu) {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.4rem;
  }

  .game-settings-controls:has(.is-menu) > .game-settings-group {
    flex: 1.35 1 0;
    min-width: 0;
  }

  .game-settings-group.is-menu {
    flex: 0.75 1 0;
    min-width: 0;
  }

  .game-settings-group.is-menu .game-settings-pills {
    display: none;
  }

  .game-settings-group:not(.is-menu) .game-settings-pills {
    gap: 0;
  }

  .game-settings-group:not(.is-menu) .game-settings-pill {
    height: 32px;
    border-radius: 0;
    border-width: 1px;
    font-size: 0.78rem;
  }

  .game-settings-group:not(.is-menu) .game-settings-pill:first-child {
    border-radius: 8px 0 0 8px;
  }

  .game-settings-group:not(.is-menu) .game-settings-pill:last-child {
    border-radius: 0 8px 8px 0;
    margin-left: -1px;
  }

  .game-settings-select {
    display: block;
    width: 100%;
    height: 32px;
    padding: 0 0.4rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #121820;
    color: #fff;
    color-scheme: dark;
    font-weight: 700;
    font-size: 0.82rem;
  }

  .game-settings-select option {
    background: #121820;
    color: #fff;
  }

  /* The open list is a page popover, not the OS menu, so the highlight
     is not the system blue. */
  @supports (appearance: base-select) {
    .game-settings-select,
    .game-settings-select::picker(select) {
      appearance: base-select;
    }

    .game-settings-select {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #121820;
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.14);
    }

    .game-settings-select::picker-icon {
      color: rgba(255, 255, 255, 0.7);
    }

    .game-settings-select::picker(select) {
      position-area: block-end;
      position-try-fallbacks: none;
      margin-top: 0.25rem;
      min-width: anchor-size(width);
      background: #121820;
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: 0.25rem;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    }

    .game-settings-select option {
      background: transparent;
      color: #fff;
      border-radius: 6px;
      padding: 0.45rem 0.6rem;
      font-weight: 600;
    }

    .game-settings-select option:hover,
    .game-settings-select option:focus-visible {
      background: rgba(255, 255, 255, 0.08);
      color: #fff;
      outline: none;
    }

    .game-settings-select option:checked {
      background: transparent;
      color: #fff;
      font-weight: 700;
    }

    .game-settings-select option::checkmark {
      content: none;
    }
  }

  .game-settings-group label {
    margin-bottom: 0.12rem;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .game-settings-deck {
    gap: 0.45rem;
    padding: 0.25rem 0.35rem 0.55rem;
    border-top: 0;
    background: transparent;
  }

  .game-settings-stats {
    flex-direction: row;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
  }

  .game-settings-stat {
    flex: 1;
    gap: 0.08rem;
    padding: 0.35rem 0.3rem;
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    box-shadow: none;
  }

  .game-settings-stat:last-child {
    border-right: 0;
  }

  .game-settings-stat-label {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
  }

  .game-settings-stat-value,
  .game-settings-stat.is-highlight .game-settings-stat-value {
    font-size: 0.9rem;
  }
}
