/* ==========================================================================
   Global & Layout
   ========================================================================== */
body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* ==========================================================================
   Header & Login Box
   ========================================================================== */
header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

#stream-button.header-stream-button {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  background-color: #121212;
  color: #00ff00;
  border: 2px solid #00ff00;
  padding: 0.5rem 5px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 2.1rem !important;
  font-weight: bold;
  text-align: center;
  line-height: 1.2 !important;
  white-space: pre-wrap !important;
  width: 200px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
  transition: box-shadow 0.3s ease;
}
#stream-button.header-stream-button:hover {
  box-shadow: 0 0 15px #00ff00, 0 0 30px #00ff00;
}
#stream-button.header-stream-button.not-streaming {
  color: #00ff00;
  border-color: #00ff00;
  box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
}
#stream-button.header-stream-button.not-streaming:hover {
  box-shadow: 0 0 15px #00ff00, 0 0 30px #00ff00;
}
#stream-button.header-stream-button.streaming {
  color: #ff0000;
  border-color: #ff0000;
  box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
  animation: red-pulse 1.5s infinite ease-in-out, text-flash 1.5s infinite ease-in-out;
}
@keyframes red-pulse {
  0%, 100% {
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
  }
  50% {
    box-shadow: 0 0 25px #ff0000, 0 0 50px #ff0000;
  }
}
@keyframes text-flash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo {
  max-width: 150px;
}

.portal-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #e0e0e0;
}

.logout-button {
  background-color: #b00020;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.logout-button:hover {
  background-color: #910016;
}

.back-button {
  display: inline-block;
  background-color: #2979ff;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
}
.back-button:hover {
  background-color: #1565c0;
}

.login-box {
  background-color: #1e1e1e;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  margin: 2rem auto;
}
.login-box h2 {
  margin-bottom: 1rem;
  color: #e0e0e0;
}
.login-box label {
  display: block;
  margin-top: 0.5rem;
  color: #e0e0e0;
}
.login-box input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  background-color: #2e2e2e;
  border: none;
  border-radius: 4px;
  color: #e0e0e0;
}
.login-box button {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  background-color: #2979ff;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}
.login-box button:hover {
  background-color: #1565c0;
}

/* ==========================================================================
   Fieldsets & Checkbox Grid
   ========================================================================== */
.fieldset-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

fieldset.base-url,
fieldset.enable-streams {
  background-color: #1e1e1e;
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 4px;
  flex: 1;
  box-sizing: border-box;
}

.enable-streams .checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  grid-gap: 0.5rem 1rem;
}
.enable-streams label {
  margin: 0;
  white-space: nowrap;
  color: #e0e0e0;
}

/* ==========================================================================
   Stream Buttons (Tabs)
   ========================================================================== */
.stream-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.stream-button {
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease;
  color: #ffffff;
}
.stream-button:hover {
  transform: scale(1.05);
}
.stream-button.active {
  animation: blue-hue-blink 2s infinite ease-in-out;
}

@keyframes blue-hue-blink {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 183, 235, 0.5);
  }
  50% {
    box-shadow: 0 0 16px rgba(0, 183, 235, 1.0);
  }
}

/* ==========================================================================
   Panels & Inputs
   ========================================================================== */
.stream-panels-container {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 1rem;
}

.stream-panel {
  display: none;
}

label {
  display: block;
  margin: 0.75rem 0;
  color: #e0e0e0;
}
input[type="text"],
input[type="file"],
select {
  width: 100%;
  padding: 0.5rem;
  background-color: #2e2e2e;
  border: none;
  border-radius: 4px;
  color: #e0e0e0;
  margin-top: 0.25rem;
}
.source-type {
  margin: 0.75rem 0;
}
.rtsp-field,
.local-field {
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Save Button & Flash Messages
   ========================================================================== */
button.save-button {
  background-color: #388e3c;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
}
button.save-button:hover {
  background-color: #2e7d32;
}

.flash {
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2rem;
}
.flash.danger {
  background-color: #b00020;
  color: white;
}
.flash.success {
  background-color: #388e3c;
  color: white;
}
.flash.success::before {
  content: '✅';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.flash.danger::before {
  content: '⚠️';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ==========================================================================
   Advertising Management Styles
   ========================================================================== */
.ads-table {
  width: 100%;
  border-collapse: collapse;
}
.ads-table th,
.ads-table td {
  padding: 0.75rem;
  border: 1px solid #333;
}
.ads-table th {
  background-color: #1e1e1e;
  color: #e0e0e0;
}
.ads-table td {
  color: #e0e0e0;
}

.upload-ad-button {
  background-color: #2979ff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 1rem;
}
.upload-ad-button:hover {
  background-color: #1565c0;
}
.save-ad-button {
  background-color: #388e3c;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
}
.save-ad-button:hover {
  background-color: #2e7d32;
}
.delete-ad-button {
  background-color: #b00020;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.delete-ad-button:hover {
  background-color: #910016;
}

.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}
.modal-content {
  background-color: #2e2e2e;
  margin: 10% auto;
  padding: 1rem;
  border: 1px solid #333;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #e0e0e0;
}
.modal-close:hover {
  color: #ffffff;
}

.logout-form {
  display: inline-block;
}

.overlay-settings-row {
  display: flex;                     /* Aligns the fields horizontally */
  justify-content: space-between;    /* Evenly space out the fields */
  gap: 20px;                         /* Adds space between fields */
  width: 100%;                       /* Full width of the container */
  box-sizing: border-box;            /* Prevents content from overflowing */
  flex-wrap: wrap;                   /* Allows wrapping on smaller screens */
  align-items: center;               /* Ensures vertical alignment of fields */
}

.overlay-settings-row > label,
.overlay-settings-row > select,
.overlay-settings-row > input {
  flex: 1 1 25%;                     /* Each field takes up 25% of the container */
  box-sizing: border-box;            /* Prevents overflow */
  min-width: 200px;                  /* Prevents fields from becoming too narrow */
  display: flex;
  flex-direction: column;            /* Ensures label is on top of input/select */
  justify-content: center;           /* Vertically aligns the content */
}


.inline-select-wrapper {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.inline-select-wrapper label {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Preview Scene Styles
   ========================================================================== */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.scene-tile {
  background-color: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}
.scene-tile h4 {
  margin: 0 0 0.5rem 0;
  color: #e0e0e0;
}
.scene-tile img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.scene-preview-header h2,
.scene-preview-header p {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Panel Visibility
   ========================================================================== */
.hidden-panel {
  display: none;
}

/* ==========================================================================
   Stream Tab Colors
   ========================================================================== */
.stream-color-0 { background-color: hsl(0, 70%, 40%); color: #fff; }
.stream-color-1 { background-color: hsl(30, 70%, 40%); color: #fff; }
.stream-color-2 { background-color: hsl(60, 70%, 40%); color: #fff; }
.stream-color-3 { background-color: hsl(90, 70%, 40%); color: #fff; }
.stream-color-4 { background-color: hsl(120, 70%, 40%); color: #fff; }
.stream-color-5 { background-color: hsl(150, 70%, 40%); color: #fff; }
.stream-color-6 { background-color: hsl(180, 70%, 40%); color: #fff; }
.stream-color-7 { background-color: hsl(210, 70%, 40%); color: #fff; }
.stream-color-8 { background-color: hsl(240, 70%, 40%); color: #fff; }
.stream-color-9 { background-color: hsl(270, 70%, 40%); color: #fff; }
.stream-color-10 { background-color: hsl(300, 70%, 40%); color: #fff; }
.stream-color-11 { background-color: hsl(330, 70%, 40%); color: #fff; }

/* ==========================================================================
   Utility Display Classes
   ========================================================================== */
.hidden {
  display: none;
}

.inline {
  display: inline;
}

/* ==========================================================================
   Header Nav Grouping
   ========================================================================== */
.header-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.nav-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.scene-button {
  background-color: #f9a825;
}
.scene-button:hover {
  background-color: #fbc02d;
}

.ad-button {
  background-color: #1976d2;
}
.ad-button:hover {
  background-color: #1565c0;
}

.services-button-container {
  margin: 10px 0;
  text-align: left;
}

.services-launch-button {
  background-color: #1f8f1f;
  color: #fff;
  padding: 10px 14px;
  border: none;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 4px #0f0;
}

.services-launch-button:hover {
  background-color: #2dbf2d;
}


.optional-camera-section label {
  display: block;
  margin: 0.3em 0;
}

.pin-cam-config,
.player-cam-config {
  margin-top: 0.5em;
  padding-left: 1em;
}

.pin-rtsp-field,
.player-rtsp-field,
.pin-local-field,
.player-local-field {
  margin: 0.3em 0;
  width: 100%;
}

.source-type,
.stream-row .optional-camera-section {
  flex: 1 1 50%;
  box-sizing: border-box;
}

.stream-row .optional-camera-section {
  margin-top: 0 !important;
}

/* ==========================================================================
   Side-by-side Source + Optional-cams
   ========================================================================== */
.stream-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.stream-row .source-type,
.stream-row .optional-camera-section {
  flex: 1 1 50%;
  box-sizing: border-box;
  margin-top: 0;  /* kill default margins that push it down */
}

/* ─────────────────────────────────────────────────────────────────────────
   Side-by-side layout: left = source + RTSP + local; right = optional cams
   ──────────────────────────────────────────────────────────────────────── */
.stream-row,
.stream-row + .rtsp-field,
.stream-row + .rtsp-field + .local-field {
  float: left;
  width: 50%;
  box-sizing: border-box;
  margin: 0;            /* kill any extra top/bottom margin */
  padding-right: 1rem;  /* gap between columns */
}

.stream-row .optional-camera-section {
  float: right;
  width: 50%;
  box-sizing: border-box;
  margin-top: 0;
}

/* small top margin on the fields themselves */
.rtsp-field,
.local-field {
  margin-top: 0.5rem;
}

/* clear the floats after the Local field so the rest of the form resumes normal flow */
.local-field::after {
  content: "";
  display: block;
  clear: both;
}

/* Audio-section layout */
.audio-section {
  margin-top: 1rem;
}
.audio-sources-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.audio-sources-checkboxes label {
  flex: 1 1 auto;
  white-space: nowrap;
}

/* Dynamic audio-select dropdown styling */
.audio-select-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0 1.5rem; /* indent under checkboxes */
}
.audio-select-row label {
  white-space: nowrap;
}

/* ── STREAM ROW: two equal halves ── */
.stream-row {
  display: flex;
  gap: 1rem;
}
.source-type,
.optional-camera-section {
  flex: 1 1 50%;
  box-sizing: border-box;
}
.optional-camera-section {
  /* keep its dark background */
  background-color: #1e1e1e;
  padding: 0.5em;
  border: 1px solid #444;
  border-radius: 6px;
}

.audio-select-dropdown {
    width: 100%;
    padding: 0.5rem;
    background-color: #2e2e2e;
    border: none;
    border-radius: 4px;
    color: #e0e0e0;
    margin-top: 0.25rem;
}

button.clear-video-button {
    background-color: #b00020;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    margin-right: 1rem;
}
button.clear-video-button:hover {
    background-color: #910016;
}

.delay-config {
  flex: 1 1 25%;                     /* Takes up 25% of the width */
  max-width: 250px;                  /* Control the width of the delay panel */
  min-width: 250px;                  /* Prevents it from becoming too narrow */
  box-sizing: border-box;            /* Prevents overflow */
  margin-top: 0;                     /* Align with other fields */
}

.delay-config label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

.delay-config small {
  white-space: normal; /* Allow the text to wrap naturally */
  word-wrap: break-word; /* Break long words if necessary */
  max-width: 100%; /* Make the text occupy full width */
  display: block; /* Ensure it behaves like a block element */
  word-break: break-word; /* Break long words and allow wrapping */
}

.delay-input {
  width: 100%;
  max-width: 200px;
  padding: 0.5rem;
  background-color: #2e2e2e;
  border: 1px solid #444;
  border-radius: 4px;
  color: #e0e0e0;
}

.delay-warning {
  font-size: 0.85rem;
  color: #f5c842;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.form-text {
  font-size: 0.85rem;                /* Slightly smaller text */
  line-height: 1.4;                  /* Improves readability */
}

input,
select {
  width: 100%;                       /* Ensures input/select takes up full space */
  padding: 0.5rem;                   /* Adds padding */
  background-color: #2e2e2e;         /* Matches dark theme */
  border: 1px solid #444;            /* Border for visibility */
  border-radius: 4px;                /* Rounded corners */
  color: #e0e0e0;                    /* Text color */
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;                       /* Ensures radio buttons and checkboxes stay at their default size */
  margin-right: 5px;                 /* Adds space between the checkbox/radio and its label */
}

.audio-name-input {
       width: 200px;
       padding: 0.5rem;
       background-color: #2e2e2e;
       border: 1px solid #444;
       border-radius: 4px;
       color: #e0e0e0;
       margin-left: 0.5rem;
}

/* Additional CSS for remove button only */

.remove-audio-btn {
  background-color: #b00020 !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 0.5rem !important;
  cursor: pointer !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.remove-audio-btn:hover {
  background-color: #910016 !important;
}

/* OBS WebSocket Configuration Styles */
.obs-websocket-config {
  background-color: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.obs-config-title {
  color: #2979ff;
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.obs-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  color: #ffc107;
  font-size: 0.9rem;
}

.obs-config-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.obs-custom-checkbox-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.obs-custom-checkbox-wrapper label {
  font-size: 0.9rem;
  font-weight: bold;
  margin: 0.25rem 0 0 0;
}

.obs-host-wrapper,
.obs-port-wrapper {
  display: flex;
  flex-direction: column;
}

.obs-host-wrapper label,
.obs-port-wrapper label,
.obs-status-wrapper label {
  font-size: 0.9rem;
  margin: 0 0 0.25rem 0;
  color: #e0e0e0;
}

.obs-config-field {
  width: 100%;
  padding: 0.5rem;
  background-color: #2e2e2e;
  border: 1px solid #444;
  border-radius: 4px;
  color: #e0e0e0;
}

.obs-config-field[readonly] {
  background-color: #1a1a1a;
  color: #888;
}

.obs-config-field:not([readonly]):focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.obs-status-wrapper {
  text-align: center;
}

.obs-status-indicator {
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: #2e2e2e;
}

.obs-config-note {
  color: #aaa;
  font-size: 0.85rem;
  line-height: 1.4;
  display: block;
}

.obs-separator {
  border: none;
  border-top: 1px solid #444;
  margin: 1.5rem 0;
}

.obs-custom-checkbox:checked + label {
  color: #ffc107;
}

/* OBS Control Checkbox and Status */
.obs-start-checkbox {
    cursor: pointer;
}

.obs-status {
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-left: 10px;
}

.obs-status.pending {
    background-color: #ffc107;
    color: #000;
}

.obs-status.streaming {
    background-color: #4caf50;
    color: #fff;
}

.obs-status.connected {
    background-color: #ffc107;
    color: #000;
}

.obs-status.disconnected {
    background-color: #f44336;
    color: #fff;
}

.obs-status.error {
    background-color: #f44336;
    color: #fff;
}

/* ADD THESE TO YOUR style.css */

/* Top row layout */
.stream-panel-top {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stream-panel-left,
.stream-panel-right {
  flex: 1 1 50%;
}

/* Source config row with dark background */
.source-config-row {
  display: flex;
  gap: 1rem;
  background-color: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.source-type-column,
.source-fields-column {
  flex: 1 1 50%;
}

/* Fix the radio button alignment */
.source-type-column label {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

/* Remove margins from fields in the config row */
.source-config-row .rtsp-field,
.source-config-row .local-field {
  margin: 0;
}

/* Optional cameras row */
.optional-cameras-row {
  margin-bottom: 1rem;
}

/* Hide the old stream-row div */
.stream-row {
  display: none !important;
}

.stream-progress-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  z-index: 10000;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: slideInRight 0.3s ease-out;
}

.stream-progress-popup.info {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
}

.stream-progress-popup.success {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: white;
}

.stream-progress-popup.error {
  background: linear-gradient(135deg, #F44336, #D32F2F);
  color: white;
}

.progress-content {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.progress-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.progress-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-line;
}

.progress-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.progress-close:hover {
  background: rgba(255,255,255,0.2);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Audio Mute Checkboxes */
.mute-audio-checkbox {
  display: block;
  margin-top: 0.5rem;
  color: #ffc107;
  font-size: 0.9rem;
  cursor: pointer;
}

.mute-audio-checkbox input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
}

.global-autocreate {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #444;
}

.autocreate-global-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.autocreate-global-label input[type="checkbox"] {
  margin-top: 0.2rem;
}

.autocreate-help {
  display: block;
  font-size: 0.85rem;
  color: #aaa;
  margin-left: 1.5rem;
  margin-top: 0.25rem;
}
/* Lane Pair Workflow Controls: Enable → Build → Live */
.lane-workflow-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.lane-workflow-controls .btn-build,
.lane-workflow-controls .btn-golive,
.lane-workflow-controls .btn-obs-toggle {
    padding: 4px 14px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.lane-workflow-controls .btn-obs-toggle {
    background-color: #607d8b;
    color: #fff;
}

.lane-workflow-controls .btn-obs-toggle:hover {
    background-color: #455a64;
}

.lane-workflow-controls .btn-obs-toggle.is-open {
    background-color: #4caf50;
}

.lane-workflow-controls .btn-obs-toggle.is-open:hover {
    background-color: #388e3c;
}

.lane-workflow-controls .btn-obs-toggle:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.lane-workflow-controls .btn-build {
    background-color: #2196f3;
    color: #fff;
}

.lane-workflow-controls .btn-build:hover {
    background-color: #1976d2;
}

.lane-workflow-controls .btn-build:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.lane-workflow-controls .btn-golive {
    background-color: #4caf50;
    color: #fff;
}

.lane-workflow-controls .btn-golive:hover {
    background-color: #388e3c;
}

.lane-workflow-controls .btn-golive.is-live {
    background-color: #f44336;
}

.lane-workflow-controls .btn-golive.is-live:hover {
    background-color: #d32f2f;
}

.lane-workflow-controls .btn-golive:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.lane-workflow-controls .workflow-status {
    font-size: 0.8rem;
    color: #aaa;
    margin-left: 4px;
}

.camera-rotation-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.camera-rotation-row label {
  color: #adb5bd;
  font-size: 0.85rem;
  white-space: nowrap;
}

.camera-rotation-row select {
  background: #2a2d3a;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.camera-rotation-row select:focus {
  outline: none;
  border-color: #5b8dee;
}

/* Refresh overlays bar */
.refresh-overlays-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px 0;
}
.btn-refresh-overlays {
  background: #2a6496;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 7px 18px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-refresh-overlays:hover:not(:disabled) { background: #1e4f78; }
.btn-refresh-overlays:disabled { opacity: 0.6; cursor: not-allowed; }
.refresh-overlays-status { font-size: 12px; color: #8bc34a; font-weight: 500; }
