/* transformer.css — iron core + two coils for viz/transformer.js (pure DOM). */

.tf { display: flex; flex-direction: column; gap: 0.85rem; }
.tf-stage { position: relative; width: 100%; aspect-ratio: 16 / 8; min-height: 200px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 0.8rem; background: linear-gradient(180deg, #0b1018, #07090f); display: flex; align-items: center; justify-content: center; gap: 4%; }
.tf-core { position: absolute; left: 50%; top: 50%; width: 30%; height: 62%; transform: translate(-50%, -50%); border: 12px solid #475569; border-radius: 6px;
  background: transparent; box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); }

.tf-side { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 19%; }
.tf-side-p { margin-right: 16%; } .tf-side-s { margin-left: 16%; }
.tf-coil { display: flex; flex-direction: column; gap: 3px; padding: 5px 0; border-radius: 5px; background: rgba(184, 115, 51, 0.08); width: 100%; align-items: center; }
.tf-loop { display: block; width: 80%; height: 4px; border-radius: 3px; background: linear-gradient(90deg, #d97706, #b87333, #d97706); animation: tf-pulse 1.1s ease-in-out infinite; }
.tf-coil-s .tf-loop { animation-delay: 0.3s; background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b); }
@keyframes tf-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tf-loop { animation: none; opacity: 0.9; } }
.tf-clab { font-size: 0.68rem; color: #8aa0b6; font-weight: 600; }
.tf-vlab { font-size: 0.7rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.tf-vin { color: #7dd3fc; background: rgba(56, 189, 248, 0.12); } .tf-vout { color: #fcd34d; background: rgba(251, 191, 36, 0.12); }

.tf-tag { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 0.8rem; font-weight: 700; color: #aebdce; background: rgba(6, 10, 18, 0.6); padding: 2px 9px; border-radius: 5px; }
.tf-tag.tf-up { color: #07121d; background: #34d399; } .tf-tag.tf-down { color: #07121d; background: #fb923c; }
