/* archivo-latin-ext-wght-normal */
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/archivo-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* archivo-latin-wght-normal */
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/archivo-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* inter-latin-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* inter-latin-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(./fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

[data-testid="huntplace-screen"] :is([role="button"], [role="radio"], input, textarea, a, .hunt-map-person-target, .hunt-map-person-details):focus-visible {
  outline: 2px solid #17211B;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #FFFFFF;
}

[data-testid="huntplace-screen"] .hunt-map-frame {
  background: #EBE4D5;
}

[data-testid="huntplace-screen"] .hunt-map-overlay text {
  font-family: 'Inter Variable', system-ui, sans-serif;
}

[data-testid="huntplace-screen"] .hunt-map-person-target {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}

[data-testid="huntplace-screen"] .hunt-map-person-details {
  margin-block: 8px;
  border-radius: 16px;
}

/* HP-UX2: the field map fills the phone screen between the bar and the bottom sheet. */
@media (max-width: 699px) {
  [data-testid="field-map"] .hunt-map-frame {
    height: 320px;
    height: max(320px, calc(100dvh - 400px));
    /* Edge to edge: the screen's side margins are taken back by the map's wrapper. */
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* HP-UX2: beside the list of people on a tablet the map uses the height the screen has. */
@media (min-width: 700px) {
  [data-testid="field-map"] .hunt-map-frame {
    height: 420px;
    height: max(420px, calc(100dvh - 520px));
  }
}

/* HP-UX2: the legend opens as a window over the map and scrolls inside it. The map's own
   controls on the right stay free, so the same button closes it. */
.hunt-map-legend {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 72px;
  max-height: calc(100% - 20px);
  box-sizing: border-box;
  z-index: 3;
  padding: 16px;
  border-style: solid;
  border-radius: 16px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  align-content: start;
}

.hunt-map-summary {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 72px;
  padding: 8px 12px;
  border: 1px solid;
  border-radius: 12px;
  display: grid;
  gap: 2px;
}

.hunt-map-controls {
  position: absolute;
  right: 10px;
  display: grid;
  gap: 8px;
}

.hunt-map-controls-top { top: 10px; }
.hunt-map-controls-bottom { bottom: 40px; }

.hunt-map-control {
  width: 52px;
  height: 52px;
  padding: 0;
  border-style: solid;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hunt-map-control:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.hunt-map-frame-field .hunt-map-scale { top: auto; bottom: 40px; }
.hunt-map-frame-field .hunt-map-status { top: auto; bottom: 84px; right: 72px; }

[data-huntplace-mode="dawn"] {
  color-scheme: dark;
}

[data-huntplace-mode="dawn"] :is([role="button"], [role="radio"], input, textarea, a, .hunt-map-person-target, .hunt-map-person-details):focus-visible {
  outline-color: #E7ECE6;
  box-shadow: 0 0 0 2px #111814;
}

[data-huntplace-mode="field"] :is([role="button"], [role="radio"], input, textarea, a, .hunt-map-person-target, .hunt-map-person-details):focus-visible {
  outline: 3px solid #000;
}

[data-huntplace-mode="dawn"] .hunt-map-frame {
  background: #233029;
  border-color: #76887C;
}

[data-huntplace-mode="dawn"] :is(.hunt-map-status, .hunt-map-scale, .hunt-map-attribution) {
  background: #1A241E;
  color: #E7ECE6;
}

[data-huntplace-mode="dawn"] :is(.hunt-map-attribution a, .hunt-map-scale div) {
  color: #E7ECE6;
  border-color: #E7ECE6;
}

[data-huntplace-mode="field"] .hunt-map-frame {
  background: #F0F0F0;
  border: 2px solid #000;
}

[data-huntplace-mode="field"] :is(.hunt-map-status, .hunt-map-scale, .hunt-map-attribution, .hunt-map-attribution a) {
  font-size: 16px;
  color: #000;
}
