/* ─────────────────────────────────────────────────────────────────────────────
   /* ── MapLibre overrides & custom overlays
   ──────────────────────────────────────────────────────────────────────────────*/

   /* ── MapLibre popup — dark theme ─────────────────────────────────────── */
   .maplibregl-popup-content:has(.lf-guess-btn) {
       padding: 8px 10px;
       background: var(--bg-surface-2);
       color: var(--text-primary);
       border: 1px solid var(--border-light);
       border-radius: 8px;
       box-shadow: 0 4px 16px rgba(0,0,0,0.5);
   }
   .maplibregl-popup-tip {
       border-top-color: var(--bg-surface-2) !important;
   }

   /* Remove default popup margin so the buttons sit tight */
   .maplibregl-popup-content .popup-content {
       margin: 0;
   }

   /* Popup info lines */
   .popup-content .popup-name {
       font-size: 0.95rem;
       margin-bottom: 2px;
   }
   .popup-content .popup-info {
       font-size: 0.8rem;
       color: var(--text-secondary);
       line-height: 1.3;
   }
   .popup-content .popup-info + .popup-info {
       margin-top: 1px;
   }
   .popup-content .popup-actions {
       display: flex;
       gap: 6px;
       margin-top: 6px;
   }

   /* ── "Not here" — teal outline, no glow ─────────────────────────────── */
   .popup-content .lf-not-here-btn {
       flex: 1;
       font-size: 0.8rem;
       background: transparent;
       color: var(--accent-teal);
       border: 1px solid var(--accent-teal);
       border-radius: 4px;
       padding: 2px 6px;
       cursor: pointer;
       box-shadow: none !important;
       outline: none !important;
   }
   .popup-content .lf-not-here-btn:hover {
       background: rgba(45, 212, 191, 0.12);
   }
   .popup-content .lf-not-here-btn:focus-visible {
       outline: 1px solid var(--accent-teal) !important;
       outline-offset: 1px;
   }

   /* ── "Guess here" — purple solid, no glow ───────────────────────────── */
   .popup-content .lf-guess-btn {
       flex: 1;
       background: var(--accent-purple);
       color: #fff;
       border: none;
       border-radius: 4px;
       padding: 2px 6px;
       font-size: 0.85rem;
       cursor: pointer;
       box-shadow: none !important;
       outline: none !important;
   }
   .popup-content .lf-guess-btn:hover {
       background: var(--accent-purple-2);
   }
   .popup-content .lf-guess-btn:focus-visible {
       outline: 1px solid var(--accent-purple) !important;
       outline-offset: 1px;
   }


/* ── Draw toolbar (topleft, below nav controls) ────────────────────────────*/
.map-draw-toolbar {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.map-draw-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
}
.map-draw-btn:last-child {
    border-bottom: none;
}
.map-draw-btn:hover {
    background: #f0f0f0;
}
.map-draw-btn.active {
    background: #d4e6f9;
}

/* Radius label shown on drawn circles */
.draw-radius-label {
    background: rgba(0, 0, 0, 0.65);
    border: none;
    border-radius: 4px;
    box-shadow: none;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    white-space: nowrap;
}
.draw-radius-label::before {
    display: none;
}

/* Live radius label (during circle drawing) */
.draw-radius-label--live {
    background: rgba(52, 152, 219, 0.9);
    font-size: 0.85rem;
    padding: 3px 8px;
    z-index: 10;
}

/* ── Hacked card effect — CRT scanlines ────────────────────────────────*/
.crt-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.35) 2px,
        rgba(0, 0, 0, 0.35) 4px
    );
}

#map.map-hacked .crt-overlay {
    display: block;
}

/* Cursor co-ordinates overlay (C key toggle) */
.map-coords-overlay {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-family: monospace;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
}

/* ── Curse effect countdown badges at bottom of map ───────────────────────*/
.curse-badge-row {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 1000;
    pointer-events: none;
    flex-wrap: wrap;
    justify-content: center;
}

.curse-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.78);
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1.5px solid rgba(251, 191, 36, 0.35);
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.curse-badge i {
    font-size: 0.7rem;
    color: #f59e0b;
}

.curse-badge-title {
    color: #fff;
    font-weight: 600;
}

.curse-badge-time {
    color: #fbbf24;
    font-weight: 700;
    font-family: monospace;
}
