/* ================================
   Hue Ambiance — Premium Block
   ================================ */

.hue-ambiance {
  margin-top: 22px;
  padding: 16px 18px;

  /* EXACT match with your existing modal background */
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.03),
    0 0 22px rgba(0, 0, 0, 0.4);
}

/* Header + badge */

.hue-ambiance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.hue-ambiance-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.badge-premium {
  background: var(--gold);
  color: #000;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* Help text */

.hue-ambiance-help {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Rows & labels */

.hue-ambiance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hue-lights-row {
  align-items: flex-start;
}

.hue-ambiance-label {
  font-size: 14px;
  color: var(--fg);
}

.hue-ambiance-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Buttons in "Lights" row */

.hue-ambiance-buttons .btn {
  margin-left: 6px;
}

/* Toggle (Enable Hue sync) */

.hue-ambiance .toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hue-ambiance .toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* Status line & bridge line */

.hue-ambiance-status {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.hue-ambiance-status[data-ok="0"] {
  color: #ff4d4f;
}

.hue-ambiance-status[data-ok="1"] {
  color: var(--accent);
}

.hue-ambiance-bridge {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.hue-ambiance-bridge[data-ok="1"] {
  color: var(--accent);
}

/* ============================
   Sync mode pills (Theme/Ana/…)
   ============================ */

.hue-ambiance-modes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.hue-ambiance-mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hue-mode-btn {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  opacity: 0.9;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease,
    opacity 0.15s ease;
}

.hue-mode-btn:hover {
  transform: translateY(-1px);
  opacity: 1;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.hue-mode-btn.is-active {
  background: radial-gradient(
    circle at 50% 0,
    var(--accent-soft, #38bdf8),
    rgba(8, 47, 73, 0.95)
  );
  color: #020617;
  border-color: var(--accent, #38bdf8);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
  opacity: 1;
}

/* ============================================
   Hue Ambiance – Thin neon sliders (final reset)
   ============================================ */

/* Row layout */
.hue-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.hue-slider-row .hue-ambiance-label {
  flex: 0 0 90px;
}

/* Base input */
.hue-slider {
  flex: 1;
  max-width: 260px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}

/* THIN RAIL – stops the rectangle problem */
.hue-slider::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

/* GLOWING ORB – centered in the pill */
.hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.32),
      rgba(0, 0, 0, 0.22) 70%
    ),
    var(--accent);
  border: 2px solid rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 10px var(--accent);
  margin-top: -9px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.hue-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 0 14px var(--accent);
}

/* Firefox */
.hue-slider::-moz-range-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

.hue-slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.32),
      rgba(0, 0, 0, 0.22) 70%
    ),
    var(--accent);
  border: 2px solid rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 10px var(--accent);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.hue-slider::-moz-range-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 0 14px var(--accent);
}

/* ============================
   Breathe mode switch
   ============================ */
.hue-breathe-row {
  margin-top: 4px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px;
  cursor: pointer;
}

.switch input {
  display: none;
}

.switch-ui {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

/* knob */
.switch-ui::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255,255,255,0.18),
      rgba(0,0,0,0.28)
    ),
    #4b5563;
  box-shadow: none;
  transition:
    transform 0.18s ease-out,
    background 0.18s ease-out;
}

.switch input:checked + .switch-ui::before {
  transform: translateX(20px);
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255,255,255,0.18),
      rgba(0,0,0,0.28)
    ),
    var(--accent);
}

/* ============================
   Hue Live Preview panel
   ============================ */
.hue-preview {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.05), transparent 55%),
    var(--card); /* <-- instead of rgba(8,10,12,0.96) */
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.55),
    0 0 18px rgb(var(--accent-rgb) / 0.20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hue-preview-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The little glowing pill on the left */
.hue-preview-pill {
  width: 64px;
  height: 32px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 10% 20%, #ffb36b, transparent 55%),
    radial-gradient(circle at 90% 80%, #4be0ff, transparent 55%),
    #15181b;
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.9),
    0 0 18px rgb(var(--accent-rgb) / 0.45);
}

.hue-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hue-preview-title {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hue-preview-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--muted);
}

.hue-preview-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.hue-preview-meta {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--muted) 80%, #9ca3af);
}

/* Test ping button matches your UI, but subtle */
.hue-preview .btn.subtle {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  background: #15181b;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hue-preview .btn.subtle:hover {
  box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.35);
}

.hue-ambiance-launcher{
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hue-ambiance-launcher:hover{
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  box-shadow:
    0 0 10px rgb(var(--accent-rgb) / .4),
    0 0 24px rgb(var(--accent-rgb) / .3);
}

.hue-ambiance-launcher-copy{
  min-width: 0;
  flex: 1;
}

.hue-ambiance-launcher-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hue-ambiance-launcher-title-row h3{
  margin: 0;
}

.hue-ambiance-launcher-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 700;
  white-space: nowrap;
}

/* Mobile: stack pill + button */
@media (max-width: 600px) {
  .hue-preview {
    flex-direction: column;
    align-items: stretch;
  }

  .hue-preview .btn.subtle {
    align-self: flex-end;
  }
}

