/* GTA VI map - shared by the panel (/gta-vi/map) and games.tildrix.dev (/gta-map). The page sets the colours:
   --gta-border, --gta-muted, --gta-tile (group headers), --gta-accent (hover, buttons). */
/* Leaflet gives its controls z-index 1000 - the same as the sticky header of the site, so they came out over the
   language menu. Its layers stay inside the map. */
.leaflet-container {isolation: isolate;}
.gta-map-layout {display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; height: calc(100vh - 210px); min-height: 520px;}
.gta-map-side {display: flex; flex-direction: column; min-height: 0;}
.gta-map-side-body {overflow-y: auto; flex: 1 1 auto; min-height: 0;}
.gta-map {border-radius: 14px; overflow: hidden; background: #0f1724; border: 1px solid var(--gta-border); min-height: 0; font: inherit;}
.gta-map-tools {display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--gta-border);}
.gta-kind-group {padding: .45rem 1rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gta-muted); background: var(--gta-tile); border-bottom: 1px solid var(--gta-border); display: flex; justify-content: space-between; align-items: center; gap: .5rem;}
.gta-kind-group button {font: inherit; font-size: .72rem; font-weight: 600; padding: 0 .3rem; text-transform: none; letter-spacing: 0; border: 0; background: none; color: var(--gta-accent); text-decoration: underline; cursor: pointer;}
.gta-kind {display: flex; align-items: center; gap: .5rem; padding: .3rem 1rem; cursor: pointer; font-size: .88rem; margin: 0; border-bottom: 1px solid color-mix(in srgb, var(--gta-border) 50%, transparent);}
.gta-kind:hover {background: color-mix(in srgb, var(--gta-accent) 8%, transparent);}
.gta-kind label {display: flex; align-items: center; gap: .5rem; flex: 1 1 auto; min-width: 0; cursor: pointer; margin: 0;}
.gta-kind input {flex: none; margin: 0; width: 1rem; height: 1rem; accent-color: var(--gta-accent);}
.gta-kind-link {flex: none; padding: 0 .25rem; color: var(--gta-muted); font-weight: 700; text-decoration: none;}
.gta-kind-link:hover {color: var(--gta-accent);}
.gta-kind-icon {width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid var(--c); flex: none;}
.gta-kind-name {flex: 1 1 auto; min-width: 0;}
.gta-kind-count {font-size: .75rem; color: var(--gta-muted); font-variant-numeric: tabular-nums; white-space: nowrap;}
.gta-kind-count.complete {color: #2fbf71; font-weight: 600;}
.gta-search-results {list-style: none; margin: .5rem 0 0; padding: 0; max-height: 240px; overflow-y: auto; border-bottom: 1px solid var(--gta-border);}
.gta-search-results button {display: block; width: 100%; text-align: left; border: 0; background: none; color: inherit; padding: .35rem 1rem; font: inherit; font-size: .85rem; cursor: pointer;}
.gta-search-results button:hover {background: color-mix(in srgb, var(--gta-accent) 10%, transparent);}
.gta-no-results {padding: .5rem 1rem; font-size: .85rem;}
.gta-muted {color: var(--gta-muted);}
.gta-error {color: #ff6b6b; font-size: .85rem; padding: .75rem 1rem; margin: 0;}
.gta-popup .gta-error {padding: .35rem 0 0;}
.gta-pin-box {display: flex; align-items: center; justify-content: center;}
.gta-pin {position: relative; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
    background: color-mix(in srgb, var(--c) 35%, #10131c); border: 2px solid var(--c); box-shadow: 0 1px 4px rgba(0, 0, 0, .6);}
.gta-pin.found {opacity: .45; filter: grayscale(.7); border-style: dashed;}
.gta-pin.found::after {content: '✓'; position: absolute; right: -5px; bottom: -5px; width: 14px; height: 14px; border-radius: 50%; background: #2fbf71; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700;}
/* Far out the pins are dots - 1500 emoji at once are one blob. */
.gta-far .gta-pin {width: 9px; height: 9px; font-size: 0; border-width: 1px; background: var(--c); box-shadow: none;}
.gta-far .gta-pin.found::after {display: none;}
.gta-district {display: inline-block; color: rgba(255, 255, 255, .72); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; text-shadow: 0 1px 3px #000; pointer-events: none; transform: translate(-50%, -50%);}
.gta-popup {min-width: 220px; max-width: 280px; color: #1b1f2a;}
/* The photo's box has its size before the photo loads - otherwise the popup grows after Leaflet moved the map for it and
   its top ends up cut off (GTA VI photos are 16:9 screenshots). */
.gta-popup-photo {display: block; cursor: zoom-in;}
.gta-popup img {width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin: .35rem 0; display: block; background: #e7e9ee;}
.gta-popup-credit {margin: -.2rem 0 .35rem; font-size: .68rem; color: #8a8fa0; text-align: right;}
.gta-popup img:has(+ .gta-popup-credit) {margin-bottom: .3rem;}
.gta-popup-photo:has(+ .gta-popup-credit) img {margin-bottom: .3rem;}
.gta-popup-type {font-size: .75rem; color: #5f6675;}
.gta-popup-name {font-weight: 700;}
.gta-popup-desc {font-size: .82rem; margin: .25rem 0;}
.gta-found-button {margin-top: .35rem; font: inherit; font-size: .82rem; font-weight: 600; padding: .3rem .7rem; border-radius: 8px; border: 1px solid #3b6fe0; background: #fff; color: #2853b3; cursor: pointer;}
.gta-found-button.is-found {background: #2fbf71; border-color: #2fbf71; color: #fff;}
.gta-credit {font-size: .75rem; color: var(--gta-muted);}
/* Progress of a category: a thin bar under its name once something is found; complete = green. */
.gta-kind-bar {display: block; height: 3px; margin-top: 3px; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, var(--gta-border) 85%, transparent);}
.gta-kind-bar i {display: block; height: 100%; background: var(--gta-accent); border-radius: 2px;}
.gta-kind.is-complete .gta-kind-bar i {background: #2fbf71;}
/* Small actions of the popup (copy link, wrong position) and what replaces them. */
.gta-popup-actions {display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin-top: .5rem;}
.gta-popup-actions button {border: 0; background: none; padding: 0; font: inherit; font-size: .78rem; color: #2853b3; text-decoration: underline; cursor: pointer;}
.gta-popup-actions .gta-report-send {padding: .25rem .7rem; border-radius: 8px; background: #2853b3; color: #fff; text-decoration: none; font-weight: 600;}
.gta-popup-actions button:disabled {opacity: .5; cursor: default;}
.gta-popup-note {margin-top: .5rem; font-size: .8rem; font-weight: 600; color: #1f7a4a;}
.gta-popup-note.gta-error {color: #c0392b; padding: 0;}
.gta-popup-link {display: block; width: 100%; margin-top: .5rem; font: inherit; font-size: .78rem; padding: .25rem .4rem; border: 1px solid #c5cad6; border-radius: 6px;}
.gta-report label {display: block; margin: .5rem 0 0; font-size: .8rem; color: #3c4252;}
.gta-report textarea {display: block; width: 100%; margin-top: .25rem; font: inherit; font-size: .82rem; padding: .3rem .4rem; border: 1px solid #c5cad6; border-radius: 6px; resize: vertical; color: #1b1f2a; background: #fff;}
@media (max-width: 991.98px) {
    .gta-map-layout {grid-template-columns: 1fr; height: auto;}
    .gta-map {height: 68vh; order: -1;}
    .gta-map-side-body {max-height: 60vh;}
}
/* "Nearest" (map.js): a list over the map, a pulse where "here" is. */
.gta-nearest {position: absolute; z-index: 950; right: 10px; top: 96px; width: min(300px, calc(100% - 20px)); max-height: min(60%, 420px); overflow-y: auto;
    background: var(--gta-tile, #1f1833); border: 1px solid var(--gta-border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0, 0, 0, .55); animation: gta-fade-up .2s ease;}
.gta-nearest[hidden] {display: none;}
.gta-nearest-head {display: flex; justify-content: space-between; align-items: center; padding: .5rem .8rem; font-weight: 700; font-size: .85rem; border-bottom: 1px solid var(--gta-border);}
.gta-nearest-head button {border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 .2rem;}
.gta-nearest ol {list-style: none; margin: 0; padding: .25rem 0;}
.gta-nearest li button {display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; font-size: .85rem; padding: .35rem .8rem; cursor: pointer;}
.gta-nearest li button:hover {background: color-mix(in srgb, var(--gta-accent) 12%, transparent);}
.gta-nearest-arrow {width: 1.1rem; text-align: center; font-weight: 700; color: var(--gta-accent); flex: none;}
.gta-nearest-name {flex: 1; min-width: 0;}
.gta-nearest p {margin: 0; padding: .7rem .8rem; font-size: .85rem;}
.gta-here {position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--gta-accent); animation: gta-here 1.3s ease-out 2 forwards; pointer-events: none;}
@keyframes gta-here {from {transform: scale(.3); opacity: 1;} to {transform: scale(2.2); opacity: 0;}}
/* Motion: pins pop in with a delay of their own (map.js, --d), a found one bounces with its check, popups grow from their
   tip, bars fill up. Off for people who ask the system for less motion. */
.gta-pin {animation: gta-pin-in .32s cubic-bezier(.2, .9, .3, 1.35) backwards; animation-delay: var(--d, 0ms); transition: transform .15s ease, box-shadow .15s ease;}
.gta-pin-box:hover .gta-pin {transform: scale(1.18); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), 0 2px 8px rgba(0, 0, 0, .6);}
.gta-pin.pop {animation: gta-pin-pop .5s cubic-bezier(.2, .9, .3, 1.5);}
.gta-pin.pop.found::after {animation: gta-check-in .4s .12s cubic-bezier(.2, .9, .3, 1.6) backwards;}
@keyframes gta-pin-in {from {transform: scale(.2); opacity: 0;}}
@keyframes gta-pin-pop {0% {transform: scale(1);} 35% {transform: scale(1.45);} 100% {transform: scale(1);}}
@keyframes gta-check-in {from {transform: scale(0) rotate(-90deg);}}
.leaflet-popup-content-wrapper {transform-origin: 50% 100%; animation: gta-popup-in .22s cubic-bezier(.2, .9, .3, 1.25);}
.leaflet-popup-tip-container {animation: gta-fade-in .22s ease;}
@keyframes gta-popup-in {from {transform: translateY(6px) scale(.88); opacity: 0;}}
@keyframes gta-fade-in {from {opacity: 0;}}
.gta-popup-note, .gta-report {animation: gta-fade-up .25s ease;}
@keyframes gta-fade-up {from {opacity: 0; transform: translateY(4px);}}
.gta-search-results:not([hidden]) {animation: gta-fade-up .18s ease;}
.gta-kind-bar i {transition: width .6s cubic-bezier(.2, .8, .2, 1);}
@media (prefers-reduced-motion: reduce) {
    .gta-pin, .gta-pin.pop, .gta-pin.pop.found::after, .leaflet-popup-content-wrapper, .leaflet-popup-tip-container, .gta-popup-note, .gta-report,
    .gta-search-results:not([hidden]), .gta-nearest {animation: none;}
    .gta-here {animation: none; opacity: .8;}
    .gta-pin, .gta-kind-bar i {transition: none;}
}
