/**
 * Live Cams Styles - OSINT Surveillance Mode
 * Mission control / intelligence gathering aesthetic
 */

.livecams-container {
  display: flex;
  flex-direction: column;
  height: 100%; /* Fill parent height */
  min-height: 100%;
  background: rgba(3, 8, 18, 0.95);
  color: rgba(230, 240, 255, 0.9);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  position: relative;
  overflow: hidden; /* Prevent container scroll, let children handle it */
}

/* Fullscreen mode styling - OSINT Security Guard Mode */
.livecams-container:fullscreen {
  background: rgba(3, 8, 18, 1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden; /* Prevent body scroll */
}

.livecams-container:fullscreen .livecams-layout {
  flex: 1 1 auto;
  height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
  min-height: 0;
  overflow: hidden; /* Prevent layout scroll */
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 12px;
}

.livecams-container:fullscreen .livecams-left-panel {
  overflow: hidden !important; /* Let grid-container handle scrolling */
  overflow-x: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  flex: 0 0 350px !important; /* Fixed width, don't grow/shrink */
}

.livecams-container:fullscreen .livecams-grid-container {
  overflow-y: auto !important; /* Enable scrolling in grid container */
  overflow-x: hidden !important;
  flex: 1 1 0% !important; /* Take available space, allow shrinking to 0 */
  min-height: 0 !important; /* Critical for flex scrolling */
  max-height: 100% !important; /* Constrain to available height */
  position: relative;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.3) rgba(5, 12, 28, 0.5);
}

.livecams-container:fullscreen .livecams-grid-container::-webkit-scrollbar {
  width: 8px;
}

.livecams-container:fullscreen .livecams-grid-container::-webkit-scrollbar-track {
  background: rgba(5, 12, 28, 0.5);
}

.livecams-container:fullscreen .livecams-grid-container::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.3);
  border-radius: 4px;
}

.livecams-container:fullscreen .livecams-grid-container::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.5);
}

.livecams-container:fullscreen .livecams-grid {
  overflow: visible; /* Let parent handle scrolling */
  max-height: none; /* Remove height constraint */
  padding-bottom: 2rem; /* Extra bottom padding for last row visibility */
}

.livecams-container:fullscreen .livecams-view-panel {
  height: 100%;
  max-height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.livecams-container:fullscreen .livecams-grid-view {
  height: 100%;
  max-height: 100%;
  overflow: auto;
}

/* Optimize 6x6 grid for fullscreen */
.livecams-container:fullscreen .livecams-view-grid36 {
  gap: 4px; /* Tighter gap in fullscreen for more cameras */
}

.livecams-container:fullscreen .livecams-grid-cell {
  min-height: 0;
}

.livecams-container:fullscreen .livecams-grid-cell-display {
  min-height: 80px; /* Minimum height for visibility */
}

/* OSINT Scanline Effect */
.livecams-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(34, 211, 238, 0.03) 2px,
    rgba(34, 211, 238, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* OSINT Header */
.livecams-osint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(5, 12, 28, 0.95);
  border-bottom: 1px solid rgba(34, 211, 238, 0.25);
  z-index: 10;
  position: relative;
  backdrop-filter: blur(8px);
}

.livecams-osint-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #22d3ee;
}

.livecams-osint-icon {
  font-size: 1.2rem;
  animation: pulse 2s ease-in-out infinite;
}

.livecams-osint-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.livecams-osint-status.online {
  color: #4ade80;
}

.livecams-osint-controls {
  display: flex;
  gap: 6px;
}

.livecams-osint-btn {
  padding: 4px 10px;
  background: rgba(5, 12, 28, 0.8);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.livecams-osint-btn:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: #22d3ee;
  transform: translateY(-1px);
}

.livecams-osint-btn.active {
  background: rgba(34, 211, 238, 0.25);
  border-color: #22d3ee;
  color: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Top Live Strip */
.livecams-top-strip-container {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.livecams-top-strip {
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.9) 0%, rgba(7, 21, 42, 0.9) 100%);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.livecams-top-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.livecams-top-strip-header h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #22d3ee;
  font-weight: 600;
}

.livecams-top-strip-count {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.livecams-top-strip-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 158, 255, 0.3) rgba(5, 15, 35, 0.5);
}

.livecams-top-strip-scroll::-webkit-scrollbar {
  height: 6px;
}

.livecams-top-strip-scroll::-webkit-scrollbar-track {
  background: rgba(5, 15, 35, 0.5);
}

.livecams-top-strip-scroll::-webkit-scrollbar-thumb {
  background: rgba(74, 158, 255, 0.3);
  border-radius: 3px;
}

.livecams-top-strip-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 158, 255, 0.45);
}

.livecams-top-strip-item {
  flex-shrink: 0;
  width: 140px;
  background: rgba(7, 21, 42, 0.8);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.livecams-top-strip-item:hover {
  border-color: #22d3ee;
  transform: translateY(-2px);
}

.livecams-top-strip-item.selected {
  border-color: #22d3ee;
  box-shadow: 0 0 0 2px #22d3ee40;
}

.livecams-top-strip-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: rgba(5, 15, 35, 0.7);
  overflow: hidden;
}

.livecams-top-strip-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.livecams-top-strip-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.35);
}

.livecams-top-strip-watchlist-badge {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  font-size: 0.9rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.livecams-top-strip-info {
  padding: 0.5rem;
}

.livecams-top-strip-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(230, 240, 255, 0.95);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.livecams-top-strip-location {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.livecams-top-strip-empty {
  padding: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

/* OSINT Footer */
.livecams-osint-footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 16px;
  background: rgba(5, 12, 28, 0.95);
  border-top: 1px solid rgba(34, 211, 238, 0.25);
  font-size: 0.7rem;
  z-index: 10;
  position: relative;
  backdrop-filter: blur(8px);
}

.livecams-osint-footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.livecams-osint-footer-label {
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
}

.livecams-osint-footer-value {
  color: #22d3ee;
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* Hotspot Presets */
.livecams-hotspots {
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(7, 21, 42, 0.6);
  border-radius: 6px;
  margin: 0 12px 12px 12px;
}

.livecams-osint-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.livecams-hotspots label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.livecams-hotspot-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.livecams-hotspot-btn {
  padding: 4px 10px;
  background: rgba(5, 12, 28, 0.8);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 4px;
  color: rgba(230, 240, 255, 0.8);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.livecams-hotspot-btn:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: #22d3ee;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.2);
}

.livecams-hotspot-icon {
  font-size: 0.8rem;
}

/* Layout */
.livecams-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 12px;
  padding: 12px;
  flex: 1;
  min-height: 0 !important; /* Allow shrinking - critical for scrolling */
  overflow: hidden !important; /* Prevent layout scroll, let children handle it */
  position: relative;
  z-index: 2;
  height: 100%;
  max-height: 100%;
}

/* View Panel (replaces right panel) */
.livecams-view-panel {
  display: flex;
  flex-direction: column;
  background: rgba(5, 12, 28, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  padding: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(34, 211, 238, 0.02);
  position: relative;
}

.livecams-view-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.3), transparent);
  pointer-events: none;
}

/* Grid View Modes */
.livecams-grid-view {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.livecams-view-grid4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.livecams-view-grid9 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.livecams-view-grid16 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.livecams-view-grid36 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
}

.livecams-grid-cell {
  background: rgba(7, 21, 42, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.livecams-grid-cell:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
  transform: scale(1.02);
  z-index: 10;
}

.livecams-grid-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(5, 12, 28, 0.8);
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
  font-size: 0.65rem;
}

.livecams-grid-cell-title {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.livecams-grid-cell-status {
  font-size: 0.8rem;
  margin-left: 6px;
}

.livecams-grid-cell-status.online {
  color: #4ade80;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.livecams-grid-cell-display {
  flex: 1;
  position: relative;
  background: rgba(3, 8, 18, 0.8);
  min-height: 120px;
  overflow: hidden;
}

.livecams-grid-cell-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.livecams-grid-cell-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.2);
}

.livecams-grid-cell-footer {
  padding: 4px 8px;
  background: rgba(5, 12, 28, 0.8);
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Left Panel: Browser */
.livecams-left-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden !important; /* Let children handle scrolling */
  overflow-x: hidden !important;
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.85) 0%, rgba(7, 21, 42, 0.85) 100%);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  min-height: 0 !important; /* Critical for flex scrolling */
  max-height: 100%;
}

.livecams-watchlist-container,
.livecams-search-container,
.livecams-filters-container {
  flex-shrink: 0;
}

.livecams-grid-container {
  flex: 1 1 auto; /* Allow growth and shrinking */
  overflow-y: auto !important; /* Ensure scrolling is enabled */
  overflow-x: hidden !important;
  min-height: 0 !important; /* Critical for flex scrolling */
  max-height: none; /* Remove max-height restriction - allow expansion */
  position: relative;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.3) rgba(5, 12, 28, 0.5);
}

/* Custom scrollbar for grid container (non-fullscreen) */
.livecams-grid-container::-webkit-scrollbar {
  width: 8px;
}

.livecams-grid-container::-webkit-scrollbar-track {
  background: rgba(5, 12, 28, 0.5);
}

.livecams-grid-container::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.3);
  border-radius: 4px;
}

.livecams-grid-container::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.5);
}

/* Watchlist */
.livecams-watchlist {
  background: rgba(5, 15, 35, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.livecams-watchlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.livecams-watchlist-header h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #22d3ee;
}

.livecams-btn-clear {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  cursor: pointer;
}

.livecams-btn-clear:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.livecams-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.livecams-watchlist-empty {
  padding: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

/* Search Bar */
.livecams-search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.livecams-search-input {
  flex: 1;
  padding: 0.6rem;
  background: rgba(5, 15, 35, 0.7);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 8px;
  color: rgba(230, 240, 255, 0.95);
  font-size: 0.9rem;
}

.livecams-search-input:focus {
  outline: none;
  border-color: #22d3ee;
}

.livecams-search-btn {
  padding: 0.6rem 1rem;
  background: #22d3ee20;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  color: #22d3ee;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.livecams-search-btn:hover {
  background: #22d3ee30;
}

.livecams-search-btn svg {
  width: 18px;
  height: 18px;
}

/* Filters */
.livecams-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

.livecams-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.livecams-filter-group label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.livecams-select,
.livecams-input {
  padding: 0.5rem;
  background: rgba(5, 15, 35, 0.7);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 8px;
  color: rgba(230, 240, 255, 0.95);
  font-size: 0.85rem;
}

.livecams-select:focus,
.livecams-input:focus {
  outline: none;
  border-color: #22d3ee;
}

.livecams-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.livecams-chip {
  padding: 0.4rem 0.8rem;
  background: rgba(5, 15, 35, 0.6);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.livecams-chip:hover {
  border-color: rgba(74, 158, 255, 0.4);
  color: rgba(230, 240, 255, 0.95);
}

.livecams-chip.active {
  background: #22d3ee20;
  border-color: #22d3ee;
  color: #22d3ee;
}

/* Camera Grid */
.livecams-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cameras per row - scrollable grid */
  gap: 0.75rem;
  padding: 0.5rem;
  padding-bottom: 2rem; /* Extra padding at bottom for last row visibility */
  overflow: visible !important; /* Let parent container handle scrolling */
  min-height: min-content !important; /* Allow grid to grow with content */
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.livecams-card {
  background: rgba(7, 21, 42, 0.75);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.livecams-card:hover {
  border-color: #22d3ee;
  transform: translateY(-2px);
}

.livecams-card.selected {
  border-color: #22d3ee;
  box-shadow: 0 0 0 2px #22d3ee40;
}

.livecams-card-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: rgba(5, 15, 35, 0.7);
  overflow: hidden;
}

.livecams-card-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.livecams-card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.35);
}

.livecams-status-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(5, 15, 35, 0.8);
}

.livecams-status-dot.online {
  background: #4ade80;
}

.livecams-status-dot.offline {
  background: #ef4444;
}

.livecams-status-dot.unknown {
  background: #888;
}

.livecams-card-content {
  padding: 0.75rem;
}

.livecams-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(230, 240, 255, 0.95);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.livecams-card-location {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.25rem;
}

.livecams-card-road {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.5rem;
}

.livecams-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.livecams-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid;
}

.livecams-card-actions {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

.livecams-btn-icon {
  padding: 0.25rem 0.5rem;
  background: rgba(5, 15, 35, 0.7);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.livecams-btn-icon:hover {
  background: rgba(7, 21, 42, 0.9);
  color: #22d3ee;
}

.livecams-btn-icon.active {
  color: #ffd700;
}

/* Single View Player (now in view panel) */
.livecams-view-single {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.livecams-player-container {
  flex: 1;
  min-height: 0;
}

.livecams-player-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.livecams-player {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.livecams-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.livecams-player-title {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(230, 240, 255, 0.95);
  font-weight: 600;
}

.livecams-player-display {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: rgba(3, 8, 18, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(34, 211, 238, 0.03);
}

.livecams-player-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(34, 211, 238, 0.02) 1px,
    rgba(34, 211, 238, 0.02) 2px
  );
  pointer-events: none;
  z-index: 1;
}

.livecams-player-iframe,
.livecams-player-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.livecams-player-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 3rem;
}

.livecams-player-placeholder p {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.livecams-player-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.livecams-player-meta strong {
  color: #e0e0e0;
}

.livecams-player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.livecams-tag {
  padding: 0.2rem 0.5rem;
  background: rgba(5, 15, 35, 0.7);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.livecams-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.livecams-btn {
  padding: 0.5rem 1rem;
  background: #22d3ee20;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  color: #22d3ee;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.livecams-btn:hover {
  background: #22d3ee30;
  border-color: #22d3ee;
}

/* Loading & Error States */
.livecams-loading,
.livecams-error,
.livecams-empty {
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.livecams-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(74, 158, 255, 0.2);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Disclaimer */
.livecams-disclaimer {
  padding: 0.75rem 1rem;
  background: rgba(7, 21, 42, 0.5);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Responsive */
@media (max-width: 1400px) {
  .livecams-layout {
    grid-template-columns: 300px 1fr 350px;
  }
}

@media (max-width: 1200px) {
  .livecams-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  
  .livecams-right-panel {
    max-height: 500px;
  }
}

/* ============================================
   SKELETON LOADERS & ENHANCED ANIMATIONS
   ============================================ */

/* Skeleton Loading State */
.livecams-skeleton {
  pointer-events: none;
  animation: skeletonFadeIn 0.3s ease-out forwards;
  opacity: 0;
}

@keyframes skeletonFadeIn {
  to { opacity: 1; }
}

.livecams-skeleton-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.05) 0%,
    rgba(34, 211, 238, 0.1) 50%,
    rgba(34, 211, 238, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.livecams-skeleton-title {
  height: 14px;
  width: 80%;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 4px;
  margin-bottom: 8px;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.livecams-skeleton-location {
  height: 10px;
  width: 60%;
  background: rgba(34, 211, 238, 0.06);
  border-radius: 4px;
  margin-bottom: 6px;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
}

.livecams-skeleton-meta {
  height: 20px;
  width: 40%;
  background: rgba(34, 211, 238, 0.04);
  border-radius: 4px;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  animation-delay: 0.2s;
}

@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Loading status indicator */
.livecams-loading-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  color: rgba(34, 211, 238, 0.8);
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.livecams-spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(34, 211, 238, 0.2);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Grid loading state */
.livecams-grid-loading {
  opacity: 0.7;
}

/* Card enter animation */
.livecams-card {
  animation: cardEnter 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes cardEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card hover overlay */
.livecams-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.7) 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
}

.livecams-card:hover .livecams-card-overlay {
  opacity: 1;
}

.livecams-card-view-hint {
  font-size: 0.7rem;
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Live badge */
.livecams-card-live-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  animation: livePulse 2s ease-in-out infinite;
  z-index: 5;
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* Image loading state */
.livecams-card.loading-image .livecams-card-thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1s ease-in-out infinite;
}

/* Card image loaded transition */
.livecams-card-image {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.livecams-card:hover .livecams-card-image {
  transform: scale(1.05);
}

/* Location icon styling */
.livecams-location-icon {
  opacity: 0.7;
  margin-right: 2px;
}

/* Provider tag */
.livecams-provider-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 4px;
  color: rgba(34, 211, 238, 0.9);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Grid header */
.livecams-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

.livecams-result-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #22d3ee;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.livecams-result-hint {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Error state enhanced */
.livecams-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2rem;
}

.livecams-error-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.livecams-error h4 {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.livecams-error p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.livecams-btn-retry {
  padding: 0.6rem 1.5rem;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 8px;
  color: #22d3ee;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.livecams-btn-retry:hover {
  background: rgba(34, 211, 238, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.2);
}

/* Empty state enhanced */
.livecams-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 2rem;
}

.livecams-empty-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.livecams-empty h4 {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.livecams-empty p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-align: center;
}

.livecams-empty-suggestions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.livecams-btn-suggestion {
  padding: 0.4rem 0.8rem;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.livecams-btn-suggestion:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: #22d3ee;
}

/* Map button on card */
.livecams-card-actions [data-action="map"] {
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s;
}

.livecams-card:hover .livecams-card-actions [data-action="map"] {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ENHANCED PLAYER PANEL
   ============================================ */

.livecams-player-enhanced {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.livecams-player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.livecams-player-header-left {
  flex: 1;
  min-width: 0;
}

.livecams-player-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: rgba(230, 240, 255, 0.95);
  font-weight: 600;
  line-height: 1.3;
}

.livecams-player-location-badge {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.livecams-player-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.livecams-player-mode-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.livecams-player-mode-badge.live {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: livePulse 2s ease-in-out infinite;
}

.livecams-player-mode-badge.snapshot {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

/* Larger player display */
.livecams-player-display-large {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  min-height: 300px;
  background: rgba(3, 8, 18, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(34, 211, 238, 0.03);
}

/* Live indicator */
.livecams-player-live-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 10;
}

.livecams-live-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: liveDot 1s ease-in-out infinite;
}

@keyframes liveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Refresh timer indicator */
.livecams-player-refresh-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #22d3ee;
  font-size: 0.7rem;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 10;
}

.livecams-refresh-icon {
  animation: spin 2s linear infinite;
}

.livecams-refresh-countdown {
  min-width: 20px;
  text-align: right;
}

/* Navigation controls overlay */
.livecams-player-controls-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.livecams-player-display-large:hover .livecams-player-controls-overlay {
  opacity: 1;
}

.livecams-player-control {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.livecams-player-control:hover {
  background: rgba(34, 211, 238, 0.3);
  border-color: #22d3ee;
  transform: scale(1.1);
}

/* Player toolbar */
.livecams-player-toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.livecams-player-tool {
  padding: 0.4rem 0.75rem;
  background: rgba(5, 15, 35, 0.8);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.livecams-player-tool:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: #22d3ee;
}

.livecams-player-tool.refreshing {
  animation: toolRefresh 0.5s ease;
}

@keyframes toolRefresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Compact meta */
.livecams-player-meta-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.livecams-player-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.livecams-meta-item {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Source link */
.livecams-player-source-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 6px;
  color: #22d3ee;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.livecams-player-source-link:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.4);
}

/* Empty state enhanced */
.livecams-player-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}

.livecams-player-empty-icon {
  font-size: 4rem;
  opacity: 0.4;
}

.livecams-player-empty h4 {
  margin: 0;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
}

.livecams-player-empty p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.livecams-player-shortcuts {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.livecams-shortcut {
  font-size: 0.7rem;
  color: rgba(34, 211, 238, 0.6);
  padding: 0.3rem 0.6rem;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}
