/* settings.css */

/* Shared cards */
.settings-card {
  border-left: 4px solid #0ea5e9;
  /* sky-500 */
}

.settings-card-overstay {
  border-left-color: #f97316;
  /* orange-500 */
}

/* Labels / inputs */
.settings-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 4px;
}

.settings-input {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  font-size: 0.75rem;
  background-color: #ffffff;
}

.settings-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2);
}

.settings-range {
  width: 100%;
}

/* Help text */
.settings-help {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Radio / checkbox styling */
.settings-radio,
.settings-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: #4b5563;
}

.settings-radio input,
.settings-checkbox input {
  margin-top: 2px;
}

/* Toggle */
.settings-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 11px;
  color: #4b5563;
}

.settings-toggle input {
  display: none;
}

.settings-toggle-slider {
  width: 34px;
  height: 18px;
  border-radius: 9999px;
  background-color: #e5e7eb;
  position: relative;
  transition: background-color 0.15s ease;
}

.settings-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.settings-toggle input:checked+.settings-toggle-slider {
  background-color: #22c55e;
}

.settings-toggle input:checked+.settings-toggle-slider::before {
  transform: translateX(16px);
}

.settings-toggle-label {
  font-size: 11px;
}

/* Summary card */
.settings-summary {
  border-left: 4px solid #22c55e;
}

.settings-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #4b5563;
}

.settings-summary-list li {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.settings-summary-list li::before {
  content: "•";
  color: #22c55e;
}

/* Simulation card */
.settings-sim {
  border-left: 4px solid #0f172a;
}


/* Settings tabs */
.settings-tab {
  padding: 8px 12px;
  border-radius: 10px 10px 0 0;
  border: 1px solid transparent;
  color: #475569;
  /* slate-600 */
}

.settings-tab:hover {
  background: #f1f5f9;
}

/* slate-100 */
.settings-tab.is-active {
  background: #ffffff;
  border-color: #e2e8f0;
  /* slate-200 */
  border-bottom-color: #ffffff;
  color: #0f172a;
  /* slate-900 */
  font-weight: 600;
}

/* Small primary button for settings header actions */
.settings-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.settings-btn-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.settings-btn-primary:active {
  transform: translateY(1px);
}

.settings-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.2);
}

.settings-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.settings-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.settings-btn:active {
  transform: translateY(1px);
}

.settings-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
}

.settings-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-btn + .settings-btn {
  margin-left: 6px;
}

.cam-heartbeat-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  display: inline-block;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.cam-heartbeat-dot.is-live {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: cam-heartbeat-pulse 1.4s ease-out infinite;
}

.cam-heartbeat-dot.is-dead {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
}

@keyframes cam-heartbeat-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}