/* swaupaint 2026-10-27: AU geo dialog + honest-stake confirm as compact top-sheet
   so the circular wheel stays visible in the first viewport (mobile ~390x844 + desktop).
   Does NOT remove geo restriction / staking block — presentation only.
   Rollback: /root/backups/stakewheel-aupaint-20261027212829/rollback.sh */

/* React AU region dialog: fixed inset-0 z-[60] bg-black/70 ... */
[role="dialog"][aria-modal="true"].fixed.inset-0 {
  align-items: flex-start !important;
  justify-content: center !important;
  padding: max(8px, env(safe-area-inset-top, 0px)) 10px 0 !important;
  background: rgba(0, 0, 0, 0.32) !important;
}

/* Compact the dialog card so it stays in the top ~38% of the viewport */
[role="dialog"][aria-modal="true"].fixed.inset-0 > div.max-w-md {
  max-width: min(420px, 100%) !important;
  max-height: min(38vh, 320px) !important;
  overflow: auto !important;
  padding: 12px 12px !important;
  margin-top: 0 !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.45) !important;
}
[role="dialog"][aria-modal="true"].fixed.inset-0 > div.max-w-md h2 {
  font-size: 15px !important;
  margin: 0 0 6px !important;
}
[role="dialog"][aria-modal="true"].fixed.inset-0 > div.max-w-md p.text-sm,
[role="dialog"][aria-modal="true"].fixed.inset-0 > div.max-w-md .text-sm {
  font-size: 12px !important;
  line-height: 1.35 !important;
  max-height: 6.5em;
  overflow: auto;
}
[role="dialog"][aria-modal="true"].fixed.inset-0 > div.max-w-md button.py-2 {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Honest-stake confirm (#swh-modal) — same top-sheet treatment */
#swh-modal {
  align-items: flex-start !important;
  justify-content: center !important;
  padding: max(8px, env(safe-area-inset-top, 0px)) 12px 0 !important;
  background: rgba(0, 0, 0, 0.32) !important;
}
#swh-modal .box {
  max-height: min(38vh, 300px) !important;
  overflow: auto !important;
  padding: 12px 12px !important;
  margin-top: 4px !important;
}
#swh-modal h2 { font-size: 15px !important; margin: 0 0 6px !important; }
#swh-modal .box > p { font-size: 12px !important; line-height: 1.35 !important; margin: 0; }

/* While either modal is up: promote wheel into the visible band under the sheet */
html.swl.sw-aupaint-modal [data-swl=sec] [data-swl=wheelcol],
html.swl body:has([role="dialog"][aria-modal="true"].fixed) [data-swl=sec] [data-swl=wheelcol],
html.swl body:has(#swh-modal) [data-swl=sec] [data-swl=wheelcol] {
  order: 1 !important;
}
html.swl.sw-aupaint-modal [data-swl=sec] > [data-swl=bal],
html.swl.sw-aupaint-modal [data-swl=sec] > [data-swl=au],
html.swl.sw-aupaint-modal [data-swl=sec] > [data-swl=note],
html.swl.sw-aupaint-modal [data-swl=sec] > [data-swr=hist],
html.swl body:has([role="dialog"][aria-modal="true"].fixed) [data-swl=sec] > [data-swl=bal],
html.swl body:has([role="dialog"][aria-modal="true"].fixed) [data-swl=sec] > [data-swl=au],
html.swl body:has([role="dialog"][aria-modal="true"].fixed) [data-swl=sec] > [data-swl=note],
html.swl body:has([role="dialog"][aria-modal="true"].fixed) [data-swl=sec] > [data-swr=hist],
html.swl body:has(#swh-modal) [data-swl=sec] > [data-swl=bal],
html.swl body:has(#swh-modal) [data-swl=sec] > [data-swl=au],
html.swl body:has(#swh-modal) [data-swl=sec] > [data-swl=note],
html.swl body:has(#swh-modal) [data-swl=sec] > [data-swr=hist] {
  order: 18 !important;
}

html.swl.sw-aupaint-modal [data-swl=wheel],
html.swl body:has([role="dialog"][aria-modal="true"].fixed) [data-swl=wheel],
html.swl body:has(#swh-modal) [data-swl=wheel] {
  width: var(--swl-w, min(100%, 78vw, 42vh)) !important;
}

#sw-aupaint-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 2147483590;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #f59e0b;
  color: #0b100d;
  font: 800 13px/1.2 system-ui, -apple-system, sans-serif;
  border: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
  cursor: pointer;
}
#sw-aupaint-cta[hidden] { display: none !important; }
