/* ═══════════════════════════════════════════
   LIGHT FX — Dock Icon
   ═══════════════════════════════════════════ */

/* ─── icon container ─── */
#module-light-fx .lfx-btn-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

/* ─── central sun core ─── */
#module-light-fx .lfx-btn-sun {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%,
    #fff8e0 0%, #ffd060 40%, #ff9020 80%, #cc5500 100%);
  box-shadow:
    0 0 6px 2px rgba(255, 210, 80, 0.6),
    0 0 14px 4px rgba(255, 160, 40, 0.3);
  animation: lfx-pulse 3.0s ease-in-out infinite;
  z-index: 3;
}
#module-light-fx .lfx-btn-sun::after {
  content: "";
  position: absolute;
  top: 2px; left: 3px;
  width: 5px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(1px);
}

@keyframes lfx-pulse {
  0%, 100% { transform: scale(1.0); box-shadow: 0 0 6px 2px rgba(255,210,80,.6), 0 0 14px 4px rgba(255,160,40,.3); }
  50%      { transform: scale(1.08); box-shadow: 0 0 8px 3px rgba(255,210,80,.75), 0 0 18px 6px rgba(255,160,40,.4); }
}

/* ─── god rays (6 lines radiating from center) ─── */
#module-light-fx .lfx-btn-ray {
  position: absolute;
  width: 2px;
  height: 18px;
  top: 50%;
  left: 50%;
  transform-origin: center 0;
  border-radius: 1px;
  z-index: 1;
}
#module-light-fx .lfx-btn-ray::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(to bottom,
    rgba(255, 220, 100, 0.8) 0%,
    rgba(255, 180, 60, 0.3) 60%,
    transparent 100%);
  animation: lfx-ray-breathe 3.0s ease-in-out infinite;
}

#module-light-fx .lfx-btn-ray-1 { transform: translate(-50%, 0) rotate(0deg); }
#module-light-fx .lfx-btn-ray-2 { transform: translate(-50%, 0) rotate(60deg); }
#module-light-fx .lfx-btn-ray-3 { transform: translate(-50%, 0) rotate(120deg); }
#module-light-fx .lfx-btn-ray-4 { transform: translate(-50%, 0) rotate(180deg); }
#module-light-fx .lfx-btn-ray-5 { transform: translate(-50%, 0) rotate(240deg); }
#module-light-fx .lfx-btn-ray-6 { transform: translate(-50%, 0) rotate(300deg); }

/* stagger the rays */
#module-light-fx .lfx-btn-ray-1::after { animation-delay: 0s; }
#module-light-fx .lfx-btn-ray-2::after { animation-delay: 0.25s; }
#module-light-fx .lfx-btn-ray-3::after { animation-delay: 0.5s; }
#module-light-fx .lfx-btn-ray-4::after { animation-delay: 0.75s; }
#module-light-fx .lfx-btn-ray-5::after { animation-delay: 1.0s; }
#module-light-fx .lfx-btn-ray-6::after { animation-delay: 1.25s; }

@keyframes lfx-ray-breathe {
  0%, 100% { opacity: 0.5; transform: scaleY(1.0); }
  50%      { opacity: 0.9; transform: scaleY(1.15); }
}

/* ─── ambient glow behind everything ─── */
#module-light-fx .lfx-btn-glow {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 200, 80, 0.25) 0%,
    rgba(255, 160, 40, 0.08) 50%,
    transparent 70%);
  animation: lfx-glow-breathe 4s ease-in-out infinite;
  z-index: 0;
}

@keyframes lfx-glow-breathe {
  0%, 100% { transform: scale(1.0); opacity: 0.6; }
  50%      { transform: scale(1.12); opacity: 1.0; }
}

/* ─── tiny flare sparkle ─── */
#module-light-fx .lfx-btn-flare {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffe8c0;
  box-shadow: 0 0 4px 1px rgba(255, 230, 180, 0.7);
  z-index: 4;
  animation: lfx-flare-orbit 5.5s linear infinite;
}
#module-light-fx .lfx-btn-flare::before {
  content: "";
  position: absolute;
  top: -1px; left: -4px;
  width: 11px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,230,180,0.6), transparent);
}
#module-light-fx .lfx-btn-flare::after {
  content: "";
  position: absolute;
  top: -4px; left: -1px;
  width: 1px; height: 11px;
  background: linear-gradient(to bottom, transparent, rgba(255,230,180,0.6), transparent);
}

@keyframes lfx-flare-orbit {
  0%   { transform: translate(10px, -8px) scale(0.8); opacity: 0.3; }
  25%  { transform: translate(-12px, -4px) scale(1.1); opacity: 0.8; }
  50%  { transform: translate(8px, 10px) scale(0.9); opacity: 0.5; }
  75%  { transform: translate(-6px, 12px) scale(1.0); opacity: 0.7; }
  100% { transform: translate(10px, -8px) scale(0.8); opacity: 0.3; }
}

/* ─── active state ─── */
#module-light-fx.is-active .lfx-btn-sun {
  box-shadow:
    0 0 8px 3px rgba(255, 210, 80, 0.8),
    0 0 20px 6px rgba(255, 160, 40, 0.5);
}
#module-light-fx.is-active .lfx-btn-glow {
  opacity: 1;
  transform: scale(1.15);
}
#module-light-fx.is-active .lfx-btn-ray::after {
  animation-duration: 2.0s;
}

/* ─── hover ─── */
#module-light-fx:hover .lfx-btn-sun {
  filter: brightness(1.15);
}
#module-light-fx:hover .lfx-btn-ray::after {
  animation-duration: 2.2s;
}


/* ═══════════════════════════════════════════
   LIGHT FX — Panel
   ═══════════════════════════════════════════ */
.lfx-panel {
  position: fixed;
  right: 90px;
  top: 80px;
  width: 280px;
  max-height: calc(100vh - 100px);
  background: rgba(16, 18, 28, 0.94);
  border: 1px solid rgba(255, 200, 100, 0.15);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 200, 100, 0.2);
  z-index: 920;
  display: none;
  flex-direction: column;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-family: "Inter", system-ui, sans-serif;
  color: #c8c8d0;
}
.lfx-panel--open {
  display: flex;
}

/* header */
.lfx-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(255, 200, 100, 0.08);
  cursor: grab;
  user-select: none;
}
.lfx-panel-header:active { cursor: grabbing; }
.lfx-panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffe0a0;
  margin: 0;
}
.lfx-panel-header button {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.lfx-panel-header button:hover { color: #fff; }

/* body */
.lfx-panel-body {
  padding: 10px 14px 14px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* section titles */
.lfx-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd080;
  margin: 10px 0 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 200, 100, 0.06);
}
.lfx-section-title:first-of-type {
  margin-top: 6px;
  padding-top: 0;
  border-top: none;
}

/* reset button */
.lfx-reset {
  margin-top: 12px;
  padding: 7px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 200, 100, 0.12);
  background: rgba(255, 200, 100, 0.04);
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lfx-reset:hover {
  background: rgba(255, 200, 100, 0.12);
  color: #ffe0a0;
}

/* shared editor-field overrides inside panel */
.lfx-panel .editor-field {
  font-size: 12px;
  gap: 6px;
}
.lfx-panel .editor-field span:first-child {
  min-width: 72px;
  color: #aaa;
}
.lfx-panel input[type="range"] {
  flex: 1;
  accent-color: #ffc060;
}
.lfx-panel input[type="color"] {
  width: 32px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
.lfx-panel select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ddd;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
}

/* scrollbar */
.lfx-panel-body::-webkit-scrollbar { width: 5px; }
.lfx-panel-body::-webkit-scrollbar-track { background: transparent; }
.lfx-panel-body::-webkit-scrollbar-thumb { background: rgba(255,200,100,0.15); border-radius: 3px; }
