html[data-market-pending],
html[data-market-pending] body,
html:has(.market-picker[data-entry][open]),
html:has(.market-picker[data-entry][open]) body {
  background: #0b2850;
  overflow: hidden;
}
html[data-market-pending] body > :not(.market-picker, .market-loading) {
  visibility: hidden;
}
.market-loading { display: none; }
html[data-market-pending] .market-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  background: #0b2850;
  z-index: 100;
}
.market-loading-card {
  box-sizing: border-box;
  width: min(510px, calc(100vw - 40px));
  padding: 25px;
  border-top: 4px solid #d6a12d;
  border-radius: 18px;
  color: #0b2850;
  background: #faf7ee;
  font: 1rem/1.5 Arial, sans-serif;
}
.market-loading-card h2 { margin: 1rem 0; font: 400 2rem/1.2 Yomanica, Georgia, serif; }
.market-loading-card p { margin: .5rem 0; }
.market-loading-card a { color: #0b2850; text-decoration: underline; }
.market-load-recovery { animation: market-show-retry 0s 5s both; }
@keyframes market-show-retry { from { visibility: hidden; } to { visibility: visible; } }

#active-market {
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: .01em;
  border: 1px solid currentColor;
  border-radius: 2rem;
  padding: .25rem .7rem;
  margin-inline-start: .8rem;
  cursor: pointer;
}

dialog.market-picker {
  width: min(510px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  border: 0;
  border-top: 4px solid #d6a12d;
  border-radius: 18px;
  background: #faf7ee;
  color: #0b2850;
  overscroll-behavior: contain;
  overflow-y: auto;
  font-family: Arial, Helvetica, sans-serif;
}
dialog.market-picker::backdrop { background: #0b2850c4; }
dialog.market-picker[data-entry] { box-shadow: none; }
dialog.market-picker[data-entry]::backdrop { background: #0b2850; }
.market-picker .market-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 25px;
}
.market-picker .market-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 44px;
  height: 44px;
  color: #0b2850;
  background: transparent;
  border: 0;
  font-size: 1.8rem;
  cursor: pointer;
}
.market-picker .market-brand { width: 78px; height: 78px; display: block; object-fit: contain; }
.market-picker .market-eyebrow {
  margin: 0;
  font: 700 11px/1.35 Arial, sans-serif;
  letter-spacing: 1.4px;
  color: #761f35;
  text-transform: uppercase;
}
.market-picker #market-title {
  margin: 0;
  color: #0b2850;
  font: 400 clamp(1.8rem, 5.5vw, 2.25rem)/1.19 Yomanica, Georgia, serif;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: pretty;
}
.market-picker #market-title:focus { outline: none; }
.market-picker #market-copy,
.market-picker .market-status {
  margin: 0;
  font: 400 16px/1.5 Arial, Helvetica, sans-serif;
  color: #0b2850;
}
.market-picker .button,
.market-picker .market-locate {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  padding: 10px 19px;
  border: 0;
  border-radius: 30px;
  background: #0b2850;
  color: #fff;
  font: 600 15px/1.4 Arial, sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
}
.market-picker .button:hover, .market-picker .market-locate:hover { background: #183f68; }
.market-picker .market-manual,
.market-picker .market-demo-toggle,
.market-picker .market-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #0b2850;
  font: 600 15px/1.45 Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.market-picker .market-country-form { width: 100%; }
.market-picker .market-country-form label { display: block; font-weight: 600; }
.market-picker .market-country-form select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: .4rem 0 .9rem;
  padding: .6rem;
  border: 1px solid #66758a;
  border-radius: 6px;
  color: #0b2850;
  background: white;
  font: inherit;
}
.market-picker .market-demo-options { display: flex; flex-wrap: wrap; gap: 8px; }
.market-picker .market-demo-options :is(a,button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  color: #0b2850;
  background: #faf7ee;
  border: 1px solid #0b2850;
  border-radius: 2rem;
  font: 600 14px/1.4 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.market-picker :is(button, a, select):focus-visible { outline: 3px solid #c65a22; outline-offset: 3px; }
.market-picker [hidden], .market-status:empty { display: none !important; }
.market-locked { background: transparent; border: 0; font: inherit; width: 100%; color: inherit; }
@media (max-width: 600px) {
  #active-market { display: inline-block; margin: .2rem .3rem; }
}
@media (max-height: 480px) {
  .market-picker .market-body { gap: 8px; padding: 18px; }
  .market-picker .market-brand { width: 52px; height: 52px; }
}
