/* Custom minimal CSS on top of Tailwind */
html, body { height: 100%; }
/* Hint browser to render native form controls in dark mode */
html { color-scheme: dark; }
#countries::-webkit-scrollbar, #channels::-webkit-scrollbar { width: 10px; height: 10px; }
#countries::-webkit-scrollbar-thumb, #channels::-webkit-scrollbar-thumb { background-color: rgba(148,163,184,0.3); border-radius: 9999px; }
#countries::-webkit-scrollbar-track, #channels::-webkit-scrollbar-track { background-color: transparent; }

.card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,132,199,.25); }

/* Lazy sections below the fold */
.lazy-section { content-visibility: auto; contain-intrinsic-size: 1000px 800px; }

/* Globe tooltip */
.globe-tooltip {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -120%);
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(2,132,199,0.25);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 20;
}
.globe-tooltip[data-show="true"] { opacity: 1; }

/* Center selector for mobile */
.center-selector {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 15;
}

/* Report button for embed player */
.report-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ef4444, #ec4899);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 16px auto 0;
}

.report-btn:hover {
  background: linear-gradient(135deg, #dc2626, #db2777);
  transform: scale(1.02);
}

.report-btn svg {
  width: 16px;
  height: 16px;
}
#center-dot {
  width: 10px; /* smaller dot */
  height: 10px;
  border-radius: 9999px;
  background: #7F1D1D; /* dark red */
  box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.35), 0 0 14px rgba(127, 29, 29, 0.55);
  opacity: .9;
}
.center-label {
  position: absolute;
  top: calc(50% - 18px);
  transform: translateY(-100%);
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(2,132,199,0.25);
  display: none;
}
.center-label[data-show="true"] { display: inline-block; }

/* Video.js error screen nicer look */
.vjs-error-display .vjs-modal-dialog-content {
  display: grid;
  place-items: center;
  text-align: center;
  color: #e2e8f0;
}
.vjs-error-display .vjs-modal-dialog-content::before {
  content: '';
  display: block;
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f43f5e, #ef4444);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11H11V7h2v6zm0 4H11v-2h2v2z"/></svg>') center/28px 28px no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2a10 10 0 100 20 10 10 0 000-20zm1 11H11V7h2v6zm0 4H11v-2h2v2z"/></svg>') center/28px 28px no-repeat;
}
.vjs-error-display .vjs-modal-dialog-content { font-size: 14px; }

/* Hide center selector on >=640px (desktop/tablet) */
@media (min-width: 640px) {
  .center-selector { display: none !important; }
} 

/* Force dark styling for dropdown selects so text is readable */
#filter-region,
#filter-category,
#filter-category-inline,
select {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Options list background/text when the native menu is open */
select option {
  color: #e2e8f0;
  background-color: #0b1220; /* site bg */
}

select optgroup {
  color: #94a3b8;
  background-color: #0b1220;
}

/* Focus ring consistent with brand color */
#filter-region:focus,
#filter-category:focus,
#filter-category-inline:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.4);
  border-color: rgba(6, 182, 212, 0.6);
}

/* Ensure portrait (vertical) videos fit inside horizontal player */
#player-container video,
#player-container .vjs-tech {
  object-fit: contain !important;
  object-position: center center !important;
  background-color: #000;
}

/* Ensure Video.js fill mode respects container and not overflow */
.video-js.vjs-fill,
.video-js.vjs-fill .vjs-tech {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Fullscreen handling for contain-fit as well */
.video-js.vjs-fullscreen .vjs-tech,
#player-container :fullscreen video,
#player-container :-webkit-full-screen video,
#player-container :-moz-full-screen video {
  object-fit: contain !important;
  object-position: center center !important;
}

/* Reduce spacing between main content and footer on desktop */
@media (min-width: 1024px) {
  /* Force the app container to not use full height */
  #app {
    min-height: auto !important;
  }
  
  /* Make main content not expand to fill space */
  main {
    flex: none !important;
  }
  
  /* Reduce padding on main grid */
  #app-main-grid {
    padding-top: 1rem !important;
    padding-bottom: 0.5rem !important; /* small space before footer */
  }
  
  /* Reduce footer padding */
  footer {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* Submit page custom styles */
.form-section {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(71, 85, 105, 0.3);
  transition: all 0.3s ease;
}
.form-section:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}
.input-field {
  transition: all 0.3s ease;
}
.input-field:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}
.custom-marker {
  background: transparent !important;
  border: none !important;
}
.leaflet-popup-content {
  font-family: 'Inter', sans-serif;
}
.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

/* Volume slider styling */
.slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.slider::-webkit-slider-track {
  background: #374151;
  height: 8px;
  border-radius: 4px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: #3b82f6;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.slider::-moz-range-track {
  background: #374151;
  height: 8px;
  border-radius: 4px;
  border: none;
}

.slider::-moz-range-thumb {
  background: #3b82f6;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}