/* Modern Dark NOC Theme & Video Wall Custom Styling */

:root {
  --bg-primary: #06090e;
  --bg-secondary: #0c121d;
  --border-subtle: rgba(51, 65, 85, 0.4);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.6);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}

/* Alpine cloaking & utility hidden */
[x-cloak] {
  display: none !important;
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.animate-shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Video Slot Container */
.video-slot {
  position: relative;
  background: #000;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.video-slot:hover {
  border-color: rgba(59, 130, 246, 0.6);
}

.video-slot.slot-active {
  border-color: #3b82f6 !important;
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4), 0 0 24px rgba(59, 130, 246, 0.35) !important;
}

/* Video Overlay Bar — auto-hide by default, show on hover or when slot is active */
.slot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(11, 13, 17, 0.85);
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 20;
}

/* Show OSD on hover */
.video-slot:hover .slot-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Always show OSD on the active (selected) slot */
.video-slot.slot-active .slot-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* hide-osd class: kept for backward compat with toggle, same as default now */
.video-slot.hide-osd .slot-overlay {
  opacity: 0;
  pointer-events: none;
}

.video-slot.hide-osd:hover .slot-overlay {
  opacity: 1;
  pointer-events: auto;
}

.video-slot.hide-osd.slot-active .slot-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Video Fit Mode */
.video-slot iframe.video-cover {
  object-fit: cover !important;
  transform: scale(1.03);
}

.video-slot iframe.video-contain {
  object-fit: contain !important;
}

/* Carousel / Patrol Progress Bar */
.carousel-progress-container {
  height: 3px;
  background: #1e232d;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-progress-bar {
  height: 100%;
  background: #3b82f6;
  transition: width 0.1s linear;
}

/* Kiosk Mode (Fullscreen TV Satpam) */
body.kiosk-mode {
  overflow: hidden !important;
  background: #000 !important;
}

body.kiosk-mode .main-header,
body.kiosk-mode .main-sidebar,
body.kiosk-mode .main-footer {
  display: none !important;
}

body.kiosk-mode .video-wall-container {
  height: 100vh !important;
  width: 100vw !important;
  padding: 0.25rem !important;
  gap: 0.25rem !important;
  margin: 0 !important;
}

body.kiosk-mode .video-slot {
  border-radius: 0.25rem !important;
  border-width: 1px !important;
}

/* Floating Kiosk Bar (Auto-hide) */
.kiosk-floating-bar {
  position: fixed;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 100;
  background: #12151b;
  border: 1px solid #2a3241;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.kiosk-hotzone:hover ~ .kiosk-floating-bar,
.kiosk-floating-bar:hover,
.kiosk-floating-bar.show-temporarily {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Timeline custom styling */
.timeline-track {
  background: #161b22;
  border: 1px solid #30363d;
  position: relative;
  height: 2.25rem;
  border-radius: 0.375rem;
  cursor: pointer;
  user-select: none;
}
