﻿/* ??? Design Tokens ??????????????????????????????????????????? */
:root {
  --bg-base: #FFFFFF;
  --bg-subtle: #F7F8FA;
  --bg-elevated: #FFFFFF;
  --bg-overlay: rgba(15, 20, 25, 0.6);
  --text-primary: #0F1419;
  --text-secondary: #5B6573;
  --text-tertiary: #8B95A3;
  --text-inverse: #FFFFFF;
  --border-subtle: #E8EBEF;
  --border-default: #D5DAE0;
  --brand-primary: #4F46E5;
  --brand-primary-hover: #4338CA;
  --brand-primary-subtle: #EEF2FF;
  --status-free: #10B981;
  --status-free-bg: #ECFDF5;
  --status-moderate: #F59E0B;
  --status-moderate-bg: #FFFBEB;
  --status-busy: #EF4444;
  --status-busy-bg: #FEF2F2;
  --status-offline: #9CA3AF;
  --status-offline-bg: #F3F4F6;
  --live-red: #EF4444;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 20, 25, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 20, 25, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

body { font-family: var(--font-sans); }

/* ??? Site Header ?????????????????????????????????????????????? */
.zcm-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.zcm-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.zcm-header-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.zcm-header-sep { color: var(--text-tertiary); font-size: 14px; margin: 0 2px; }

.zcm-header-tagline {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.zcm-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zcm-btn-login {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background 150ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.zcm-btn-login:hover { background: var(--bg-subtle); }

.zcm-header-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 150ms ease;
}
.zcm-header-icon-btn:hover { background: var(--bg-subtle); }

@media (max-width: 767px) {
  .zcm-header { height: 56px; padding: 0 16px; }
  .zcm-header-sep, .zcm-header-tagline { display: none; }
  .zcm-btn-login { display: none; }
  .zcm-header-icon-btn { display: flex; }
  .apple-search-bar { top: 56px; }
}
@media (min-width: 768px) {
  .zcm-header-icon-btn { display: none; }
}

/* ??? ZCM Pin Markers ????????????????????????????????????????? */
.zcm-marker-wrapper,
.leaflet-marker-icon.zcm-marker-wrapper {
  background: transparent !important;
  border: none !important;
}

.zcm-pin {
  filter: drop-shadow(0 2px 4px rgba(15, 20, 25, 0.25));
  transition: transform 150ms ease;
  cursor: pointer;
  width: 44px;
  height: 56px;
}
.zcm-pin:hover { transform: scale(1.1); }

.zcm-pin.status-free {
  animation: zcm-pulse-free 2s ease-in-out infinite;
}

@keyframes zcm-pulse-free {
  0%, 100% {
    filter: drop-shadow(0 0 0 rgba(16, 185, 129, 0))
            drop-shadow(0 2px 4px rgba(15, 20, 25, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.7))
            drop-shadow(0 2px 4px rgba(15, 20, 25, 0.25));
  }
}

/* ??? Cluster Marker ??????????????????????????????????????????? */
.zcm-cluster {
  width: 44px; height: 44px;
  background: var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* ??? Map Tooltips ????????????????????????????????????????????? */
.leaflet-tooltip {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 10px !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-sm) !important;
}
.leaflet-tooltip::before { display: none !important; }
﻿
/* ??? Camera List Cards ???????????????????????????????????????? */

/* Override old dark card styles */
#cameraList li.cam-card {
  background: var(--bg-elevated) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border-subtle) !important;
  overflow: visible !important;
  transition: box-shadow 150ms ease, transform 150ms ease !important;
  padding: 0 !important;
}
#cameraList li.cam-card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px) !important;
}

/* Card row: thumb + body side-by-side */
.cam-card-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

/* Thumbnail */
.cam-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cam-thumb-online { background: #1a2035; }
.cam-thumb-offline { background: var(--bg-subtle); }

@media (max-width: 479px) {
  .cam-thumb { width: 64px; height: 64px; }
}

/* Body */
.cam-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cam-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

/* Info block (also carries .cam-info for map-focus click) */
.cam-card-info {
  flex: 1;
  min-width: 0;
}

.cam-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cam-card-addr {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.cam-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* LIVE badge */
.cam-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--live-red);
}
.cam-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-red);
  flex-shrink: 0;
  animation: card-live-pulse 1.5s ease-in-out infinite;
}
@keyframes card-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.cam-meta-sep, .cam-dist { color: var(--text-tertiary); }

/* Status dot (top-right) */
.cam-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  cursor: default;
}
.cam-status-dot.status-free     { background: var(--status-free); }
.cam-status-dot.status-moderate { background: var(--status-moderate); }
.cam-status-dot.status-busy     { background: var(--status-busy); }
.cam-status-dot.status-offline  { background: var(--status-offline); }

/* Footer: Watch button */
.cam-card-footer {
  display: flex;
  justify-content: flex-end;
}

.cam-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}
.cam-watch-btn:hover { background: var(--brand-primary-hover); }

.cam-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease;
}
.cam-subscribe-btn:hover { background: var(--bg-subtle); }

/* Video container inside card */
.cam-card .video-container {
  padding: 0 16px 16px;
}

/* ═══ Camera Modal ══════════════════════════════════════════════ */
/* Backdrop */
.zcm-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.zcm-modal-backdrop.open {
  display: flex;
  opacity: 1;
}
/* Box */
.zcm-modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 720px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 200ms ease;
  position: relative;
}
.zcm-modal-backdrop.open .zcm-modal {
  transform: scale(1);
}
/* Drag handle (mobile only) */
.zcm-modal-drag-handle {
  display: none;
  width: 40px;
  height: 4px;
  background: var(--border-default);
  border-radius: var(--radius-pill);
  margin: 8px auto 0;
}
/* Header */
.zcm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 12px;
  gap: 8px;
}
.zcm-modal-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}
.zcm-modal-addr {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 40px);
}
.zcm-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background 150ms ease, color 150ms ease;
}
.zcm-modal-close:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.zcm-modal-close svg { width: 20px; height: 20px; }
/* Tabs */
.zcm-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
}
.zcm-modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.zcm-modal-tab.active {
  color: var(--brand-primary);
  font-weight: 600;
  border-bottom-color: var(--brand-primary);
}
/* Video wrap */
.zcm-modal-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.zcm-modal-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* ZCM loader inside modal */
.zcm-modal-video-wrap .zcm-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 1;
}
/* LIVE badge */
.zcm-modal-live-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  z-index: 2;
  pointer-events: none;
}
.zcm-modal-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-red);
  flex-shrink: 0;
  animation: modal-live-pulse 1.5s ease-in-out infinite;
}
@keyframes modal-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
/* Archive stub */
.zcm-modal-archive-stub {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
}
/* Subscription message */
.zcm-modal-sub-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: #fff;
  font-size: 14px;
}
.zcm-modal-sub-msg button {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
/* Status row */
.zcm-modal-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px 0;
}
.zcm-modal-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.zcm-modal-status-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.zcm-modal-sep {
  color: var(--text-tertiary);
  font-size: 14px;
}
.zcm-modal-updated {
  font-size: 14px;
  color: var(--text-tertiary);
}
/* Actions */
.zcm-modal-actions {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
}
.zcm-modal-btn-primary {
  flex: 1;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}
.zcm-modal-btn-primary:hover { background: var(--brand-primary-hover); }
.zcm-modal-btn-secondary {
  flex: 1;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease;
}
.zcm-modal-btn-secondary:hover { background: var(--bg-elevated); }
/* Privacy footer */
.zcm-modal-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
}
.zcm-modal-footer svg { width: 14px; height: 14px; flex-shrink: 0; }
/* Toast */
.zcm-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c1c1e;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  z-index: 10001;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  white-space: nowrap;
}
.zcm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ Mobile: Bottom Sheet ══════════════════════════════════════ */
@media (max-width: 767px) {
  .zcm-modal-backdrop {
    align-items: flex-end;
    justify-content: stretch;
  }
  .zcm-modal {
    width: 100%;
    max-width: 100%;
    height: 85vh;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 250ms ease;
    overflow-y: auto;
  }
  .zcm-modal-backdrop.open .zcm-modal {
    transform: translateY(0);
  }
  .zcm-modal-drag-handle {
    display: block;
  }
  .zcm-modal-header {
    order: 2;
    padding-top: 8px;
  }
  .zcm-modal-actions {
    flex-direction: column;
  }
  .zcm-modal-btn-primary,
  .zcm-modal-btn-secondary {
    width: 100%;
  }
}

/* ═══ Layout Fix v2 (2026-05-29) ════════════════════════════════
   Header search · Mobile overlay · Bottom sheet 3 states
   Mini preview · Better drag handle · Snapshot thumbnails
   ═══════════════════════════════════════════════════════════════ */

/* Hide old floating search bar (replaced by header search) */
.apple-search-bar { display: none !important; }

/* ─── Desktop Search in Header ───────────────────────────────── */
.zcm-header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  margin: 0 16px;
}
@media (max-width: 767px) {
  .zcm-header-search { display: none; }
}

.zcm-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  border: 1.5px solid transparent;
  transition: background 150ms ease, border-color 150ms ease;
}
.zcm-search-inner:focus-within {
  background: var(--bg-elevated);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-subtle);
}
.zcm-search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.zcm-search-inner input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}
.zcm-search-inner input::placeholder { color: var(--text-tertiary); }

/* Search suggestions – positioned fixed so they escape the header stacking context */
#searchSuggestions {
  position: fixed;
  z-index: 1200;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}
@media (min-width: 768px) {
  #searchSuggestions {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
  }
}
@media (max-width: 767px) {
  #searchSuggestions {
    top: 60px;
    left: 0;
    right: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  /* When mobile search overlay is active, bring suggestions on top */
  body.mobile-search-active #searchSuggestions {
    z-index: 10002;
  }
}

/* Override old suggestion item colors for light theme */
.search-suggestion {
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-subtle) !important;
}
.search-suggestion:hover { background: var(--bg-subtle) !important; }
.search-suggestion-text { color: var(--text-primary) !important; }
.search-suggestion-type { color: var(--text-secondary) !important; background: var(--bg-subtle) !important; }

/* ─── Mobile Search Overlay ──────────────────────────────────── */
.mobile-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-elevated);
  z-index: 10001;
  flex-direction: column;
}
.mobile-search-overlay.active { display: flex; }

.mobile-search-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  height: 60px;
  flex-shrink: 0;
}
.mobile-search-close-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background 150ms ease;
}
.mobile-search-close-btn:hover { background: var(--bg-subtle); }

.mobile-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 40px;
  border: 1.5px solid transparent;
  transition: border-color 150ms ease;
}
.mobile-search-input-wrap:focus-within {
  border-color: var(--brand-primary);
  background: var(--bg-elevated);
}
.mobile-search-input-wrap svg { color: var(--text-tertiary); flex-shrink: 0; }
.mobile-search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
}
.mobile-search-input-wrap input::placeholder { color: var(--text-tertiary); }

.mobile-search-hint {
  padding: 24px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
  text-align: center;
}

/* ─── Bottom Sheet: Light Theme + 3 States ───────────────────── */
.apple-bottom-sheet {
  background: var(--bg-elevated) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 -1px 0 var(--border-subtle), 0 -4px 16px rgba(15,20,25,0.08) !important;
}

.sheet-header h2 { color: var(--text-primary) !important; }
.sheet-header { border-bottom-color: var(--border-subtle) !important; cursor: default !important; }

/* Segment control: light theme */
.sheet-controls { background: var(--bg-subtle) !important; }
.sheet-tab { color: var(--text-secondary) !important; font-family: var(--font-sans) !important; }
.sheet-tab.active {
  background: var(--text-primary) !important;
  color: var(--bg-elevated) !important;
}

/* State classes set by JS on the sheet element */
.apple-bottom-sheet.sheet-collapsed .sheet-content { display: none !important; }
.apple-bottom-sheet.sheet-collapsed .sheet-mini-preview { display: flex !important; }
.apple-bottom-sheet:not(.sheet-collapsed) .sheet-mini-preview { display: none !important; }

/* ─── Drag Zone ──────────────────────────────────────────────── */
.sheet-drag-zone {
  width: 100%;
  padding: 12px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  flex-shrink: 0;
}
.sheet-drag-zone:active { cursor: grabbing; }

/* Override old handle: new 48x5px centered bar */
.sheet-handle {
  width: 48px !important;
  height: 5px !important;
  background: var(--border-default) !important;
  border-radius: 3px !important;
  margin: 0 !important;
  opacity: 1 !important;
  cursor: inherit !important;
  pointer-events: none; /* handled by drag zone */
}
.sheet-handle:hover { transform: none !important; }
.sheet-handle::before { display: none !important; }

/* ─── Mini Preview Bar (collapsed state) ─────────────────────── */
.sheet-mini-preview {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 4px 20px 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.sheet-cam-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.sheet-mini-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.sheet-mini-scroll::-webkit-scrollbar { display: none; }

.mini-cam-card {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.mini-cam-thumb-wrap {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  background: var(--bg-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mini-cam-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mini-cam-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 64px;
}

/* ─── Camera Card: Snapshot Thumbnail ───────────────────────── */
.cam-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}
.cam-thumb-online { background: var(--bg-subtle) !important; }

/* ─── Hide + button (public page) ────────────────────────────── */
#addCameraBtn { display: none !important; }

/* ─── Account icon wires up to header login link on mobile ────── */
@media (min-width: 768px) {
  /* On desktop, only Login text link shown */
  .zcm-header-icon-btn { display: none !important; }
  .zcm-btn-login { display: inline-flex !important; }
}

/* Hide sheet-header in collapsed state (only mini-preview visible) */
.apple-bottom-sheet.sheet-collapsed .sheet-header { display: none !important; }
