/* Dome Blitz setup layout: mirror the existing Dome Duel modal geometry
   without changing Blitz's approved blue/gold theme, logo, or gameplay.
   The same #onlineOptions controls and events remain authoritative. */

/* Match Duel's 640px modal width, inner gutters, rounded container, and
   vertical centering (provided by grand-hall-live.css). Small viewports
   retain native modal scrolling so every control remains accessible. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup {
  box-sizing:border-box!important;
  width:min(92vw,640px)!important;
  max-width:calc(100vw - 20px)!important;
  max-height:calc(100dvh - 24px)!important;
  overflow-y:auto!important;
  padding:clamp(21px,3.6vw,36px) clamp(18px,3vw,33px)!important;
  border-radius:24px!important;
}

/* The two mode buttons have the same row, height, spacing, alignment, and
   typography as Duel's active setup, but retain Blitz's button colors. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes:not([hidden]) {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;
  gap:10px!important;
  width:100%!important;
  margin:14px auto 12px!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes > button {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  margin:0!important;
  padding:9px 8px!important;
  border-radius:12px!important;
  font-size:clamp(14px,1.7vw,18px)!important;
}

/* Duel's compact, centered Goal + Timer row and Computer Level / Room Type
   widths. The iPad touch selector is a wrapper around the original select. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .online-game-settings {
  box-sizing:border-box!important;
  width:min(100%,310px)!important;
  margin:0 auto 16px!important;
  gap:12px!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-duel-level {
  box-sizing:border-box!important;
  width:min(100%,282px)!important;
  max-width:282px!important;
  margin:0 auto 10px!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-duel-level > .wd-touch-select-wrap {
  width:100%!important;
  max-width:100%!important;
}

/* Blitz computer matches remain unrated. Hide the redundant Room Type
   label/select, INCLUDING the touch wrapper, while preserving its live
   value and the original game-creation handlers. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup.wd-duel-computer-choice > label[for="onlineRated"],
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup.wd-duel-computer-choice > #onlineRated,
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup.wd-duel-computer-choice > label[for="onlineRated"] + .wd-touch-select-wrap,
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup.wd-duel-computer-choice > .wd-touch-select-wrap:has(#onlineRated) {
  display:none!important;
}

/* Duel's centered 282px Room Type, including iPad/phone custom select. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup:not(.wd-duel-computer-choice) > #onlineRated,
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup:not(.wd-duel-computer-choice) > label[for="onlineRated"] + .wd-touch-select-wrap,
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup:not(.wd-duel-computer-choice) > .wd-touch-select-wrap:has(#onlineRated) {
  box-sizing:border-box!important;
  display:block!important;
  width:min(100%,282px)!important;
  max-width:282px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup:not(.wd-duel-computer-choice) > .wd-touch-select-wrap > #onlineRated {
  width:100%!important;
  max-width:100%!important;
}

/* Both game modes use Duel's 355px action/navigation buttons. Keep the
   centered 310px code input, just as in Duel; don't stretch the form fields
   to the full 640px modal. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup .online-options-actions {
  display:flex!important;
  justify-content:center!important;
  width:100%!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup :is(#duelSetupComputer,#create,#join,#backToAvatar) {
  box-sizing:border-box!important;
  width:min(100%,355px)!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup #backToAvatar {
  min-height:51px!important;
  margin-top:12px!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup #room {
  box-sizing:border-box!important;
  width:min(100%,310px)!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup.wd-duel-computer-choice > .online-options-actions {
  margin:20px auto!important;
}

/* Match Duel's responsive narrow modal geometry without horizontal scroll. */
@media (max-width:480px) {
  body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup {
    width:calc(100vw - 22px)!important;
    padding:22px 14px!important;
    border-radius:18px!important;
  }
  body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes:not([hidden]) {
    gap:9px!important;
  }
  body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes > button {
    font-size:clamp(14px,4vw,19px)!important;
  }
}

/* Dome Blitz mode colors: mahogany Computer, emerald-green 2 Player.
   Both colors remain fixed; the shared aria-pressed state moves the
   highlighted frame when the user changes modes. No JS changes needed. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes > #duelComputerMode {
  background:linear-gradient(180deg,#985a3d 0%,#6a3422 46%,#36190f 100%)!important;
  color:#fff1cc!important;
  -webkit-text-fill-color:#fff1cc!important;
  border:3px solid #d3a251!important;
  box-shadow:inset 0 2px 3px #fbd39d77,inset 0 -3px 5px #18080399,0 3px 6px #050b2399!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes > #duelTwoPlayerMode {
  background:linear-gradient(180deg,#399c65 0%,#17623b 48%,#06391f 100%)!important;
  color:#f5f6d8!important;
  -webkit-text-fill-color:#f5f6d8!important;
  border:3px solid #d3a251!important;
  box-shadow:inset 0 2px 3px #c8ffe166,inset 0 -3px 5px #031b0b88,0 3px 6px #050b2399!important;
}
/* A dark inner edge plus bright gold frame is applied ONLY to the active
   choice. Using the existing aria-pressed attribute keeps the border in
   sync with the same handlers used by Duel, on desktop and touch. */
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes > :is(#duelComputerMode,#duelTwoPlayerMode)[aria-pressed="true"] {
  border:4px solid #ffe3a1!important;
  outline:3px solid #f3c453!important;
  outline-offset:1px!important;
  box-shadow:inset 0 0 0 2px #28120a,0 0 0 3px #28120a,0 5px 15px #000a,0 0 15px #ffda6988!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-blitz-setup > .wd-entry-modes > button:focus-visible {
  outline:3px solid #fff8df!important;
  outline-offset:3px!important;
}
