/* ==========================================================================
   Text FX — pelengkap teks-creator.css. File ini hanya berisi komponen yang
   belum ada di teks-creator.css (toggle mode, daftar warna, preview gelap).
   ========================================================================== */

/* Mode toggle (Per Character / Per Word) */
.tf-mode-toggle{ display:flex; gap:10px; flex-wrap:wrap; }
.tf-mode-btn{
  display:inline-flex; align-items:center; gap:8px;
  border:1.5px solid var(--tc-line); background:#fafafa; color:var(--tc-muted);
  border-radius:999px; padding:10px 18px; font-size:.88rem; font-weight:700; cursor:pointer;
  transition:all .25s var(--tc-ease);
}
.tf-mode-btn:hover{ border-color:var(--tc-accent); color:var(--tc-ink); }
.tf-mode-btn.active{ background:var(--tc-ink); color:#fff; border-color:var(--tc-ink); }

/* Color palette editor */
.tf-color-list{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.tf-color-chip{
  display:flex; align-items:center; gap:8px;
  border:1.5px solid var(--tc-line); border-radius:999px; padding:6px 10px 6px 6px; background:#fafafa;
}
.tf-color-chip input[type=color]{
  width:30px; height:30px; border:1.5px solid var(--tc-line); border-radius:50%; padding:0; overflow:hidden;
}
.tf-color-chip .tf-color-remove{
  border:none; background:none; color:var(--tc-muted); cursor:pointer; font-size:.85rem; padding:2px;
}
.tf-color-chip .tf-color-remove:hover{ color:#b4232c; }
.tf-color-actions{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.tf-mapping-select{ width:auto; min-width:180px; }

/* Preview (dark stage, similar to tc-preview-box but roomier) */
.tf-preview-box{ min-height:260px; padding:32px; }
.tf-preview-text{
  display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:0;
  color:#fff; text-align:center; width:100%;
}
.tf-preview-text .tf-unit{
  display:inline-block; will-change:transform,opacity,filter; white-space:pre;
}

@media (max-width:640px){
  .tf-preview-box{ padding:20px; min-height:200px; }
}

/* ==========================================================================
   Mini preview auto-play & loop di tiap kartu preset (Step 1)
   ========================================================================== */
.tf-card-demo{
  margin-top:14px; border-radius:12px; background:#0b0b0d; min-height:64px;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  padding:10px 8px;
}
.tf-card-demo .tf-unit{
  display:inline-block; color:#fff; font-weight:800; font-size:1.3rem;
  font-family:"Inter Tight","Inter",-apple-system,sans-serif; letter-spacing:-.01em;
  will-change:transform,opacity,filter; white-space:pre;
}

/* ==========================================================================
   Curve editor (Apple-style, dua handle draggable, mirip teks-creator)
   ========================================================================== */
.tf-curve-hint{ margin-bottom:12px; }
.tf-curve-editor{
  display:grid; grid-template-columns:260px 1fr; gap:22px; align-items:start;
}
.tf-curve-svg{
  width:100%; max-width:260px; aspect-ratio:1/1; border-radius:16px; background:#0b0b0d;
  touch-action:none; user-select:none;
}
.tf-curve-side{ display:flex; flex-direction:column; gap:14px; min-width:0; }
.tf-curve-presets{ display:flex; flex-wrap:wrap; gap:8px; }
.tf-curve-inputs{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.tf-curve-inputs label{ font-size:.78rem; font-weight:700; color:var(--tc-muted); display:flex; flex-direction:column; gap:4px; }
.tf-curve-inputs input{ margin-top:0; }
.tf-curve-reset{ align-self:flex-start; }
.tf-curve-locked .tc-hint{
  background:#fff8e6; color:#8a6400; border-radius:12px; padding:12px 14px; margin:0; font-weight:600;
}
.tf-curve-locked .tc-hint i{ margin-right:6px; }

@media (max-width:640px){
  .tf-curve-editor{ grid-template-columns:1fr; }
  .tf-curve-svg{ max-width:220px; margin:0 auto; }
}

/* ==========================================================================
   Layer panel — timeline ala Alight Motion (Step 3)
   ========================================================================== */
.tf-layer-panel{
  margin-top:20px; border:1.5px solid var(--tc-line); border-radius:var(--tc-radius-sm);
  background:#fafafa; overflow:hidden;
}
.tf-layer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; font-size:.82rem; font-weight:700; color:var(--tc-ink);
  border-bottom:1px solid var(--tc-line); background:#fff;
}
.tf-layer-head i{ margin-right:6px; color:var(--tc-accent); }
#tfLayerCount{ color:var(--tc-muted); font-weight:600; }
.tf-layer-ruler{
  display:flex; justify-content:space-between; padding:6px 16px; font-size:.68rem;
  color:var(--tc-muted); border-bottom:1px solid var(--tc-line); background:#fff;
}
.tf-layer-rows{ max-height:280px; overflow-y:auto; padding:10px 0; }
.tf-layer-row{
  display:grid; grid-template-columns:28px 1fr 64px; align-items:center;
  gap:10px; padding:4px 16px;
}
.tf-layer-label{
  width:24px; height:24px; border-radius:7px; background:var(--tc-ink); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:800;
  text-transform:uppercase; flex-shrink:0;
}
.tf-layer-track{
  position:relative; height:18px; border-radius:9px; background:#e5f1ff; overflow:visible;
}
.tf-layer-bar{
  position:absolute; top:0; bottom:0; border-radius:9px; background:#5fb0ff;
  opacity:.85;
}
.tf-layer-kf{
  position:absolute; top:50%; width:11px; height:11px; border-radius:3px; background:#fff;
  border:2px solid var(--tc-accent); transform:translate(-50%,-50%) rotate(45deg);
}
.tf-layer-ms{ font-size:.72rem; color:var(--tc-muted); font-weight:700; text-align:right; white-space:nowrap; }

@media (max-width:640px){
  .tf-layer-row{ grid-template-columns:22px 1fr 54px; }
  .tf-layer-ruler{ display:none; }
}
