/* Map markers are created by SwotMap.razor.js, outside Blazor's scoped CSS, so they live here. Matches Paper 07–09. */
/* z-index 0 makes the map its own stacking layer: MapLibre gives its controls z-index 2, which otherwise drew them (the
   attribution above all) over any sheet or bar a page lays on top of the map. */
.swot-map { position: absolute; inset: 0; z-index: 0; background: var(--color-map-land); }

.swot-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-sans), system-ui, sans-serif;
    cursor: pointer;
    transform: translateY(-26px);
}

.swot-pin__ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pin) 18%, transparent);
}

.swot-pin__ring--selected { box-shadow: 0 0 0 3px var(--pin); }

/* An open-area challenge at the hunt's centre: a dashed ring, as it isn't a place to walk to. */
.swot-pin__ring--anywhere { border: 2px dashed var(--pin); }

.swot-pin__body {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 3px solid var(--color-white);
    border-radius: 999px;
    background: var(--pin);
    color: var(--color-white);
    box-shadow: #181C2E33 0 4px 10px;
}

.swot-pin__ring--find, .swot-pin__body--find { --pin: var(--color-find); }
.swot-pin__ring--brain, .swot-pin__body--brain { --pin: var(--color-brain); }
.swot-pin__ring--snap, .swot-pin__body--snap,
.swot-pin__ring--video, .swot-pin__body--video { --pin: var(--color-snap); }
.swot-pin__ring--finish, .swot-pin__body--finish { --pin: var(--color-ink); }
.swot-pin__ring--locked, .swot-pin__body--locked { --pin: var(--color-locked); }
/* The play area's centre and the start point (host console); the start also on the hunt card's preview map. */
.swot-pin__ring--start, .swot-pin__body--start { --pin: var(--color-primary); }
.swot-pin__ring--area, .swot-pin__body--area { --pin: var(--color-ink-700); }
.swot-pin__ring--done { --pin: var(--color-primary); }
.swot-pin__body--done { --pin: var(--color-white); color: var(--color-primary); border-color: var(--color-primary); }

.swot-pin--corner { gap: 0; }

/* Taps go through to the map (the area picker's centre and start pins while the host draws: a tap there adds a corner). */
.swot-pin--pass-through, .swot-pin--pass-through * { pointer-events: none; }

/* The hunt card's preview (owner, 28 Nov): a challenge place with nothing about it, just a "?" in the app's ink. */
.swot-pin--place { gap: 0; }

.swot-place {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid var(--color-white);
    border-radius: 999px;
    background: var(--color-ink-700);
    color: var(--color-white);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    box-shadow: #181C2E33 0 2px 6px;
}

/* A corner of a drawn play area (host console): small, numbered, draggable. */
.swot-corner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--color-white);
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
    box-shadow: #181C2E33 0 2px 6px;
}

.swot-pin__label {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-ink-700);
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    white-space: nowrap;
    box-shadow: #181C2E1F 0 2px 6px;
}

.swot-pin__label--done { color: var(--color-primary); }

/* A label that would overlap another at this zoom (SwotMap.razor.js) keeps its space so the pin doesn't move, and shows
   again when the map zooms in or the pin is hovered or focused. */
.swot-pin__label--hidden { visibility: hidden; }
.swot-pin:hover, .swot-pin:focus-visible { z-index: 2; }
.swot-pin:hover .swot-pin__label--hidden, .swot-pin:focus-visible .swot-pin__label--hidden { visibility: visible; }

/* Taps go through the dot and its halo to a pin underneath (screenshot shoot, 28 Nov: a pin under the dot did nothing). */
.swot-me { position: relative; width: 22px; height: 22px; pointer-events: none; }

.swot-me__halo {
    position: absolute;
    inset: -22px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.swot-me__dot {
    position: absolute;
    inset: 0;
    border: 3px solid var(--color-white);
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: #181C2E40 0 2px 6px;
}

.maplibregl-ctrl-attrib { font-family: var(--font-sans), system-ui, sans-serif; font-size: 10px; }

/* Map controls stay inside the safe area; the map itself stays full-bleed. Pages whose map reaches the
   bottom of the screen move the bottom controls themselves (LiveMap puts the attribution under its filters). */
.maplibregl-ctrl-top-left,
.maplibregl-ctrl-top-right { top: var(--safe-top); }
.maplibregl-ctrl-top-left,
.maplibregl-ctrl-bottom-left { left: var(--safe-left); }
.maplibregl-ctrl-top-right,
.maplibregl-ctrl-bottom-right { right: var(--safe-right); }

.swot-pin--team { gap: 0; }

/* A team on the host's live map: a dot in the team's colour with its number. Muted once the team has stopped moving. */
.swot-team {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 3px solid var(--color-white);
    border-radius: 999px;
    color: var(--color-white);
    font-size: 13px;
    font-weight: 700;
    box-shadow: #181C2E55 0 2px 6px;
}

.swot-team--idle {
    opacity: 0.6;
    filter: grayscale(0.5);
}

/* A quiet team's last known spot: no location for 30 minutes. Fainter than idle, with a dashed grey ring. */
.swot-team--quiet {
    opacity: 0.5;
    filter: grayscale(0.7);
    border-style: dashed;
    border-color: var(--color-ink-500);
    box-shadow: none;
}
