/* GTA 6 map page (/gta6/map). Loads after /css/gta6.css (section chrome) and /css/map.css (engine), and turns the
   engine's HUD styling into the section's sunset-on-ink look. Page layout: header + full-height map app, no footer. */
:root {
    --bg-dark: #0c0d1b;
    --bg-panel: rgba(17, 17, 36, 0.92);
    --border-color: rgba(229, 221, 255, 0.14);
    --accent-primary: #ff8fb1;
    --accent-secondary: #ffb36b;
    --text-main: #e5ddff;
    --text-muted: #a9a2c9;
    --font-tech: 'Inter', system-ui, sans-serif;
    --font-display: 'Oswald', 'Arial Narrow', sans-serif;
}

html, body.g6-map { height: 100%; }
body.g6-map { display: flex; flex-direction: column; overflow: hidden; min-height: 0; font-family: var(--g6-body); }
body.g6-map .g6-header { position: relative; z-index: 2000; flex-shrink: 0; }
body.g6-map .g6-drawer { z-index: 2100; }
body.g6-map #root { flex: 1; min-height: 0; height: auto; width: auto; }
body.g6-map #map { background: #2c68a6; } /* the background's own ocean colour while tiles stream */

/* ---- sidebar ------------------------------------------------------------------------------------------------ */
.g6-map .sidebar {
    top: 14px; left: 14px; bottom: 14px; width: 360px; max-height: none;
    border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden;
    box-shadow: 0 18px 50px rgba(5, 5, 14, 0.55);
}
.g6-map .sidebar.hidden { transform: translateX(-420px); }
.g6-map .sidebar-header { padding: 16px 18px 12px; background: linear-gradient(160deg, rgba(255, 111, 160, 0.16), rgba(255, 166, 107, 0.06) 55%, transparent); border-bottom: 1px solid var(--border-color); }
.g6-map .sidebar-header h1 { font: 700 26px/1 var(--font-display); text-transform: uppercase; color: var(--g6-cream); margin: 4px 0 6px; padding: 0; border: 0; text-shadow: none; letter-spacing: 0.01em; }
.g6-map .sidebar-header .g6-kicker { margin: 0; font-size: 11px; }
.g6-map .g6-map-stats { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; display: block; }
.g6-map .g6-map-stats strong { color: var(--g6-text); }
.g6-map .sidebar-content { padding: 12px 14px 18px; overflow-y: auto; flex: 1; }
.g6-map .filter-section { margin-bottom: 18px; }
.g6-map .filter-section h3 { font: 600 15px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--g6-cream); margin: 0 0 8px; }
.g6-map .filter-section h3 small { font: 500 11px/1 var(--g6-body); color: var(--text-muted); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.g6-map .g6-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0 0 10px; }

/* search */
.g6-search { position: relative; margin-bottom: 14px; }
.g6-search input {
    width: 100%; height: 40px; padding: 0 36px 0 38px; border-radius: 999px; border: 1px solid var(--border-color);
    background: rgba(229, 221, 255, 0.06); color: var(--g6-text); font: 500 14px/1 var(--g6-body); outline: none; user-select: text;
}
.g6-search input:focus { border-color: var(--accent-primary); background: rgba(229, 221, 255, 0.1); }
.g6-search svg { position: absolute; left: 13px; top: 11px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.g6-search button { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(229, 221, 255, 0.12); color: var(--g6-text); cursor: pointer; display: none; }
.g6-search.has-value button { display: block; }

/* engine filter grid, re-skinned */
.g6-map .group-header { color: var(--accent-secondary); font: 600 11px/1.2 var(--g6-body); letter-spacing: 0.1em; }
.g6-map .group-header:hover { background: rgba(255, 143, 177, 0.12); color: var(--accent-primary); }
/* sidebar categories (Kirill 2026-11-20): the icons are what players look for. Big pins, small plain names, no item
   boxes or coloured left stripe; hidden categories fade out. Icon sizes are set by map-page.js (fitSidebarIcons). */
.g6-map .filter-grid { gap: 0 6px; }
.g6-map .filter-item { background: transparent; border: 0; border-radius: 8px; padding: 3px 4px; gap: 8px; min-height: 38px; font: 500 11px/1.15 var(--g6-body); }
.g6-map .filter-item.active { border-left: 0; }
.g6-map .filter-item:hover { background: rgba(229, 221, 255, 0.07); border-color: transparent; }
.g6-map .filter-item.inactive { opacity: 0.35; filter: grayscale(1); }
.g6-map .filter-item .marker-icon-img { flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55)); }
.g6-map .filter-item label { font: 500 11px/1.15 var(--g6-body); text-transform: none; letter-spacing: 0; color: var(--g6-text); cursor: pointer; flex: 1; min-width: 0;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g6-map .filter-item .count { font-size: 10px; font-weight: 600; color: var(--g6-muted); }
.g6-map .filter-control-btn, .g6-chipbtn {
    flex: 1; height: 32px; border-radius: 999px; border: 1px solid var(--border-color); background: rgba(229, 221, 255, 0.05);
    color: var(--g6-text); font: 600 12px/1 var(--g6-body); cursor: pointer;
}
.g6-map .filter-control-btn:hover, .g6-chipbtn:hover { border-color: var(--accent-primary); color: #fff; }

/* known-but-unplaced list + search results */
.g6-selects { display: flex; gap: 8px; margin-bottom: 10px; }
.g6-selects select {
    flex: 1; min-width: 0; height: 34px; border-radius: 10px; border: 1px solid var(--border-color); background: #17172e; color: var(--g6-text);
    font: 500 12.5px/1 var(--g6-body); padding: 0 8px;
}
.g6-loclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.g6-loc { display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 9px; align-items: center; padding: 7px 9px; border-radius: 10px; background: rgba(229, 221, 255, 0.04); border: 1px solid transparent; }
.g6-loc.is-placed { cursor: pointer; }
.g6-loc.is-placed:hover { border-color: rgba(255, 143, 177, 0.45); background: rgba(255, 143, 177, 0.08); }
.g6-loc .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(12, 13, 27, 0.9); grid-row: span 2; }
.g6-loc .name { font: 600 13px/1.25 var(--g6-body); color: var(--g6-text); overflow: hidden; text-overflow: ellipsis; }
.g6-loc .meta { grid-column: 2 / span 2; font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.g6-loc .tag { font: 700 9.5px/1 var(--g6-body); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.g6-loc .tag-placed { background: var(--g6-sunset); color: #1a0d1a; }
.g6-loc .tag-unplaced { background: rgba(229, 221, 255, 0.08); color: var(--text-muted); }
.g6-more-btn { margin-top: 8px; width: 100%; }
.g6-empty-note { font-size: 12.5px; color: var(--text-muted); padding: 6px 2px; }

.g6-map input[type="range"] { width: 100%; accent-color: var(--accent-primary); }
.g6-map .g6-credit-block { font-size: 11.5px; line-height: 1.55; color: var(--text-muted); }
.g6-map .g6-credit-block a { color: var(--g6-pink); }

/* ---- map overlays ------------------------------------------------------------------------------------------- */
.g6-map .toggle-sidebar { left: 386px; top: 18px; border-radius: 12px; clip-path: none; background: rgba(17, 17, 36, 0.92); border-color: var(--border-color); color: var(--g6-cream); }
.g6-map .toggle-sidebar:hover { background: var(--accent-primary); color: #1a0d1a; }
.g6-map .toggle-sidebar.sidebar-hidden { left: 14px; }
.g6-map .control-btn { border-radius: 12px; }
.g6-map .loading-overlay { background: var(--bg-dark); }
.g6-map .loader { border-color: rgba(229, 221, 255, 0.15); border-top-color: var(--accent-primary); }
.g6-attrib {
    position: absolute; right: 10px; bottom: 8px; z-index: 900; max-width: min(640px, calc(100% - 20px));
    padding: 4px 10px; border-radius: 8px; background: rgba(12, 13, 27, 0.72); color: #d9d2f5;
    font: 500 11px/1.45 var(--g6-body); text-align: right; pointer-events: auto; user-select: text;
}
.g6-attrib a { color: var(--g6-pink); text-decoration: none; }
.g6-attrib a:hover { text-decoration: underline; }
/* engine zoom buttons sit bottom-right: lift them above the credit line */
.g6-map .map-controls { bottom: 44px; }

/* engine marker modal / tooltip in the section palette */
.g6-map .me-modal { border-radius: 16px; border-color: var(--border-color); background: #17172e; }
.g6-map .me-modal h2 { font-family: var(--font-display); text-transform: uppercase; color: var(--g6-cream); }

@media (max-width: 768px) {
    .g6-map .sidebar { top: 8px; left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
    .g6-map .toggle-sidebar { left: auto; right: 14px; top: 14px; }
    .g6-map .toggle-sidebar.sidebar-hidden { left: 14px; right: auto; }
    .g6-attrib { font-size: 10px; left: 8px; right: 8px; max-width: none; text-align: left; }
    .g6-map .map-controls { bottom: 64px; }
}

/* ---- crowdsourced markers (suggest.js): CTA, placement, form, pending pins ------------------------------------
   UX defaults picked by the assistant 2026-11-19 (Kirill decides later). */
.g6-add-btn {
    margin-top: 12px; width: 100%; height: 40px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--g6-sunset); color: #1a0d1a; font: 700 14px/1 var(--g6-body); letter-spacing: 0.02em;
    box-shadow: 0 6px 18px rgba(255, 111, 160, 0.28);
}
.g6-add-btn span { font-size: 18px; margin-right: 4px; vertical-align: -1px; }
.g6-add-btn:hover { filter: brightness(1.06); }
.g6-cta-line { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 0 0 10px; }
.g6-linkbtn { border: 0; padding: 0; background: none; color: var(--g6-pink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.g6-linkbtn:hover { color: #fff; }
.g6-loc .g6-placeit { border: 1px solid rgba(255, 143, 177, 0.45); cursor: pointer; font-family: var(--g6-body); }
.g6-loc .g6-placeit:hover { background: rgba(255, 143, 177, 0.18); color: #fff; }

/* your suggestions */
.g6-mine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.g6-mine-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 9px; border-radius: 10px; background: rgba(229, 221, 255, 0.04); border: 1px dashed rgba(255, 143, 177, 0.35); }
.g6-mine-item[role="button"] { cursor: pointer; }
.g6-mine-item[role="button"]:hover { background: rgba(255, 143, 177, 0.08); }
.g6-mine-name { font: 600 13px/1.25 var(--g6-body); color: var(--g6-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g6-mine-status { font: 700 9.5px/1 var(--g6-body); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: rgba(255, 179, 107, 0.16); color: var(--accent-secondary); align-self: center; }
.g6-mine-item.is-approved { border-style: solid; border-color: rgba(124, 242, 154, 0.35); }
.g6-mine-item.is-approved .g6-mine-status { background: rgba(124, 242, 154, 0.15); color: #7cf29a; }
.g6-mine-item.is-rejected .g6-mine-status, .g6-mine-item.is-spam .g6-mine-status { background: rgba(229, 221, 255, 0.08); color: var(--text-muted); }
.g6-mine-meta { grid-column: 1 / -1; font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }

/* floating "Add a marker" on the map */
.g6-add-fab {
    position: absolute; top: 18px; right: 14px; z-index: 950; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px;
    background: var(--g6-sunset); color: #1a0d1a; font: 700 13.5px/1 var(--g6-body); cursor: pointer; box-shadow: 0 8px 24px rgba(5, 5, 14, 0.5);
}
.g6-add-fab span { font-size: 18px; margin-right: 3px; vertical-align: -1px; }
.g6-add-fab:hover { filter: brightness(1.06); }
#map.g6-suggesting .g6-add-fab { display: none; }

/* placement banner */
.g6-place-banner {
    position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 960; display: flex; align-items: center; gap: 12px;
    padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(17, 17, 36, 0.95); border: 1px solid var(--accent-primary);
    color: var(--g6-cream); font: 600 14px/1.2 var(--g6-body); box-shadow: 0 10px 30px rgba(5, 5, 14, 0.55); max-width: calc(100% - 28px);
}
.g6-place-banner[hidden] { display: none; }
.g6-place-cancel { height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-color); background: rgba(229, 221, 255, 0.08); color: var(--g6-text); font: 600 12.5px/1 var(--g6-body); cursor: pointer; flex-shrink: 0; }
.g6-place-cancel:hover { border-color: var(--accent-primary); }

/* pins: the draft and the visitor's own pending markers (DOM overlay over the canvas) */
.g6-pins { position: absolute; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
.g6-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; }
.g6-pin[hidden] { display: none; }
.g6-pin-dot {
    position: absolute; left: -11px; top: -30px; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: var(--pin, #ff8fb1); border: 2px solid #fff; box-shadow: 0 4px 12px rgba(5, 5, 14, 0.6);
}
.g6-pin.is-pending .g6-pin-dot { background: rgba(17, 17, 36, 0.9); border: 2px dashed var(--pin, #ff8fb1); }
.g6-pin.is-draft .g6-pin-dot { animation: g6-pin-drop 0.35s ease-out; }
.g6-pin.is-draft::after {
    content: ""; position: absolute; left: -14px; top: -7px; width: 28px; height: 14px; border-radius: 50%;
    border: 2px solid var(--accent-primary); animation: g6-pin-pulse 1.4s ease-out infinite; pointer-events: none;
}
.g6-pin-label {
    position: absolute; left: 14px; top: -34px; padding: 3px 7px; border-radius: 999px; white-space: nowrap;
    background: rgba(17, 17, 36, 0.92); border: 1px solid var(--border-color); color: var(--g6-cream); font: 700 9.5px/1 var(--g6-body); letter-spacing: 0.08em; text-transform: uppercase;
}
@keyframes g6-pin-drop { from { transform: translateY(-18px) rotate(-45deg); opacity: 0; } to { transform: rotate(-45deg); opacity: 1; } }
@keyframes g6-pin-pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* the form panel */
.g6-suggest {
    position: absolute; top: 70px; right: 14px; z-index: 1002; width: 340px; max-height: calc(100% - 140px); overflow-y: auto;
    background: #17172e; border: 1px solid var(--border-color); border-top: 3px solid var(--accent-primary); border-radius: 16px;
    color: var(--g6-text); box-shadow: 0 18px 50px rgba(5, 5, 14, 0.6); font: 400 13.5px/1.45 var(--g6-body);
}
.g6-suggest[hidden] { display: none; }
.g6-suggest header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 16px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; background: #17172e; z-index: 1; }
.g6-suggest h2 { flex: 1; margin: 0; font: 700 19px/1.1 var(--font-display); text-transform: uppercase; color: var(--g6-cream); letter-spacing: 0.02em; }
.g6-sg-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(229, 221, 255, 0.08); color: var(--g6-text); cursor: pointer; font-size: 13px; }
.g6-sg-x:hover { background: rgba(255, 143, 177, 0.2); }
.g6-sg-form, .g6-sg-sent { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 11px; }
.g6-sg-fields { display: flex; flex-direction: column; gap: 11px; }
.g6-sg-fields[hidden], .g6-sg-file[hidden] { display: none; }
.g6-sg-target { margin: 0; font-size: 13px; color: var(--text-muted); }
.g6-sg-target b { color: var(--g6-text); }
.g6-sg-pos { margin: 0; padding: 7px 10px; border-radius: 10px; background: rgba(255, 143, 177, 0.08); border: 1px dashed rgba(255, 143, 177, 0.4); font-size: 12px; color: var(--g6-pink); }
.g6-sg-field { display: flex; flex-direction: column; gap: 5px; }
.g6-sg-field > span { font: 600 11px/1 var(--g6-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.g6-sg-field select, .g6-sg-field input, .g6-sg-field textarea {
    width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--border-color); background: #0f0f22; color: var(--g6-text);
    font: 500 14px/1.35 var(--g6-body); padding: 9px 10px; outline: none; user-select: text;
}
.g6-sg-field select { height: 40px; }
.g6-sg-field textarea { resize: vertical; min-height: 64px; }
.g6-sg-field select:focus, .g6-sg-field input:focus, .g6-sg-field textarea:focus { border-color: var(--accent-primary); }
.g6-sg-seg { display: flex; gap: 6px; }
.g6-sg-seg label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 999px; border: 1px solid var(--border-color); cursor: pointer; font: 600 12.5px/1 var(--g6-body); }
.g6-sg-seg label:has(input:checked) { border-color: var(--accent-primary); background: rgba(255, 143, 177, 0.12); color: #fff; }
.g6-sg-seg input { accent-color: var(--accent-primary); margin: 0; }
.g6-sg-filebtn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 36px; border-radius: 10px; border: 1px dashed var(--border-color); cursor: pointer; font: 600 12.5px/1 var(--g6-body); color: var(--g6-text); }
.g6-sg-filebtn:hover { border-color: var(--accent-primary); }
.g6-sg-filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.g6-sg-thumb { max-width: 100%; max-height: 140px; border-radius: 8px; border: 1px solid var(--border-color); object-fit: contain; align-self: flex-start; }
.g6-sg-thumb[hidden] { display: none; }
.g6-sg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.g6-sg-check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-muted); cursor: pointer; }
.g6-sg-check input { accent-color: var(--accent-primary); }
.g6-sg-check b { color: var(--g6-text); }
.g6-sg-anon { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.g6-sg-err { margin: 0; padding: 7px 10px; border-radius: 10px; background: rgba(255, 90, 122, 0.12); color: #ff9db0; font-size: 12.5px; }
.g6-sg-err[hidden] { display: none; }
.g6-sg-actions { display: flex; gap: 8px; }
.g6-sg-btn { flex: 1; height: 40px; border-radius: 999px; border: 1px solid var(--border-color); background: rgba(229, 221, 255, 0.05); color: var(--g6-text); font: 700 13.5px/1 var(--g6-body); cursor: pointer; }
.g6-sg-btn:hover { border-color: var(--accent-primary); }
.g6-sg-btn.is-primary { border: 0; background: var(--g6-sunset); color: #1a0d1a; }
.g6-sg-btn:disabled { opacity: 0.6; cursor: progress; }
.g6-sg-fine { margin: 0; font-size: 11.5px; color: var(--text-muted); text-align: center; }
.g6-sg-sent p { margin: 0; color: var(--text-muted); }
.g6-sg-sent .g6-sg-big { font: 600 16px/1.4 var(--g6-body); color: var(--g6-cream); }

/* marker popup additions */
.g6-map .g6-credit-line { font-size: 12.5px; color: var(--text-muted); }
.g6-map .g6-credit-line b { color: var(--g6-pink); }

/* phones: the NitroAds bottom anchor covers the bottom ~100 px, so everything sits at the top */
@media (max-width: 768px) {
    .g6-add-fab { top: 14px; right: 14px; }
    .g6-place-banner { top: 64px; font-size: 13px; white-space: nowrap; }
    .g6-suggest { top: 8px; left: 8px; right: 8px; width: auto; max-height: 58%; }
}
/* approved player screenshots in the marker popup (Kirill 2026-11-20) */
.g6-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0 0 10px; }
.g6-shot { display: block; text-decoration: none; color: var(--g6-muted, #a9a2c9); font-size: 11px; line-height: 1.3; }
.g6-shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid rgba(229, 221, 255, 0.15); margin-bottom: 4px; }
.g6-shot:only-child { grid-column: 1 / -1; }

/* Characters / Missions links in the popup (2026-11-20) */
.g6-missions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 0.85em; }
.g6-missions > span { opacity: 0.7; }
.g6-mlink { background: rgba(164, 180, 236, 0.16); color: #c9d3f5; border: 1px solid rgba(164, 180, 236, 0.4); border-radius: 999px; padding: 3px 10px; font: inherit; cursor: pointer; }
.g6-mlink:hover { background: rgba(164, 180, 236, 0.3); color: #fff; }
.g6-face { float: right; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 0 8px 12px; border: 2px solid rgba(164, 180, 236, 0.6); }

/* Kirill 2026-11-20: no x / y line on the marker card (world metres mean nothing to players; "Copy link" shares a spot) */
#marker-modal .me-coords { display: none; }
