/* Container holds trigger + popover — position relative so popover anchors here */
.container {
  position: relative;
}

/* Trigger button — matches fogBtn style from CampaignView.module.css */
.trigger {
  padding: 0.4rem 0.5rem;
  background: none;
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-primary);
  opacity: 0.5;
  transition:
    opacity 0.15s,
    border-color 0.15s;
  white-space: nowrap;
}

.trigger:hover {
  opacity: 0.8;
  border-color: rgba(var(--gold-rgb), 0.4);
}

/* When any effect is active */
.triggerActive {
  opacity: 1;
  border-color: rgba(var(--gold-rgb), 0.5);
  background: rgba(var(--gold-rgb), 0.1);
}

/* Popover panel */
.panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background-color: var(--bg-modal);
  background-image: var(--texture-surface);
  background-size: 256px 256px;
  background-repeat: repeat;
  border: 1px solid rgba(var(--gold-rgb), 0.3);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  min-width: 180px;
  z-index: 9999;
  box-shadow:
    0 4px 16px rgba(var(--shadow-rgb), 0.5),
    inset 0 1px 0 rgba(var(--gold-rgb), 0.06);
}

.panelTitle {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--gold-rgb), 0.6);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.15);
  padding-bottom: 0.35rem;
  margin-bottom: 0.4rem;
}

/* One row per effect */
.effectRow {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.08);
}

.effectRow:last-child {
  border-bottom: none;
}

.effectTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.effectLabel {
  font-family: "Alegreya", Georgia, serif;
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 32px;
  height: 17px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(var(--gold-rgb), 0.1);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(var(--gold-rgb), 0.35);
  transition: transform 0.2s, background 0.2s;
}

.toggleOn {
  background: rgba(var(--gold-rgb), 0.25);
  border-color: rgba(var(--gold-rgb), 0.5);
}

.toggleOn::after {
  transform: translateX(15px);
  background: var(--gold);
}

/* Intensity row — dimmed when effect is off */
.intensityRow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.3;
  transition: opacity 0.15s;
}

.intensityActive {
  opacity: 1;
}

.intensityLabel {
  font-family: "Alegreya", Georgia, serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
  width: 2.2rem;
  text-align: right;
  flex-shrink: 0;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(var(--gold-rgb), 0.15);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(var(--gold-rgb), 0.4);
  cursor: pointer;
  transition: background 0.15s;
}

.slider:not(:disabled)::-webkit-slider-thumb {
  background: var(--gold);
}

.slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  cursor: pointer;
}
