/* The spots map on /spots (Pages/Spots/Index.cshtml, js/spots-map.js): the sea, the land, the pins coloured by today's
   rating, the quick read, and "Best right now" beside it. On a wide screen the map fills the band and the words sit on
   its sea at the left; below 1024 px the words, the map, then the best spots. */

/* the rating colours (pins, dots, the read's rating) */
.sp-pin--good, .sp-dot--good, .sp-tone--good { --tone: #3DDC97; }
.sp-pin--fair, .sp-dot--fair, .sp-tone--fair { --tone: #7FD3E3; }
.sp-pin--big, .sp-dot--big, .sp-tone--big { --tone: #FF9B7A; }
.sp-pin--choppy, .sp-dot--choppy, .sp-tone--choppy { --tone: #F6C66B; }
.sp-pin--small, .sp-dot--small, .sp-tone--small,
.sp-pin--flat, .sp-dot--flat, .sp-tone--flat { --tone: #A3BCC3; }
.sp-pin--none, .sp-dot--none, .sp-tone--none { --tone: rgba(255, 255, 255, 0.6); }

.sp-atlas { --sea-1: #0E5A6A; --sea-2: #083E4A; --sea-3: #042630; position: relative; display: grid; overflow: hidden; background: var(--sea-3); color: #FFFFFF; }

/* ---- the map */
.sp-map { position: relative; overflow: hidden; background: radial-gradient(115% 85% at 60% 42%, var(--sea-1) 0%, var(--sea-2) 46%, var(--sea-3) 100%); -webkit-tap-highlight-color: transparent; }
.sp-map::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 140px rgba(2, 18, 24, 0.5); }
.sp-map__svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.sp-map__grid line { stroke: rgba(207, 234, 240, 0.075); stroke-width: 1; stroke-dasharray: 2 7; }
.sp-map__glow { fill: none; stroke: rgba(127, 211, 227, 0.13); stroke-width: 10; stroke-linejoin: round; }
.sp-map__land { fill: #1B6B7A; stroke: rgba(178, 233, 243, 0.6); stroke-width: 1; stroke-linejoin: round; }

.sp-map__lats { position: absolute; top: 0; right: 16px; bottom: 0; z-index: 2; pointer-events: none; }
.sp-map__lats span { position: absolute; top: 0; right: 0; margin-top: -7px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; color: rgba(207, 234, 240, 0.34); transition: opacity 0.2s; }

.sp-map__pins { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* a spot: a dot in its rating's colour, a 36 px target round it, its name and size beside it once the map is close */
.sp-pin { position: absolute; left: 0; top: 0; z-index: 1; display: block; width: 36px; height: 36px; margin: -18px 0 0 -18px; padding: 0; border: 0; background: none; color: #FFFFFF; font: inherit; text-decoration: none; cursor: pointer; pointer-events: auto; will-change: transform; }
.sp-pin:hover, .sp-pin.is-open, .sp-pin.is-hot, .sp-pin:focus-visible { z-index: 2; }
.sp-pin:focus-visible { outline: none; }
.sp-pin__dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--tone);
    box-shadow: 0 0 0 2px rgba(4, 30, 37, 0.92), 0 0 0 6px color-mix(in srgb, var(--tone) 26%, transparent), 0 0 18px color-mix(in srgb, var(--tone) 70%, transparent); transition: transform 0.18s ease; }
.sp-pin--none .sp-pin__dot { background: rgba(4, 30, 37, 0.92); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 0 0 2px rgba(4, 30, 37, 0.92); }
.sp-pin--good .sp-pin__dot::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--tone); border-radius: 50%; animation: sp-pulse 2.6s ease-out infinite; }
@keyframes sp-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.8); opacity: 0; } }
.sp-pin:hover .sp-pin__dot, .sp-pin.is-open .sp-pin__dot, .sp-pin.is-hot .sp-pin__dot { transform: scale(1.35); }
.sp-pin:focus-visible .sp-pin__dot { outline: 2px solid #FFFFFF; outline-offset: 4px; }

.sp-pin__label { position: absolute; left: 30px; top: 50%; display: none; align-items: baseline; gap: 7px; padding: 5px 11px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px;
    background: rgba(4, 30, 37, 0.88); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28); font-size: 12.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; transform: translateY(-50%); }
.sp-pin__label b { color: var(--tone); font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-pin--west .sp-pin__label { left: auto; right: 30px; }
.is-close .sp-pin__label, .sp-pin.is-hot .sp-pin__label { display: inline-flex; }

/* spots that would touch: one round pin with the count, its ring in the best one's colour */
.sp-pin--group { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
.sp-pin__count { position: absolute; inset: 4px; display: grid; place-items: center; border: 2px solid var(--tone); border-radius: 50%; background: rgba(4, 30, 37, 0.9);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 18%, transparent), 0 0 24px color-mix(in srgb, var(--tone) 45%, transparent); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; transition: transform 0.18s ease; }
.sp-pin--group:hover .sp-pin__count, .sp-pin--group.is-open .sp-pin__count, .sp-pin--group.is-hot .sp-pin__count { transform: scale(1.1); }
.sp-pin--group:focus-visible .sp-pin__count { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.sp-pin--group .sp-pin__label { left: 40px; }
.sp-pin--group.sp-pin--west .sp-pin__label { left: auto; right: 40px; }

/* you, after "Near me" */
.sp-you { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; }
.sp-you__dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 3px solid #FFFFFF; border-radius: 50%; background: #2F80ED; box-shadow: 0 0 0 6px rgba(47, 128, 237, 0.28), 0 4px 12px rgba(0, 0, 0, 0.4); }
.sp-you__label { position: absolute; left: 13px; top: -8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }

/* the buttons along the top and the line that says what happened */
.sp-map__tools { position: absolute; top: 14px; right: 14px; z-index: 4; display: flex; gap: 8px; }
.sp-map__tool { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
    background: rgba(4, 30, 37, 0.74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.sp-map__tool:hover { background: rgba(8, 62, 74, 0.92); border-color: rgba(127, 211, 227, 0.55); }
.sp-map__tool .ag-icon { color: var(--ag-sky); }
.sp-map__tool[hidden] { display: none; }
.sp-map__note { position: absolute; left: 50%; bottom: 16px; z-index: 4; margin: 0; padding: 9px 15px; border-radius: 999px; background: rgba(4, 30, 37, 0.9); color: var(--ag-on-deep); font-size: 14px; font-weight: 600; white-space: nowrap; transform: translateX(-50%); }
.sp-map__note[hidden] { display: none; }

/* ---- the quick read: beside the pin, or as a card at the foot of the map on a phone */
.sp-map__card { position: absolute; left: 0; top: 0; z-index: 5; width: 296px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px;
    background: rgba(5, 36, 44, 0.95); -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45); color: #FFFFFF; opacity: 0; translate: 0 6px; transition: opacity 0.16s ease, translate 0.16s ease; }
.sp-map__card.is-in { opacity: 1; translate: 0 0; }
.sp-map__card[hidden] { display: none; }
.sp-map__card.is-sheet { top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-width: 520px; margin: 0 auto; transform: none !important; }

.sp-qc { position: relative; display: block; color: inherit; text-decoration: none; }
.sp-qc__pic { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ag-deep); }
.sp-qc__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sp-qc__pic::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(0deg, rgba(5, 36, 44, 0.92), rgba(5, 36, 44, 0)); }
.sp-qc__stamp { position: absolute; left: 12px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.sp-qc__stamp .ag-badge__dot { width: 7px; height: 7px; background: var(--ag-green); }
.sp-qc__body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; }
.sp-qc__name { font-family: var(--ag-font-display); font-size: 17px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.sp-qc__where { font-size: 13px; color: rgba(207, 234, 240, 0.78); }
.sp-qc__now { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sp-qc__now b { font-family: var(--ag-font-display); font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.sp-qc__rating { padding: 3px 10px; border: 1px solid color-mix(in srgb, var(--tone) 42%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--tone) 15%, transparent);
    color: var(--tone); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sp-qc__meta { margin-top: 7px; font-size: 14px; color: var(--ag-on-deep); }
.sp-qc__tide { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13.5px; color: var(--ag-on-deep); }
.sp-qc__tide .ag-icon { flex-shrink: 0; color: var(--ag-sky); }
.sp-qc__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 800; color: var(--ag-sky); }
.sp-qc__go .ag-icon { transition: transform 0.15s; }
.sp-qc:hover .sp-qc__go .ag-icon { transform: translateX(3px); }
.sp-qc__list { display: flex; flex-direction: column; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sp-qc__row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: #FFFFFF; font-size: 14px; font-weight: 700; text-decoration: none; }
.sp-qc__row:hover { color: var(--ag-sky); }
.sp-qc__rowname small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: rgba(207, 234, 240, 0.7); }
.sp-qc__row b { color: var(--ag-on-deep-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-qc__hint { margin-top: 10px; font-size: 12.5px; color: rgba(207, 234, 240, 0.62); }
.sp-qc__close { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(4, 30, 37, 0.78); color: #FFFFFF; cursor: pointer; }
.is-sheet .sp-qc:not(.sp-qc--group) { display: grid; grid-template-columns: 116px 1fr; }
.is-sheet .sp-qc__pic { height: 100%; min-height: 132px; aspect-ratio: auto; }
.is-sheet .sp-qc__pic::after { display: none; }
.is-sheet .sp-qc__stamp { display: none; }
.is-sheet .sp-qc__body { padding: 13px 46px 13px 14px; }
.is-sheet .sp-qc__name { font-size: 16px; }
.is-sheet .sp-qc__now { margin-top: 8px; }
.is-sheet .sp-qc__now b { font-size: 23px; }
.is-sheet .sp-qc__meta, .is-sheet .sp-qc__tide { font-size: 13px; }
.is-sheet .sp-qc__go { margin-top: 9px; font-size: 13.5px; }

/* ---- the words and "Best right now" */
.sp-atlas__date { white-space: nowrap; }
.sp-atlas__title { margin: 14px 0 0; font-family: var(--ag-font-display); font-size: clamp(36px, 4.4vw, 64px); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; }
.sp-atlas__lead { max-width: 38ch; margin: 18px 0 0; font-size: clamp(16px, 1.3vw, 19px); color: var(--ag-on-deep); text-wrap: pretty; }
.sp-atlas__how { display: block; margin-top: 8px; font-size: 0.9em; color: rgba(207, 234, 240, 0.7); }
.sp-atlas__how--touch { display: none; }
@media (hover: none) { .sp-atlas__how--mouse { display: none; } .sp-atlas__how--touch { display: block; } }

.sp-best__head { margin: 0 0 12px; font-family: var(--ag-font-body); font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ag-sky-2); }
.sp-best { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-best__row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
    background: rgba(255, 255, 255, 0.06); color: #FFFFFF; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.sp-best__row:hover, .sp-best__row:focus-visible { border-color: rgba(127, 211, 227, 0.45); background: rgba(255, 255, 255, 0.1); transform: translateX(3px); }
.sp-best__name { min-width: 0; }
.sp-best__name b { display: block; overflow: hidden; font-size: 15.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.sp-best__name small { display: block; margin-top: 1px; font-size: 12.5px; color: rgba(207, 234, 240, 0.72); }
.sp-best__size { font-family: var(--ag-font-display); font-size: 18px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-best__size small { display: block; margin-top: 2px; font-family: var(--ag-font-body); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone); }
.sp-dot { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent); }
.sp-dot--none { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.sp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 12.5px; font-weight: 600; color: rgba(207, 234, 240, 0.75); }
.sp-legend li { display: inline-flex; align-items: center; gap: 7px; }

/* ---- every spot, below the map */
.sp-every.ag-section { padding-top: 56px; }
.sp-every__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 26px; }
.sp-every__title { margin: 0; font-family: var(--ag-font-display); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.02em; color: var(--ag-ink); }
.sp-every__note { margin: 0; font-size: 15px; color: var(--ag-muted); }

/* ---- a wide screen: the map fills the band, the words on its sea at the left */
@media (min-width: 1024px) {
    .sp-atlas { min-height: clamp(660px, calc(100vh - var(--ag-header-h)), 900px); align-content: center; }
    .sp-map { position: absolute; inset: 0; }
    .sp-map::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(4, 38, 48, 0.88) 0%, rgba(4, 38, 48, 0.5) 30%, rgba(4, 38, 48, 0) 52%); }
    .sp-atlas__wrap { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 56px; pointer-events: none; }
    .sp-atlas__wrap > * { width: min(440px, 34vw); pointer-events: auto; }
    .sp-atlas__wrap > .sp-atlas__text { width: min(540px, 42vw); }
    .sp-atlas__best { margin-top: 34px; }
    .sp-map__note { left: auto; right: 16px; transform: none; }
    /* the round pins carry their region's name over the whole country; there is room on a wide screen */
    .sp-pin--group .sp-pin__label { display: inline-flex; }
}

/* ---- a phone or a tablet: the words, the map, then the best spots */
@media (max-width: 1023.98px) {
    .sp-atlas { display: flex; flex-direction: column; }
    .sp-atlas__wrap { display: contents; }
    .sp-atlas__text { order: 1; padding: 30px var(--ag-gutter) 22px; }
    .sp-map { order: 2; height: clamp(440px, 124vw, 720px); }
    .sp-atlas__best { order: 3; padding: 24px var(--ag-gutter) 36px; }
    .sp-map::after { box-shadow: inset 0 0 80px rgba(2, 18, 24, 0.45); }
}
@media (max-width: 380px) {
    .sp-map__tool { padding: 0 12px; font-size: 13px; }
    .sp-map__card.is-sheet { right: 8px; left: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .sp-pin--good .sp-pin__dot::after { animation: none; display: none; }
    .sp-map__card, .sp-best__row, .sp-pin__dot, .sp-pin__count { transition: none; }
}

/* the beach's latest call (SurfChecks) in the quick read and on the cards */
.sp-pin--danger, .sp-dot--danger, .sp-tone--danger { --tone: #E5484D; }
.sp-qc__beach { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 13.5px; color: var(--ag-on-deep); }
.sp-qc__beach b { color: #FFFFFF; }
.sp-card__beach { display: flex; align-items: center; gap: 7px; grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; color: var(--ag-text); }
.sp-card__beach .sp-dot { box-shadow: none; }
.sp-card__beach b { color: var(--ag-ink); }

/* "Add your spot" on the map's first screen (2026-11-03) */
.sp-atlas__add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 22px 0 0; }
.sp-atlas__add .ag-btn .ag-icon { margin-right: 6px; }
.sp-atlas__add span { max-width: 30ch; color: var(--ag-on-deep); font-size: 14px; }
.sp-map__tool--add { text-decoration: none; color: #FFFFFF; }
.sp-every__add { display: inline-flex; align-items: center; gap: 6px; color: var(--ag-cyan-ink); font-weight: 800; font-size: 15px; text-decoration: none; }
.sp-every__add:hover { text-decoration: underline; }
@media (max-width: 520px) { .sp-map__tool--add span { display: none; } .sp-map__tool--add { padding: 0 11px; } }
