/* JamCams.co.uk — map.css
   Map-page specific styles.
   Loaded only on map.html.
*/
/* ══ TOP SEARCH BAR ══ */
    .map-search-bar{
      position:absolute;top:.75rem;left:50%;transform:translateX(-50%);
      z-index:600;width:calc(100% - 1.5rem);max-width:560px;
    }
    .map-search-row{
      display:flex;align-items:stretch;
      background:white;border-radius:14px;
      box-shadow:0 4px 24px rgba(0,0,0,.18),0 1px 4px rgba(0,0,0,.1);
      overflow:hidden;height:48px;
    }
    .map-search-icon{
      display:flex;align-items:center;padding:0 .7rem 0 1rem;
      color:#94a3b8;flex-shrink:0;font-size:.9rem;
    }
    #mapSearchInput{
      flex:1;border:none;outline:none;
      font-family:'Plus Jakarta Sans',sans-serif;font-size:.9rem;
      color:#0f172a;background:transparent;min-width:0;
    }
    #mapSearchInput::placeholder{color:#94a3b8}
    .map-search-divider{width:1px;background:#e2e8f0;margin:.65rem 0;flex-shrink:0}
    .map-locate-btn{
      display:flex;align-items:center;justify-content:center;
      width:48px;flex-shrink:0;background:transparent;border:none;
      color:#94a3b8;font-size:1rem;cursor:pointer;transition:all .15s;
    }
    .map-locate-btn:hover{color:#2563eb;background:#f0f6ff}
    .map-locate-btn.active{color:#16a34a}
    .map-search-btn{
      background:#2563eb;border:none;color:white;
      width:52px;display:flex;align-items:center;justify-content:center;
      font-size:.95rem;cursor:pointer;transition:background .15s;flex-shrink:0;
    }
    .map-search-btn:hover{background:#1d4ed8}
    /* Search dropdown */
    .map-search-dd{
      position:absolute;top:calc(100% + 6px);left:0;right:0;
      background:white;border-radius:12px;
      box-shadow:0 8px 32px rgba(0,0,0,.16);
      overflow:hidden;display:none;z-index:700;
    }
    .map-search-dd.open{display:block}
    .mdd-item{
      display:flex;align-items:center;gap:.75rem;
      padding:.72rem 1rem;border-bottom:1px solid #f1f5f9;
      cursor:pointer;transition:background .1s;
      font-family:'Plus Jakarta Sans',sans-serif;
    }
    .mdd-item:last-child{border-bottom:none}
    .mdd-item:hover{background:#f8fafc}
    .mdd-icon{
      width:28px;height:28px;border-radius:8px;flex-shrink:0;
      display:flex;align-items:center;justify-content:center;font-size:.72rem;
    }
    .mdd-name{font-weight:700;font-size:.82rem;color:#0f172a}
    .mdd-type{font-size:.68rem;color:#94a3b8;margin-top:.05rem}

    /* ══ LAYER TOGGLE PILLS — bottom-left ══ */
    .map-pills{
      position:absolute;bottom:1.25rem;left:.75rem;
      z-index:500;display:flex;flex-direction:column;gap:.45rem;
    }
    .tb-pill{
      display:flex;align-items:center;gap:.4rem;
      background:white;border:2px solid #e2e8f0;border-radius:100px;
      padding:.45rem .9rem;font-family:'Plus Jakarta Sans',sans-serif;
      font-size:.74rem;font-weight:700;color:#334155;
      box-shadow:0 3px 12px rgba(0,0,0,.12);
      transition:all .15s;white-space:nowrap;cursor:pointer;
    }
    .tb-pill:hover{background:#f8fafc}
    .tb-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
    .tb-pill.cam-on{background:#0a0f1e;color:white;border-color:#0a0f1e}
    .tb-pill.cam-on .tb-dot{background:#60a5fa}
    .tb-pill.dis-on{background:#ef4444;color:white;border-color:#ef4444}
    .tb-pill.dis-on .tb-dot{background:#fca5a5}
    .tb-count{
      background:rgba(0,0,0,.1);border-radius:100px;
      padding:.04rem .42rem;font-size:.62rem;font-family:'Space Mono',monospace;
    }
    .tb-pill.cam-on .tb-count,.tb-pill.dis-on .tb-count{background:rgba(255,255,255,.2)}

    /* ══ LOCATE BUTTON — bottom-right ══ */
    .map-locate{
      position:absolute;bottom:1.25rem;right:.75rem;z-index:500;
      background:white;border:none;border-radius:50%;width:46px;height:46px;
      display:flex;align-items:center;justify-content:center;
      box-shadow:0 3px 14px rgba(0,0,0,.18);color:#2563eb;font-size:1.1rem;
      transition:all .15s;cursor:pointer;
    }
    .map-locate:hover{background:#eff6ff;transform:translateY(-1px)}

    /* ══ ZOOM HINT ══ */
    .zoom-hint{
      position:absolute;top:4.5rem;left:50%;transform:translateX(-50%);
      z-index:500;background:rgba(15,23,42,.82);color:white;
      font-family:'Space Mono',monospace;font-size:.68rem;
      padding:.42rem 1.1rem;border-radius:100px;
      white-space:nowrap;pointer-events:none;
      transition:opacity .4s;letter-spacing:.04em;
    }
    .zoom-hint.hidden{opacity:0}

    /* ══ AREA CLUSTER MARKERS ══ */
    .area-cluster{
      background:rgba(37,99,235,.9);color:white;
      border:3px solid white;border-radius:50%;
      display:flex;flex-direction:column;align-items:center;justify-content:center;
      box-shadow:0 4px 16px rgba(37,99,235,.45);
      cursor:pointer;transition:transform .15s;
      font-family:'Plus Jakarta Sans',sans-serif;
    }
    .area-cluster:hover{transform:scale(1.12)}
    .area-cluster .ac-count{font-size:.75rem;font-weight:800;line-height:1}
    .area-cluster .ac-label{font-size:.42rem;font-weight:600;opacity:.85;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-top:1px}

    /* ══ INDIVIDUAL CAMERA MARKERS ══ */
    .mk-cam{
      width:24px;height:24px;background:#2563eb;
      border:2.5px solid white;border-radius:6px;
      display:flex;align-items:center;justify-content:center;
      color:white;font-size:8px;
      box-shadow:0 2px 8px rgba(0,0,0,.25);
    }
    /* Disruptions */
    .mk-s{width:22px;height:22px;background:#ef4444;border:2.5px solid white;border-radius:50%;display:flex;align-items:center;justify-content:center;color:white;font-size:8px;box-shadow:0 2px 8px rgba(0,0,0,.25)}
    .mk-m{width:18px;height:18px;background:#ea580c;border:2px solid white;border-radius:50%;display:flex;align-items:center;justify-content:center;color:white;font-size:7px;box-shadow:0 2px 6px rgba(0,0,0,.2)}
    .mk-n{width:14px;height:14px;background:#ca8a04;border:2px solid white;border-radius:50%;display:flex;align-items:center;justify-content:center;color:white;font-size:6px;box-shadow:0 2px 5px rgba(0,0,0,.18)}
    .mk-you{width:14px;height:14px;background:#06b6d4;border:3px solid white;border-radius:50%;box-shadow:0 0 0 5px rgba(6,182,212,.25)}

    /* ══ LEAFLET POPUP ══ */
    .leaflet-popup-content-wrapper{border-radius:14px!important;box-shadow:0 8px 32px rgba(0,0,0,.18)!important;padding:0!important;overflow:hidden!important}
    .leaflet-popup-content{margin:0!important;min-width:220px!important;max-width:260px!important}
    .leaflet-popup-tip-container{display:none!important}
    .leaflet-container a.leaflet-popup-close-button{top:6px;right:8px;color:#64748b;font-size:18px;z-index:10}

    /* Camera popup */
    .cp{font-family:'Plus Jakarta Sans',sans-serif}
    .cp-img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;background:#1c2a45}
    .cp-vid{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;background:#1c2a45}
    .cp-no-img{width:100%;height:80px;background:linear-gradient(135deg,#1c2a45,#1e3a5f);display:flex;align-items:center;justify-content:center;color:#475569;font-size:1.1rem}
    .cp-body{padding:.7rem .85rem}
    .cp-live{display:inline-flex;align-items:center;gap:4px;background:#ef4444;color:white;font-size:.54rem;font-weight:700;padding:.15rem .44rem;border-radius:4px;margin-bottom:.4rem;font-family:'Space Mono',monospace;letter-spacing:.06em}
    .cp-dot{width:4px;height:4px;background:white;border-radius:50%;animation:cpP 1.2s ease-in-out infinite}
    @keyframes cpP{0%,100%{opacity:1}50%{opacity:.3}}
    .cp h4{font-weight:800;font-size:.78rem;color:#0f172a;text-transform:uppercase;margin-bottom:.5rem;line-height:1.3}
    .cp-btn{display:block;width:100%;background:#2563eb;color:white;border:none;border-radius:8px;padding:.5rem;font-size:.74rem;font-weight:700;text-align:center;font-family:'Plus Jakarta Sans',sans-serif;cursor:pointer;transition:background .15s}
    .cp-btn:hover{background:#1d4ed8}

    /* ══ CAMERA MODAL ══ */
    /* ══════════════════════════════════════════
       MAP CAMERA MODAL
    ══════════════════════════════════════════ */
    #mapCamModal{
      display:none;position:fixed;inset:0;z-index:99999;
      background:rgba(0,0,0,.88);
      align-items:center;justify-content:center;
    }
    #mapCamModal.open{display:flex}

    /* ── Box shell ── */
    .mcm-box{
      position:relative;
      background:#0a0f1e;
      border-radius:16px;overflow:hidden;
      display:flex;flex-direction:column;
      box-shadow:0 32px 100px rgba(0,0,0,.8);
      animation:mcmIn .2s ease-out;
      /* Mobile: near full-screen */
      width:100vw;max-width:100vw;
      height:100dvh;max-height:100dvh;
      border-radius:0;
    }
    /* Desktop: centred card */
    @media(min-width:900px){
      .mcm-box{
        width:min(1100px,96vw);
        height:92dvh;max-height:92dvh;
        border-radius:18px;
        flex-direction:row; /* side-by-side: main col + sidebar */
      }
    }
    @keyframes mcmIn{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}

    /* ── Header (mobile only — desktop title is in sidebar) ── */
    .mcm-header{
      display:flex;align-items:center;gap:.6rem;
      padding:.6rem .75rem;
      background:#0d1526;
      border-bottom:1px solid rgba(255,255,255,.08);
      flex-shrink:0;
      min-height:52px;
    }
    @media(min-width:900px){
      .mcm-header{ display:none } /* hidden on desktop — title shown in sidebar */
    }
    .mcm-title{
      flex:1;min-width:0;
      font-size:.95rem;font-weight:800;
      color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
      letter-spacing:-.01em;
    }
    .mcm-live-chip{
      display:flex;align-items:center;gap:4px;flex-shrink:0;
      background:#ef4444;color:#fff;
      font-family:'Space Mono',monospace;font-size:.55rem;font-weight:700;
      padding:.18rem .45rem;border-radius:4px;letter-spacing:.06em;
    }
    .mcm-live-dot{width:5px;height:5px;background:#fff;border-radius:50%;animation:mcmPulse 1.2s ease-in-out infinite}
    @keyframes mcmPulse{0%,100%{opacity:1}50%{opacity:.3}}
    .mcm-close{
      flex-shrink:0;width:38px;height:38px;min-width:38px;
      background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.14);
      border-radius:9px;color:rgba(255,255,255,.8);
      display:flex;align-items:center;justify-content:center;cursor:pointer;
      transition:background .15s;
    }
    .mcm-close:hover{background:rgba(239,68,68,.5);border-color:#ef4444;color:#fff}
    .mcm-close svg{width:15px;height:15px;pointer-events:none}

    /* ── MAIN COLUMN (left on desktop, full on mobile) ── */
    .mcm-main{
      display:flex;flex-direction:column;
      flex:1;min-width:0;min-height:0;overflow:hidden;
    }

    /* ── Feed ── */
    .mcm-feed{
      flex:1;min-height:0;background:#000;
      display:flex;align-items:center;justify-content:center;
      position:relative;overflow:hidden;
    }
    /* Mobile: 16:9 aspect, uncropped */
    @media(max-width:899px){
      .mcm-feed{
        flex:none;
        width:100%;
        aspect-ratio:16/9;
        max-height:56dvh;
      }
    }
    .mcm-feed video,.mcm-feed img{
      width:100%;height:100%;object-fit:contain;display:block;
      max-width:none!important;max-height:none!important;
    }
    .mcm-offline{
      display:flex;flex-direction:column;align-items:center;gap:.75rem;
      color:rgba(255,255,255,.3);font-size:.82rem;
      font-family:'Space Mono',monospace;text-align:center;
    }
    .mcm-offline svg{width:2.5rem;height:2.5rem;opacity:.3}

    /* ── Horizontal leaderboard ad — between feed and nearby (desktop only) ── */
    .mcm-hori-ad{
      flex-shrink:0;
      background:#111827;
      border-top:1px solid rgba(255,255,255,.06);
      display:flex;flex-direction:column;align-items:center;justify-content:center;
      gap:4px;padding:8px 12px;
      min-height:106px; /* 728×90 leaderboard + padding */
    }
    @media(max-width:899px){.mcm-hori-ad{display:none}}
    .mcm-ad-label{
      font-family:'Space Mono',monospace;font-size:.48rem;font-weight:700;
      letter-spacing:.1em;text-transform:uppercase;
      color:rgba(255,255,255,.18);align-self:flex-start;margin-bottom:2px;
    }

    /* ── Nearby strip ── */
    .mcm-nearby{
      flex-shrink:0;background:#141f38;
      border-top:1px solid rgba(255,255,255,.07);
      display:flex;align-items:stretch;
      overflow:hidden;
    }
    @media(max-width:899px){
      .mcm-nearby{ min-height:82px;max-height:100px }
    }
    @media(min-width:900px){
      .mcm-nearby{ min-height:96px }
    }
    .mcm-nb-btn{
      flex-shrink:0;width:32px;
      background:transparent;border:none;
      color:rgba(255,255,255,.35);cursor:pointer;
      display:flex;align-items:center;justify-content:center;
      transition:background .15s,color .15s;
    }
    .mcm-nb-btn:hover{background:rgba(255,255,255,.05);color:#fff}
    .mcm-nb-btn svg{width:13px;height:13px;pointer-events:none}
    .mcm-nb-strip{
      flex:1;min-width:0;
      display:flex;gap:6px;align-items:center;
      overflow-x:auto;overflow-y:hidden;
      scroll-snap-type:x mandatory;
      -webkit-overflow-scrolling:touch;
      padding:6px 4px;
      scrollbar-width:none;
    }
    .mcm-nb-strip::-webkit-scrollbar{display:none}
    .mcm-nb-thumb{
      flex-shrink:0;
      border-radius:7px;overflow:hidden;position:relative;
      cursor:pointer;border:2px solid transparent;
      scroll-snap-align:start;
      transition:border-color .15s,transform .15s;
    }
    @media(max-width:899px){
      .mcm-nb-thumb{width:110px;height:68px}
    }
    @media(min-width:900px){
      .mcm-nb-thumb{width:130px;height:80px}
    }
    .mcm-nb-thumb:hover{border-color:rgba(56,189,248,.55);transform:scale(1.03)}
    .mcm-nb-thumb.active{border-color:#38bdf8}
    .mcm-nb-thumb img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none;max-width:none!important}
    .mcm-nb-ph{
      width:100%;height:100%;background:#1c2a45;
      display:flex;align-items:center;justify-content:center;
      color:rgba(255,255,255,.2);
    }
    .mcm-nb-ph svg{width:1rem;height:1rem}
    .mcm-nb-name{
      position:absolute;bottom:0;left:0;right:0;
      background:linear-gradient(transparent,rgba(0,0,0,.78));
      color:#fff;font-size:.48rem;font-weight:600;
      padding:.2rem .3rem .18rem;
      overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
      pointer-events:none;
    }
    .mcm-nb-dist{
      position:absolute;top:3px;right:3px;
      background:rgba(0,0,0,.7);color:#fff;
      font-family:'Space Mono',monospace;font-size:.46rem;font-weight:700;
      padding:.08rem .24rem;border-radius:3px;pointer-events:none;
    }

    /* Mobile: square ad below nearby */
    .mcm-mob-ad{
      display:none;
    }
    @media(max-width:899px){
      .mcm-mob-ad{
        display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
        gap:6px;padding:10px 12px;
        background:#111827;
        border-top:1px solid rgba(255,255,255,.06);
        min-height:304px; /* 280 + 12×2 padding */
        flex-shrink:0;
      }
    }

    /* Mobile: footer actions */
    .mcm-footer{
      display:flex;align-items:center;gap:.45rem;
      padding:.6rem .75rem;
      background:#0a0f1e;border-top:1px solid rgba(255,255,255,.07);
      flex-shrink:0;flex-wrap:wrap;
    }
    @media(min-width:900px){.mcm-footer{display:none}}

    .mcm-btn{
      display:inline-flex;align-items:center;gap:.4rem;
      padding:.5rem .85rem;border-radius:9px;
      font-weight:700;font-size:.74rem;font-family:inherit;
      border:none;cursor:pointer;text-decoration:none;
      transition:opacity .15s;white-space:nowrap;flex:1;justify-content:center;
      min-height:40px;
    }
    .mcm-btn:hover{opacity:.85}
    .mcm-btn-maps{background:#1d4ed8;color:#fff}
    .mcm-btn-page{background:#0e7490;color:#fff}
    .mcm-btn-fav{background:#1e293b;color:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.12)}
    .mcm-btn-fav.saved{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.45);color:#fca5a5}

    /* ── SIDEBAR (desktop only) ── */
    .mcm-sidebar{
      display:none;
    }
    @media(min-width:900px){
      .mcm-sidebar{
        display:flex;flex-direction:column;
        width:340px;flex-shrink:0;
        background:#0a0f1e;
        border-left:1px solid rgba(255,255,255,.07);
        overflow-y:auto;-webkit-overflow-scrolling:touch;
      }
    }
    /* Sidebar header */
    .mcm-sb-header{
      display:flex;align-items:center;gap:.65rem;
      padding:.7rem .9rem;
      background:#0d1526;
      border-bottom:1px solid rgba(255,255,255,.08);
      flex-shrink:0;min-height:56px;
    }
    .mcm-sb-title{
      flex:1;min-width:0;
      font-size:.82rem;font-weight:800;color:#fff;
      overflow:hidden;text-overflow:ellipsis;
      white-space:nowrap;letter-spacing:-.01em;
    }
    /* Vertical ad block 300×600 */
    .mcm-sb-ad{
      margin:12px;padding:12px;
      background:#111827;border-radius:10px;
      border:1px solid rgba(255,255,255,.06);
      display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
      gap:6px;
      min-height:632px;flex-shrink:0; /* 300×600 + padding */
    }
    /* Sidebar action buttons */
    .mcm-sb-actions{
      display:flex;flex-direction:column;gap:.45rem;
      padding:.85rem;margin-top:auto;
      border-top:1px solid rgba(255,255,255,.07);
    }
    .mcm-sb-btn{
      display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
      padding:.6rem 1rem;border-radius:10px;
      font-weight:700;font-size:.78rem;font-family:inherit;
      border:none;cursor:pointer;text-decoration:none;
      transition:opacity .15s;min-height:44px;
    }
    .mcm-sb-btn:hover{opacity:.85}
    .mcm-sb-btn-maps{background:#1d4ed8;color:#fff}
    .mcm-sb-btn-page{background:#0e7490;color:#fff}
    .mcm-sb-btn-fav{background:#1e293b;color:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.12)}
    .mcm-sb-btn-fav.saved{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.45);color:#fca5a5}
    .mcm-sb-btn-share{background:#1e293b;color:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.12)}

    /* Disruption popup */
    .dp{font-family:'Plus Jakarta Sans',sans-serif;padding:.8rem .9rem}
    .dp-sev{display:inline-block;font-size:.6rem;font-weight:800;padding:.16rem .48rem;border-radius:4px;margin-bottom:.4rem;font-family:'Space Mono',monospace;text-transform:uppercase;letter-spacing:.04em}
    .ds-s{background:#fef2f2;color:#dc2626}.ds-m{background:#fff7ed;color:#ea580c}
    .ds-n{background:#fefce8;color:#ca8a04}.ds-u{background:#f1f5f9;color:#64748b}
    .dp h4{font-weight:800;font-size:.78rem;color:#0f172a;margin-bottom:.38rem;text-transform:uppercase;line-height:1.3}
    .dp p{font-size:.74rem;color:#64748b;line-height:1.55}

    /* ══ LOADING OVERLAY ══ */
    .map-loading{position:absolute;inset:0;background:rgba(10,15,30,.9);z-index:400;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.85rem;transition:opacity .4s}
    .map-loading.done{opacity:0;pointer-events:none}
    .ml-ring{width:40px;height:40px;border:3px solid rgba(56,189,248,.2);border-top-color:#38bdf8;border-radius:50%;animation:spin .8s linear infinite}
    @keyframes spin{to{transform:rotate(360deg)}}
    .ml-txt{font-family:'Space Mono',monospace;font-size:.72rem;color:#38bdf8;letter-spacing:.1em;text-transform:uppercase;text-align:center;padding:0 1rem}
    .ml-prog{width:200px;height:3px;background:rgba(255,255,255,.1);border-radius:2px;overflow:hidden}
    .ml-bar{height:100%;background:linear-gradient(90deg,#2563eb,#38bdf8);border-radius:2px;transition:width .5s;width:0}
