/* ═══════════════════════════════════════════════════════════════════
   M09 – Modal de Preferências Visuais do Grafo
   Arquivo: style_explorer_preferences_modal.css
   ═══════════════════════════════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────────────────────────────── */
.pref-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 15, 30, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.pref-modal-overlay.active {
  display: flex;
}

/* ── Container do Modal ───────────────────────────────────────────── */
.pref-modal {
  background: linear-gradient(165deg, #0d2035 0%, #112234 55%, #0a1a2b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(62, 194, 110, 0.08);
  max-width: 700px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────── */
.pref-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.pref-modal__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #e2f0ff;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.pref-modal__header h3 i {
  color: var(--pli-green, #3ec26e);
  font-size: 1rem;
}

.pref-modal__close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color 0.15s;
}

.pref-modal__close:hover {
  color: #fff;
}

/* ── Body scrollável ──────────────────────────────────────────────── */
.pref-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 1.4rem 1rem;
}

/* ── Escopo 2D / 3D ───────────────────────────────────────────────── */
.pref-scope-switch {
  display: inline-flex;
  gap: 0.35rem;
  margin-top: 0.95rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pref-scope-btn {
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.pref-scope-btn.active {
  background: rgba(62, 194, 110, 0.14);
  color: #8cf0b1;
}

.pref-help-text {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}

/* ── Tabs ─────────────────────────────────────────────────────────── */
.pref-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.85rem 0 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.pref-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  transition: all 0.15s;
}

.pref-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.pref-tab.active {
  background: rgba(62, 194, 110, 0.12);
  border-color: rgba(62, 194, 110, 0.35);
  color: #72e09a;
}

/* ── Tab content ──────────────────────────────────────────────────── */
.pref-tab-content {
  display: none;
}

.pref-tab-content.active {
  display: block;
}

/* ── Section titles ───────────────────────────────────────────────── */
.pref-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin: 1.1rem 0 0.6rem;
}

.pref-section-title:first-child {
  margin-top: 0;
}

/* ── Galeria de estilos prontos ───────────────────────────────────── */
.pref-preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pref-preset-library-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #eaf6ff;
}

.pref-preset-library-subtitle {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.5);
}

.pref-preset-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.pref-preset-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.7rem;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pref-preset-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.pref-preset-card.active {
  background: rgba(62, 194, 110, 0.12);
  border-color: rgba(62, 194, 110, 0.38);
  box-shadow: 0 0 0 1px rgba(62, 194, 110, 0.12);
}

.pref-preset-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.pref-preset-card__name {
  font-size: 0.81rem;
  font-weight: 600;
  color: #f7fbff;
}

.pref-preset-card__tag {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8cf0b1;
}

.pref-preset-card__preview {
  position: relative;
  height: 58px;
  border-radius: 9px;
  background: linear-gradient(
    180deg,
    rgba(11, 23, 39, 0.95),
    rgba(15, 28, 44, 0.82)
  );
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pref-preset-card__line {
  position: absolute;
  left: 24%;
  right: 24%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(191, 219, 254, 0.62);
}

.pref-preset-card__line.is-dashed {
  background: repeating-linear-gradient(
    90deg,
    rgba(191, 219, 254, 0.75) 0 8px,
    transparent 8px 13px
  );
}

.pref-preset-card__line.is-dotted {
  background: repeating-linear-gradient(
    90deg,
    rgba(191, 219, 254, 0.85) 0 2px,
    transparent 2px 7px
  );
}

.pref-preset-card__line.is-curved {
  top: 42%;
  height: 18px;
  background: transparent;
  border-top: 2px solid rgba(191, 219, 254, 0.72);
  border-radius: 999px;
}

.pref-preset-card__arrow {
  position: absolute;
  right: 22%;
  top: calc(50% - 11px);
  color: rgba(191, 219, 254, 0.85);
  font-size: 0.9rem;
}

.pref-preset-card__arrow.is-hidden {
  display: none;
}

.pref-preset-card__mini-node {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--preset-accent, #3b82f6);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.pref-preset-card__mini-node.node-a {
  left: 18%;
}

.pref-preset-card__mini-node.node-b {
  right: 18%;
}

.pref-preset-card__mini-node.is-small {
  width: 14px;
  height: 14px;
}

.pref-preset-card__mini-node.is-large {
  width: 24px;
  height: 24px;
}

.pref-preset-card__mini-node.is-outlined {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--preset-accent, #3b82f6);
}

.pref-preset-card__mini-node.is-glow {
  box-shadow: 0 0 12px
    color-mix(in srgb, var(--preset-accent, #3b82f6) 55%, transparent);
}

.pref-preset-card__mini-node.is-3d {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.95),
    var(--preset-accent, #3b82f6) 38%,
    rgba(15, 23, 42, 0.92) 100%
  );
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
}

.pref-preset-card__mini-label {
  position: absolute;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.82);
}

.pref-preset-card__mini-label.is-top {
  left: 18%;
  top: 9px;
}

.pref-preset-card__mini-label.is-right {
  left: calc(18% + 22px);
  top: calc(50% - 8px);
}

.pref-preset-card__mini-label.is-bottom {
  left: 18%;
  bottom: 7px;
}

.pref-preset-card__mini-label.is-inside {
  left: calc(18% + 4px);
  top: calc(50% - 7px);
  color: #0f172a;
  font-weight: 700;
}

.pref-preset-card__desc {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.58);
}

/* ── Grade de cores por entidade ──────────────────────────────────── */
.pref-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pref-color-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}

.pref-color-row__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.15s;
}

.pref-color-row__label {
  flex: 1;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pref-color-row__input {
  width: 32px;
  height: 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}

.pref-color-row__input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 4px;
}

.pref-color-row__input::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* ── Aviso de conflito de cor ─────────────────────────────────────── */
.pref-conflict-warning {
  margin-bottom: 0.5rem;
}

.pref-conflict-warning:empty {
  display: none;
}

.pref-conflict-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 7px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  color: #fde68a;
  margin-bottom: 0.35rem;
}

.pref-conflict-item i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Seletor de símbolo ───────────────────────────────────────────── */
.pref-symbol-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.pref-symbol-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-direction: column;
  gap: 0.15rem;
}

.pref-symbol-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.pref-symbol-btn.active {
  background: rgba(62, 194, 110, 0.15);
  border-color: rgba(62, 194, 110, 0.5);
  color: #72e09a;
  box-shadow: 0 0 10px rgba(62, 194, 110, 0.15);
}

.pref-symbol-btn__label {
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  opacity: 0.65;
  text-transform: lowercase;
}

/* ── Sliders ──────────────────────────────────────────────────────── */
.pref-slider-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.pref-slider-label {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  min-width: 3rem;
  text-align: center;
}

.pref-slider {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  accent-color: #3ec26e;
  cursor: pointer;
}

.pref-slider-val {
  font-size: 0.75rem;
  color: #72e09a;
  font-weight: 600;
  min-width: 3.2rem;
  text-align: right;
}

/* ── Select rows ──────────────────────────────────────────────────── */
.pref-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.65rem;
}

.pref-select-row span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.pref-select {
  min-width: 180px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #eaf6ff;
  padding: 0.48rem 0.65rem;
}

/* ── Radio group (line type) ──────────────────────────────────────── */
.pref-linestyle-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.pref-radio-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.pref-radio-label input[type="radio"] {
  accent-color: #3ec26e;
  cursor: pointer;
}

/* ── Toggle row ───────────────────────────────────────────────────── */
.pref-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.pref-toggle-row span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.pref-toggle {
  accent-color: #3ec26e;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Emphasis focus cards ─────────────────────────────────────────── */
.pref-focus-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pref-radio-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
}

.pref-radio-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.pref-radio-card:has(input:checked) {
  background: rgba(62, 194, 110, 0.1);
  border-color: rgba(62, 194, 110, 0.35);
}

.pref-radio-card input[type="radio"] {
  accent-color: #3ec26e;
  cursor: pointer;
  flex-shrink: 0;
}

.pref-radio-card__icon {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.pref-radio-card:has(input:checked) .pref-radio-card__icon {
  background: rgba(62, 194, 110, 0.15);
  color: #72e09a;
}

.pref-radio-card__label {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
}

.pref-radio-card__desc {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.35;
}

.pref-help-text {
  font-size: 0.79rem;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 0.7rem;
  line-height: 1.4;
}

/* ── Footer / arquivo local ───────────────────────────────────────── */
.pref-footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pref-file-input {
  display: none;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.pref-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  gap: 0.5rem;
}

.pref-footer-right {
  display: flex;
  gap: 0.5rem;
}

/* ── Botões do footer ─────────────────────────────────────────────── */
.pref-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.05rem;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.pref-btn--primary {
  background: linear-gradient(135deg, #3ec26e, #27a355);
  color: #fff;
  border-color: #3ec26e;
  box-shadow: 0 2px 12px rgba(62, 194, 110, 0.28);
}

.pref-btn--primary:hover {
  background: linear-gradient(135deg, #52d080, #2eb85e);
  box-shadow: 0 3px 16px rgba(62, 194, 110, 0.4);
}

.pref-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.pref-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pref-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.5);
}

.pref-btn--ghost:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════════
   PREVIEW CARDS
   ═══════════════════════════════════════════════════════════════════ */

/* ── Card container ───────────────────────────────────────────────── */
.pref-preview-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

/* ── Título de seção preview (verde sutil) ────────────────────────── */
.pref-section-title--preview {
  color: rgba(62, 194, 110, 0.55);
}

.pref-section-title--preview::before {
  content: "◉ ";
  font-size: 0.65rem;
  opacity: 0.7;
}

/* ── SVG preview container ────────────────────────────────────────── */
.pref-preview-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Caption ──────────────────────────────────────────────────────── */
.pref-preview-caption {
  display: block;
  text-align: center;
  font-size: 0.69rem;
  color: rgba(255, 255, 255, 0.28);
  padding: 0.25rem 0.75rem 0.5rem;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════
   COMPORTAMENTO – PREVIEW DE COMPORTAMENTO & ANIMAÇÃO
   ═══════════════════════════════════════════════════════════════════ */

.pref-preview-card--behavior {
  display: flex;
  min-height: 160px;
}

/* Zona esquerda: grafo SVG */
.pref-beh-graph-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.pref-preview-svg--behavior {
  flex: 1;
}

/* Hint de estado */
.pref-beh-hint {
  padding: 0.3rem 0.75rem 0.5rem;
  text-align: center;
  flex-shrink: 0;
}

.pref-beh-hint-text {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.32);
  line-height: 1.35;
  display: block;
}

/* Zona direita: easing demo */
.pref-beh-easing-zone {
  width: 148px;
  flex-shrink: 0;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: center;
}

.pref-beh-easing-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.pref-easing-track {
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  overflow: hidden;
}

.pref-easing-ball {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 35% 35%, #8fffbf, #3ec26e);
  border-radius: 50%;
  top: 1px;
  left: 1px;
  box-shadow: 0 0 6px rgba(62, 194, 110, 0.5);
  /* transition set dynamically via JS */
}

.pref-easing-ball--moved {
  left: calc(100% - 21px);
}

.pref-beh-easing-name {
  font-size: 0.72rem;
  color: #72e09a;
  font-weight: 600;
  text-align: center;
  min-height: 1em;
}

/* ── SVG behavior nodes & edges — transições via CSS vars ─────────── */
.beh-node {
  transition:
    opacity var(--beh-dur, 0.8s)
      var(--beh-ease, cubic-bezier(0.215, 0.61, 0.355, 1)),
    transform var(--beh-dur, 0.8s)
      var(--beh-ease, cubic-bezier(0.215, 0.61, 0.355, 1));
  transform-origin: center;
  transform-box: fill-box;
}

.beh-edge {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1.5;
  transition: opacity var(--beh-dur, 0.8s)
    var(--beh-ease, cubic-bezier(0.215, 0.61, 0.355, 1));
}

.beh-lbl {
  font-size: 9px;
  fill: rgba(255, 255, 255, 0.9);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  dominant-baseline: middle;
}

/* ── ADJACENCY active ─────────────────────────────────────────────── */
#pref-preview-behavior[data-focus="adjacency"][data-state="active"]
  .beh-node--center {
  transform: scale(1.38);
  filter: drop-shadow(0 0 7px rgba(62, 194, 110, 0.75));
}

#pref-preview-behavior[data-focus="adjacency"][data-state="active"]
  .beh-node--far {
  opacity: 0.1;
}

#pref-preview-behavior[data-focus="adjacency"][data-state="active"]
  .beh-edge--far {
  opacity: 0.08;
}

/* ── SELF active ──────────────────────────────────────────────────── */
#pref-preview-behavior[data-focus="self"][data-state="active"]
  .beh-node--center {
  transform: scale(1.38);
  filter: drop-shadow(0 0 7px rgba(62, 194, 110, 0.75));
}

#pref-preview-behavior[data-focus="self"][data-state="active"]
  .beh-node--neighbor,
#pref-preview-behavior[data-focus="self"][data-state="active"] .beh-node--far {
  opacity: 0.1;
}

#pref-preview-behavior[data-focus="self"][data-state="active"] .beh-edge {
  opacity: 0.07;
}

/* ── NONE active — sem efeito ─────────────────────────────────────── */
#pref-preview-behavior[data-focus="none"][data-state="active"]
  .beh-node--center {
  filter: drop-shadow(0 0 5px rgba(62, 194, 110, 0.4));
}

/* ═══════════════════════════════════════════════════════════════════
   CONTROLES DE ANIMAÇÃO (seção Comportamento)
   ═══════════════════════════════════════════════════════════════════ */

.pref-anim-controls {
  margin-bottom: 0.6rem;
}

.pref-anim-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.pref-anim-label {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.45);
  min-width: 9.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.pref-select {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-height: 0;
}

.pref-select:focus {
  outline: none;
  border-color: rgba(62, 194, 110, 0.4);
}

.pref-select option {
  background: #0e1e2e;
  color: rgba(255, 255, 255, 0.85);
}

/* ── Responsivo ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .pref-modal {
    max-height: 95vh;
    border-radius: 12px;
  }

  .pref-colors-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pref-modal__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .pref-footer-right {
    justify-content: flex-end;
  }

  .pref-preview-card--behavior {
    flex-direction: column;
  }

  .pref-beh-graph-zone {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .pref-beh-easing-zone {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
}

/* ── Tema claro e camada superior ────────────────────────────────── */
.pref-modal-overlay {
  z-index: 20000;
  background: rgba(28, 61, 89, 0.22);
}

.pref-modal {
  background: #ffffff;
  border: 1px solid rgba(28, 61, 89, 0.12);
  box-shadow:
    0 24px 60px rgba(28, 61, 89, 0.18),
    0 0 0 1px rgba(17, 101, 147, 0.06);
  font-size: var(--explorer-fs-base, 13px);
  color: var(--pli-navy, #1c3d59);
}

.pref-modal__header {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-bottom-color: rgba(28, 61, 89, 0.1);
  padding: 0.9rem 1.1rem 0.75rem;
}

.pref-modal__header h3 {
  color: var(--pli-navy, #1c3d59);
  font-size: var(--explorer-fs-md, 12px);
  gap: 0.45rem;
}

.pref-modal__header h3 i {
  color: var(--pli-blue, #116593);
  font-size: var(--explorer-fs-md, 12px);
}

.pref-modal__close {
  color: rgba(28, 61, 89, 0.5);
  font-size: 16px;
}

.pref-modal__close:hover {
  color: var(--pli-navy, #1c3d59);
}

.pref-tabs {
  border-bottom-color: rgba(28, 61, 89, 0.08);
  padding: 0.7rem 0 0.5rem;
  margin-bottom: 0.8rem;
}

.pref-tab {
  border-color: rgba(28, 61, 89, 0.08);
  color: rgba(28, 61, 89, 0.72);
  font-size: var(--explorer-fs-sm, 11px);
  padding: 0.35rem 0.85rem;
}

.pref-tab:hover {
  color: var(--pli-navy, #1c3d59);
  background: rgba(17, 101, 147, 0.06);
}

.pref-tab.active {
  background: rgba(17, 101, 147, 0.1);
  border-color: rgba(17, 101, 147, 0.28);
  color: var(--pli-blue, #116593);
}

.pref-section-title,
.pref-section-title--preview,
.pref-beh-easing-title,
.pref-anim-label,
.pref-slider-label,
.pref-help-text,
.pref-radio-card__desc,
.pref-preview-caption,
.pref-beh-hint-text {
  color: rgba(28, 61, 89, 0.52);
  font-size: var(--explorer-fs-xs, 10px);
}

.pref-modal__body {
  padding: 0 1.1rem 0.9rem;
}

.pref-color-row,
.pref-symbol-btn,
.pref-radio-card,
.pref-preview-card {
  background: #f8fafc;
  border-color: rgba(28, 61, 89, 0.1);
}

.pref-color-row {
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
}

.pref-color-row__label,
.pref-radio-label,
.pref-toggle-row span,
.pref-radio-card__label,
.pref-select,
.pref-symbol-btn {
  color: var(--pli-navy, #1c3d59);
  font-size: var(--explorer-fs-sm, 11px);
}

.pref-color-row__input {
  width: 30px;
  height: 22px;
}

.pref-color-row__swatch,
.pref-color-row__input::-webkit-color-swatch {
  border-color: rgba(28, 61, 89, 0.14);
}

.pref-conflict-item {
  color: #92400e;
}

.pref-symbol-btn:hover,
.pref-radio-card:hover {
  background: #ffffff;
  border-color: rgba(17, 101, 147, 0.22);
}

.pref-symbol-btn.active,
.pref-radio-card:has(input:checked) {
  background: rgba(17, 101, 147, 0.08);
  border-color: rgba(17, 101, 147, 0.3);
  color: var(--pli-blue, #116593);
  box-shadow: 0 0 0 2px rgba(17, 101, 147, 0.08);
}

.pref-symbol-btn {
  width: 42px;
  height: 42px;
  font-size: var(--explorer-fs-base, 13px);
}

.pref-symbol-btn__label {
  font-size: var(--explorer-fs-2xs, 9px);
}

.pref-radio-card__icon {
  background: rgba(17, 101, 147, 0.08);
  color: rgba(28, 61, 89, 0.58);
  width: 30px;
  height: 30px;
  font-size: var(--explorer-fs-sm, 11px);
}

.pref-radio-card:has(input:checked) .pref-radio-card__icon {
  background: rgba(17, 101, 147, 0.12);
  color: var(--pli-blue, #116593);
}

.pref-slider,
.pref-radio-label input[type="radio"],
.pref-toggle,
.pref-radio-card input[type="radio"] {
  accent-color: var(--pli-blue, #116593);
}

.pref-slider-val,
.pref-beh-easing-name {
  color: var(--pli-blue, #116593);
  font-size: var(--explorer-fs-sm, 11px);
}

.pref-modal__footer {
  background: #fbfcfe;
  border-top-color: rgba(28, 61, 89, 0.1);
  padding: 0.75rem 1.1rem 0.85rem;
}

.pref-btn {
  font-size: var(--explorer-fs-sm, 11px);
  padding: 0.42rem 0.9rem;
}

.pref-btn--secondary {
  background: #ffffff;
  border-color: rgba(28, 61, 89, 0.14);
  color: rgba(28, 61, 89, 0.78);
}

.pref-btn--secondary:hover {
  background: #f4f8fc;
  color: var(--pli-navy, #1c3d59);
}

.pref-btn--ghost {
  color: rgba(28, 61, 89, 0.54);
}

.pref-btn--ghost:hover {
  color: var(--pli-navy, #1c3d59);
}

.pref-modal__body,
.pref-modal__close,
.pref-btn,
.pref-select option {
  color: var(--pli-navy, #1c3d59);
}

.pref-easing-track {
  background: #e8eef5;
}

.pref-beh-graph-zone {
  border-right-color: rgba(28, 61, 89, 0.08);
}

.beh-edge {
  stroke: rgba(100, 116, 139, 0.38);
}

.beh-lbl {
  fill: rgba(28, 61, 89, 0.92);
}

.pref-select {
  background: #ffffff;
  border-color: rgba(28, 61, 89, 0.14);
  font-size: var(--explorer-fs-sm, 11px);
  padding: 0.24rem 0.5rem;
}

.pref-select:focus {
  border-color: rgba(17, 101, 147, 0.4);
}

.pref-select option {
  background: #ffffff;
  color: rgba(28, 61, 89, 0.85);
}

@media (max-width: 600px) {
  .pref-beh-graph-zone {
    border-bottom-color: rgba(28, 61, 89, 0.08);
  }
}
