
#webcamPanel[hidden], #webcamPanel [hidden] { display:none !important; }
.shorelysafe-camera-item { grid-column:var(--webcam-column,1) !important; }
.shorelysafe-camera-item .layer-meta { display:flex; align-items:center; }
html body:not(.mobile-optimized) #rightRail > .layers-card:has(.shorelysafe-camera-item) { height:auto !important; min-height:0 !important; max-height:none !important; flex-shrink:0 !important; }
/* The GL marker is a button; isolate its geometry from global control rules.
   Keep both renderers identical and leave MapLibre's inline position transform alone. */
html body .webcam-map-marker {
  box-sizing:border-box !important; display:grid !important; place-items:center;
  width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important;
  max-width:44px !important; max-height:44px !important; padding:10px !important;
  background:#12495a !important; color:#fff !important; border:2px solid #fff !important;
  border-radius:50% !important; box-shadow:0 2px 7px #0006; cursor:pointer;
  appearance:none; line-height:0 !important; transition:none !important;
}
html body .webcam-map-marker svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.webcam-map-marker:focus-visible, #webcamPanel button:focus-visible, #webcamPanel a:focus-visible, #webcamPanel select:focus-visible { outline:3px solid #e49b24; outline-offset:2px; }
#webcamPanel { position:fixed; top:140px; left:50%; transform:translateX(-50%); z-index:9100; box-sizing:border-box; width:min(360px,calc(100% - 24px)); max-height:calc(100% - 270px); overflow:auto; overscroll-behavior:contain; border:1px solid #425069; border-radius:13px; background:#121d2d; color:#edf3ff; box-shadow:0 6px 24px #0006; padding:12px; font-family:inherit; font-size:12px; line-height:1.35; text-align:left; cursor:default; pointer-events:auto !important; }
#webcamPanel .webcam-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
#webcamPanel h2 { margin:0; font-size:16px; line-height:1.25; }
#webcamPanel button, #webcamChoice { font:inherit; color:#d9eaff; background:#213047; border:1px solid #425069; border-radius:6px; cursor:pointer; }
#webcamPanel #webcamClose { flex:0 0 32px; width:32px; height:32px; min-height:32px !important; }
#webcamChoice { width:100%; min-height:36px !important; margin-bottom:9px; padding:6px; font-size:12px !important; }
#webcamPanel .webcam-frame { width:100%; aspect-ratio:16 / 9; max-height:max(40px,calc(var(--webcam-panel-height, 100dvh) - var(--webcam-panel-chrome, 180px))); background:#102535; border-radius:7px; overflow:hidden; }
#webcamPanel iframe, #webcamPanel .webcam-frame img { display:block; width:100%; height:100%; border:0; object-fit:contain; }
#webcamPanel #webcamStatus { margin:8px 0 0; color:#b8cbe1; font-size:12px; }
#webcamPanel .webcam-source { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:8px; color:#b8cbe1; font-size:11px; }
#webcamPanel a { color:#93c6ff; text-decoration:underline; }
#webcamPanel #webcamRetry { width:32px; height:32px; min-width:32px; min-height:32px !important; padding:0 !important; font-size:20px !important; line-height:1; }
#webcamPanel[data-player-state="unavailable"] #webcamStatus { color:#ffcb85; }
@media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
  #webcamPanel { --webcam-panel-chrome:210px; top:85px; width:min(360px,calc(100% - 16px)); max-height:calc(100dvh - 205px); padding:10px; }
  #webcamPanel #webcamClose { width:44px; height:44px; min-height:44px !important; flex-basis:44px; }
  #webcamPanel #webcamRetry { width:44px; height:44px; min-height:44px !important; min-width:44px; }
  #webcamPanel .webcam-source > a { display:flex; align-items:center; min-height:44px; }
  #webcamChoice { min-height:44px !important; }
}
body.exporting .webcam-map-marker, body.exporting #webcamPanel, .export-stage .webcam-map-marker, .export-stage #webcamPanel { display:none !important; }
@media print { html body .webcam-map-marker, #webcamPanel { display:none !important; } }


/* Town layouts that hid the old mobile Layers card must expose its Cameras switch. */
html body.mobile-optimized #mobileRailMount > .layers-card:has(.shorelysafe-camera-item) {
  display:block !important; visibility:visible !important; opacity:1 !important; pointer-events:auto !important;
  height:auto !important; min-height:0 !important; max-height:none !important; flex-shrink:0 !important;
}
