/* Rescue Map page styles */

/* ═══════════════════════════════════════
   TOKENS — 1rem = 10px
═══════════════════════════════════════ */
:root {
    --primary: #c2622a;
    --primary-dark: #9a4d1f;
    --card-h: 7.2rem; /* 72px */
    --sheet-peek: 5.6rem; /* 56px — bottom peek */
    --sheet-w: 50rem; /* 500px max — mobile/tablet sheet width */
}

/* ═══════════════════════════════════════
   ROOT — full viewport, no nav header
═══════════════════════════════════════ */
.mp {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* mobile: exclude the browser URL bar so the sheet isn't clipped */
    overflow: hidden;
    font-family: "DM Sans", sans-serif;
    background: #e8e4de;
}

/* ═══════════════════════════════════════
   MAP — full viewport always
═══════════════════════════════════════ */
.map-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}
#sheltre-map {
    width: 100%;
    height: 100%;
    touch-action: pan-x pan-y; /* 1-finger pan */
}

/* ═══════════════════════════════════════
   MAP TOP BAR
═══════════════════════════════════════ */
.map-topbar {
    position: absolute;
    bottom: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.7rem 0.7rem 1.4rem;
    background: rgba(255, 252, 248, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 0.1rem solid rgba(194, 98, 42, 0.12);
    border-radius: 10rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}
/* The map is a LIGHT page, so the nav's normally-white text is invisible here.
   Force the whole header into its readable (scrolled-like) look. map.css only
   loads on this page, so this is scoped to the map. */
nav {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(2rem);
    -webkit-backdrop-filter: blur(2rem);
    border-bottom: 0.1rem solid var(--border);
    box-shadow: var(--shadow-sm);
}
.nav-logo {
    color: var(--dark);
}
.nav-logo em {
    color: var(--primary);
}
.nav-links a {
    color: var(--text-2);
}
.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-pale);
    color: var(--primary);
}
.nav-cart-btn {
    background: #fff;
    color: var(--text-2);
    border-color: var(--border);
}
.nav-cart-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}
/* The map never scrolls, so the nav never gets `.scrolled` — the hamburger
   bars stay their default white and vanish on the light header. Force dark. */
.hamburger span {
    background: var(--dark);
}
.mt-stats {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.mts-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.2rem;
    color: #3d2810;
}
.mts-item strong {
    font-weight: 700;
}
.mts-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.mts-sep {
    width: 0.1rem;
    height: 1.5rem;
    background: rgba(194, 98, 42, 0.12);
}
.mt-btns {
    display: flex;
    gap: 0.4rem;
}
.mt-btn {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    border: 0.1rem solid rgba(194, 98, 42, 0.15);
    background: rgba(255, 252, 248, 0.96);
    color: #3d2810;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.mt-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(194, 98, 42, 0.3);
    transform: translateY(-1px);
}
.mt-home:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

/* ═══════════════════════════════════════
   LEGEND — desktop only
═══════════════════════════════════════ */
.map-legend {
    position: absolute;
    bottom: 2.4rem;
    right: 1.4rem;
    z-index: 500;
    padding: 1rem 1.4rem;
    background: rgba(255, 252, 248, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 0.1rem solid rgba(194, 98, 42, 0.1);
    border-radius: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.ml-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}
.ml-row:last-child {
    margin-bottom: 0;
}
.ml-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.ml-lbl {
    font-size: 1.1rem;
    color: #7a6050;
    font-weight: 500;
}

/* ═══════════════════════════════════════
   POPUP CARD
═══════════════════════════════════════ */
.popup-card {
    position: absolute;
    bottom: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 600;
    width: min(34rem, calc(100% - 2.8rem));
    background: #fffcf8;
    border: 0.1rem solid rgba(194, 98, 42, 0.13);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.18),
        0 2px 0 rgba(255, 255, 255, 0.8) inset;
}

/* Thumbnail — clickable for lightbox */
.pc-thumb {
    position: relative;
    width: 100%;
    height: 15rem;
    overflow: hidden;
    cursor: pointer;
    background: #f0ece6;
}
.pc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.pc-thumb:hover img {
    transform: scale(1.04);
}
.pc-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 55%);
}
.pc-zoom-hint {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.pc-thumb:hover .pc-zoom-hint {
    opacity: 1;
}
.pc-badges {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.pc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.85rem;
    border-radius: 10rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(8px);
}
.badge-r {
    background: rgba(239, 68, 68, 0.9);
}
.badge-y {
    background: rgba(245, 158, 11, 0.9);
    color: #1a0e06;
}
.badge-b {
    background: rgba(59, 130, 246, 0.9);
}
/* Level-colored popup badges */
.pc-badge.lvl-high {
    background: rgba(239, 68, 68, 0.9);
}
.pc-badge.lvl-med {
    background: rgba(234, 179, 8, 0.92);
    color: #1a0e06;
    color: #fff;
}
.pc-badge.lvl-low {
    background: rgba(249, 115, 22, 0.92);
}
.pc-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.pc-close:hover {
    background: rgba(239, 68, 68, 0.85);
}
.pc-body {
    padding: 1.4rem;
}
.pc-title {
    font-family: "Playfair Display", serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.pc-desc {
    font-size: 1.2rem;
    color: #7a6050;
    line-height: 1.55;
    margin-bottom: 1rem;
}
.pc-time {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.15rem;
    color: #b09070;
    font-weight: 500;
    margin-bottom: 1.2rem;
}
.pc-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: #fff;
    border-radius: 10rem;
    font-family: "DM Sans", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.18s ease;
    box-shadow: 0 4px 14px rgba(194, 98, 42, 0.28);
}
.pc-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(194, 98, 42, 0.36);
}

/* ═══════════════════════════════════════
   REPORTS PANEL
   — Desktop: side panel left
   — Mobile/Tablet: bottom sheet
═══════════════════════════════════════ */

/* Pull handle — mobile/tablet only */
.sheet-handle-wrap {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--sheet-w), calc(100vw - 2rem));
    height: var(--sheet-peek);
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    background: transparent;
}
.sheet-handle {
    width: 4rem;
    height: 0.4rem;
    background: rgba(194, 98, 42, 0.25);
    border-radius: 10rem;
}
.sheet-arrow {
    color: #b09070;
    transition: transform 0.25s ease;
}
.sheet-arrow.up {
    transform: rotate(180deg);
}

/* Panel open button — all devices, same position (left edge, middle) */
.panel-open-btn {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.1rem 0.65rem;
    background: rgba(255, 252, 248, 0.97);
    border: 0.1rem solid rgba(194, 98, 42, 0.12);
    border-left: none;
    border-radius: 0 1.1rem 1.1rem 0;
    box-shadow: 0.3rem 0 1.2rem rgba(0, 0, 0, 0.08);
    cursor: pointer;
    color: #7a6050;
    transition: all 0.16s ease;
}
.panel-open-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.panel-open-btn > span:first-of-type {
    writing-mode: vertical-rl;
    font-size: 1.1rem;
    font-weight: 700;
}
.pob-count {
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.3rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel-open-btn:hover .pob-count {
    background: #fff;
    color: var(--primary);
}

/* Panel base */
.reports-panel {
    position: absolute;
    z-index: 700;
    display: flex;
    flex-direction: column;
    background: #faf8f5;
    overflow: hidden;
}

/* ── Desktop (≥1024px) ── */
@media (min-width: 1024px) {
    .sheet-handle-wrap {
        display: none;
    }

    .reports-panel {
        top: 8rem;
        left: 0;
        bottom: 0;
        width: 36rem;
        border-radius: 0 1.8rem 0 0;
        box-shadow: 0.4rem 0 2.8rem rgba(0, 0, 0, 0.12);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .reports-panel.open {
        transform: translateX(0);
    }

    .rp-close-desktop {
        display: flex !important;
    }
    .rp-close-desktop svg {
        transform: scaleX(-1);
    }
}

@media (max-width: 1023px) {
    .panel-open-btn svg {
        transform: rotate(-90deg);
    }
    .rp-close-desktop svg {
        transform: rotate(90deg);
    }
}
/* ── Mobile/Tablet (<1024px): BOTTOM SHEET ── */
@media (max-width: 1023px) {
    /* Panel open btn: bottom center on mobile */
    .panel-open-btn {
        top: auto !important;
        bottom: calc(var(--sheet-peek) + 1rem);
        bottom: 2rem;
        left: 50% !important;
        transform: translateX(-50%) !important;
        flex-direction: row;
        border-radius: 10rem;
        border: 0.1rem solid rgba(194, 98, 42, 0.15);
        border-left: 0.1rem solid rgba(194, 98, 42, 0.15);
        padding: 0.9rem 1.6rem;
        box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.1);
    }
    .panel-open-btn > span:first-of-type {
        writing-mode: horizontal-tb !important;
        font-size: 1.2rem;
    }
    .panel-open-btn svg {
        /* display: none; */
        display: block;
    }

    .rp-close-desktop {
        display: flex !important;
    }
    .sheet-handle-wrap {
        display: none;
    }

    .reports-panel {
        /* centered, max 50rem (500px) */
        left: 50%;
        /* transform: translateX(-50%) translateY(calc(100% - var(--sheet-peek)));
         */
        transform: translateX(-50%) translateY(100%);

        width: min(var(--sheet-w), calc(100vw - 2rem));
        right: auto;
        bottom: 0;
        border-radius: 1.8rem 1.8rem 0 0;
        box-shadow: 0 -0.8rem 3.2rem rgba(0, 0, 0, 0.14);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 80vh;
    }
    .reports-panel.open {
        transform: translateX(-50%) translateY(0);
    }

    /* sheet handle: centered, matches sheet width */
    .sheet-handle-wrap {
        left: 50%;
        transform: translateX(-50%);
        width: min(var(--sheet-w), calc(100vw - 2rem));
        right: auto;
    }

    /* popup card goes up when sheet is open */
    .mp:has(.reports-panel.open) .popup-card {
        bottom: calc(80vh + 1rem);
        transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Bottom-center is owned by the sheet (handle + open button) on mobile, so the
     stats/controls pill collides there. Move it up under the header where it's
     always visible, shrink it so it fits a phone, and clamp its width so a long
     nowrap row can't bleed past the viewport edges. */
    .map-topbar {
        top: calc(var(--nav-h) + 1rem);
        bottom: auto;
        max-width: calc(100vw - 1.6rem);
        padding: 0.6rem 0.6rem 0.6rem 1rem;
        gap: 0.6rem;
    }
    .mt-stats {
        gap: 0.5rem;
    }
    .mts-item {
        font-size: 1.1rem;
        gap: 0.3rem;
    }
    /* the legend is a desktop-only color key — the stats pill already shows the
     counts, so hide it on mobile (it otherwise overlaps the bottom sheet). */
    .map-legend {
        display: none;
    }
}

/* ─── Panel header ─── */
.rp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.4rem 0.6rem;
    flex-shrink: 0;
    border-bottom: 0.1rem solid rgba(194, 98, 42, 0.07);
}
.rp-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.rp-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.65rem;
    background: rgba(239, 68, 68, 0.08);
    border: 0.1rem solid rgba(239, 68, 68, 0.2);
    border-radius: 10rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.04rem;
}
.live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #ef4444;
    animation: blink 1.4s ease infinite;
    flex-shrink: 0;
}
.rp-title {
    font-family: "Playfair Display", serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a0e06;
}
.rp-count {
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.4rem;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 10rem;
    border: 0.1rem solid rgba(194, 98, 42, 0.15);
    background: #fff;
    color: #3d2810;
    font-family: "DM Sans", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rp-filter-btn:hover,
.rp-filter-btn.has-filters {
    border-color: var(--primary);
    color: var(--primary);
}
.rp-filter-count {
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.3rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rp-icon-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 0.1rem solid rgba(194, 98, 42, 0.15);
    background: #fff;
    color: #7a6050;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rp-icon-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.rp-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.rp-close-desktop {
    display: none;
} /* shown only on desktop via media query */
.spinning svg {
    animation: spin 0.8s linear infinite;
}

/* ─── Filters dropdown ─── */
.rp-filters {
    padding: 1rem 1.4rem 1.2rem;
    border-bottom: 0.1rem solid rgba(194, 98, 42, 0.06);
    background: rgba(194, 98, 42, 0.015);
    flex-shrink: 0;
}
.sf-group {
    margin-bottom: 0.8rem;
}
.sf-group:last-of-type {
    margin-bottom: 0;
}
.sf-lbl {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14rem;
    color: #b09070;
    margin-bottom: 0.5rem;
}
.sf-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.sf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.sf-chip {
    padding: 0.28rem 0.85rem;
    border-radius: 10rem;
    border: 0.12rem solid #e8d8c4;
    background: #fff;
    color: #7a6050;
    font-family: "DM Sans", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.13s ease;
}
.sf-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.sfc-d {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
    color: #dc2626;
}
.sfc-h {
    background: rgba(245, 158, 11, 0.08);
    border-color: #f59e0b;
    color: #b45309;
}
.sfc-a {
    background: rgba(194, 98, 42, 0.08);
    border-color: var(--primary);
    color: #9a4d1f;
}
.sf-clear {
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.55rem;
    border-radius: 10rem;
    border: 0.12rem solid rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
    font-family: "DM Sans", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.13s ease;
}
.sf-clear:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
}

/* ─── Reports list — no scrollbar, fixed card height ─── */
.rp-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.6rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.rp-list::-webkit-scrollbar {
    display: none;
}

.rp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 3.2rem 2rem;
    color: #b09070;
    font-size: 1.25rem;
    text-align: center;
}
.rp-empty span {
    font-size: 2.4rem;
}

/* ─── Report card — FIXED HEIGHT ─── */
.rp-card {
    display: flex;
    align-items: stretch;
    height: var(--card-h); /* fixed 72px */
    background: #fff;
    border: 0.1rem solid rgba(194, 98, 42, 0.1);
    border-radius: 1.2rem;
    overflow: hidden;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: all 0.17s ease;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}
.rp-card:last-child {
    margin-bottom: 0;
}
.rp-card:hover {
    border-color: var(--primary);
    box-shadow: 0 3px 14px rgba(194, 98, 42, 0.12);
    transform: translateY(-1px);
}
.rp-card.active {
    border-color: var(--primary);
    box-shadow:
        0 0 0 2px rgba(194, 98, 42, 0.16),
        0 3px 14px rgba(194, 98, 42, 0.12);
}

/* Animal photo */
.rpc-thumb {
    position: relative;
    width: 7.2rem;
    min-width: 7.2rem;
    overflow: hidden;
    background: #f0ece6;
}
.rpc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.rp-card:hover .rpc-thumb img {
    transform: scale(1.08);
}
.rpc-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.05) 0%,
        transparent 50%
    );
}

/* Info */
.rpc-body {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.7rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}
.rpc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a0e06;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rpc-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow: hidden;
}
.pill {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 10rem;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.pill-r {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.pill-y {
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.pill-b {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
/* Level-colored pills */
.pill.lvl-high {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
}
.pill.lvl-med {
    background: rgba(234, 179, 8, 0.92);
    color: #fff;
    border: none;
}
.pill.lvl-low {
    background: rgba(249, 115, 22, 0.1);
    color: #c2410c;
    border: 1px solid rgba(249, 115, 22, 0.25);
}
.rpc-meta {
    display: flex;
    gap: 0.6rem;
    font-size: 1rem;
    color: #b09070;
    white-space: nowrap;
    overflow: hidden;
}

/* Arrow */
.rpc-arr {
    align-self: center;
    margin: 0 0.7rem;
    color: #d0bfb0;
    flex-shrink: 0;
    transition: color 0.14s;
}
.rp-card:hover .rpc-arr,
.rp-card.active .rpc-arr {
    color: var(--primary);
}

/* ═══════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}
.lb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 1.2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}
.lb-close {
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.lb-close:hover {
    background: rgba(239, 68, 68, 0.7);
}

/* ═══════════════════════════════════════
   CUSTOM MAP PINS (Leaflet global)
═══════════════════════════════════════ */
.cp {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    transition:
        transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1),
        filter 0.18s;
}
.cp:hover {
    transform: scale(1.12);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.26));
}
.cp-s {
    transform: scale(1.25) !important;
    filter: drop-shadow(0 5px 16px var(--pc, #ef4444)) !important;
}
.cp-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1.5px solid var(--pc, #ef4444);
    opacity: 0.45;
    transform: translate(-50%, -60%);
    animation: pin-pulse 2.2s ease infinite;
    pointer-events: none;
}
.cp-body {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: rgba(255, 253, 250, 0.98);
    border: 2.5px solid var(--pc, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.pb-row {
    display: flex;
    gap: 2px;
    transform: rotate(45deg);
    margin-bottom: 1px;
}
.pb {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.cp-em {
    font-size: 1.2rem;
    line-height: 1;
    transform: rotate(45deg);
}
.cp-stem {
    width: 2px;
    height: 7px;
    border-radius: 0 0 2px 2px;
    background: var(--pc, #ef4444);
    margin-top: -1px;
}

/* User location pin */
.u-pin {
    position: relative;
    width: 20px;
    height: 20px;
}
.u-c {
    position: absolute;
    inset: 3px;
    background: #2563eb;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.65);
}
.u-r {
    position: absolute;
    inset: -3px;
    border: 2px solid rgba(37, 99, 235, 0.32);
    border-radius: 50%;
    animation: u-pulse 2s ease infinite;
}

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast {
    position: fixed;
    top: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    padding: 0.75rem 1.8rem;
    border-radius: 10rem;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}
.toast-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.toast-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
.toast-info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* ═══════════════════════════════════════
   TRANSITIONS
═══════════════════════════════════════ */
.popup-rise-enter-active {
    transition: all 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.popup-rise-leave-active {
    transition: all 0.18s ease;
}
.popup-rise-enter-from {
    opacity: 0;
    transform: translateX(-50%) translateY(2rem) scale(0.95);
}
.popup-rise-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem) scale(0.97);
}

.lb-fade-enter-active {
    transition: all 0.22s ease;
}
.lb-fade-leave-active {
    transition: all 0.18s ease;
}
.lb-fade-enter-from,
.lb-fade-leave-to {
    opacity: 0;
}

.toast-t-enter-active {
    transition: all 0.24s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.toast-t-leave-active {
    transition: all 0.16s ease;
}
.toast-t-enter-from {
    opacity: 0;
    transform: translateX(-50%) translateY(-0.8rem);
}
.toast-t-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(-0.4rem);
}

.fdrop-enter-active {
    transition: all 0.2s cubic-bezier(0.34, 1.1, 0.64, 1);
}
.fdrop-leave-active {
    transition: all 0.13s ease;
}
.fdrop-enter-from {
    opacity: 0;
    transform: translateY(-0.5rem);
}
.fdrop-leave-to {
    opacity: 0;
}

/* ═══════════════════════════════════════
   LEAFLET — remove zoom buttons
═══════════════════════════════════════ */
.leaflet-control-zoom {
    display: none !important;
}
.leaflet-control-attribution {
    background: rgba(255, 252, 248, 0.75) !important;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-size: 0.9rem !important;
    color: #b09070 !important;
    padding: 0.2rem 0.6rem !important;
}
@media (max-width: 1023px) {
    .popup-card {
        bottom: 7rem;
    }
}
.leaflet-control-attribution {
    display: none;
}
/* ═══════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════ */
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes pin-pulse {
    0% {
        transform: translate(-50%, -60%) scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -60%) scale(1.6);
        opacity: 0;
    }
}
@keyframes u-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}
