/* ── View toggle ── */
.view-toggle-wrapper {
  display: flex;
  justify-content: center;
}

.view-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
  width: fit-content;
}

.view-toggle__btn {
  padding: 6px 16px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.15s ease;
}

.view-toggle__btn.active {
  background: #2a2a22;
  color: var(--text);
}

.view-toggle__btn.disabled {
  color: #3a3a32;
  cursor: not-allowed;
}

.view-toggle__per-item-wrap {
  position: relative;
  display: inline-flex;
}

.view-toggle__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a22;
  border: 1px solid var(--border-focus);
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.view-toggle__tooltip.visible {
  opacity: 1;
}

.view-toggle__tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--border-focus);
}

/* ── Insurance toggle ── */
.insurance-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.insurance-toggle__info {
  display: flex;
  flex-direction: column;
}

.insurance-toggle__label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.insurance-toggle__label {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.insurance-toggle__label.active {
  color: var(--text);
}

.insurance-toggle__badge {
  font-size: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
}

.insurance-toggle__badge.mild {
  background: #302a18;
  color: var(--amber);
}

.insurance-toggle__badge.strong {
  background: var(--red-subtle);
  color: var(--red);
  animation: pulse 2s infinite;
}

/* ── Toggle switch (shared) ── */
.toggle-switch {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  background: var(--border);
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch.on {
  background: var(--green);
}

.toggle-switch__thumb {
  width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #5a5a4a;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: all 0.2s ease;
}

.toggle-switch.on .toggle-switch__thumb {
  background: var(--bg);
  left: 19px;
}
