/* ============================================
   VISUALIZATIONS — Appium Mobile Talk
   Shared controls + 6 appium-specific viz types
   ============================================ */

/* === Shared button === */
.viz-btn {
  padding: 6px 14px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--accent);
  font-family: 'Rubik', sans-serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.viz-btn:hover {
  background: var(--accent);
  color: var(--text-on-accent);
}
.viz-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.viz-stage {
  width: 100%;
  will-change: transform, opacity;
  position: relative;
  z-index: 1;
}

.viz-stage-wrap {
  position: relative;
  isolation: isolate;
  overflow: clip;
  transition: min-height var(--motion-viz-minheight-duration) var(--motion-viz-minheight-easing);
}

.viz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.viz-controls__status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
  min-width: 92px;
  text-align: center;
}

.viz-message {
  margin-top: 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.viz-message--ok {
  color: var(--success);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .viz-stage,
  .viz-stage-wrap {
    transition: none !important;
  }
}

/* === viz-appium-chain (slide 13) === */
.viz-appium-chain { max-width: 600px; margin: 0 auto; }

.viz-appium-chain__node {
  fill: var(--bg-surface-2);
  stroke: var(--border);
  stroke-width: 1.5;
  rx: 12;
  transition: fill 0.3s, stroke 0.3s;
}

.viz-appium-chain__node--active {
  fill: var(--accent-light);
  stroke: var(--accent);
  stroke-width: 2;
}

.viz-appium-chain__arrow {
  stroke: var(--text-muted);
  stroke-width: 1.5;
  opacity: 0.3;
  transition: opacity 0.3s, stroke 0.3s;
}

.viz-appium-chain__arrow--active {
  opacity: 1;
  stroke: var(--accent);
}

.viz-appium-chain__label {
  fill: var(--text-secondary);
  font-size: 11px;
  font-family: 'Rubik', sans-serif;
  transition: fill 0.3s;
}

.viz-appium-chain__label--active {
  fill: var(--text-primary);
  font-weight: 600;
}

.viz-appium-chain__protocol {
  fill: var(--text-muted);
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
}

/* === viz-appium-sequence (slide 32) === */
.viz-sequence { max-width: 560px; margin: 0 auto; }

.viz-sequence__lifeline {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.viz-sequence__header {
  fill: var(--bg-surface-2);
  stroke: var(--border);
  rx: 8;
}

.viz-sequence__header-text {
  fill: var(--text-primary);
  font-size: 10px;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
}

.viz-sequence__arrow {
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.3s;
}

.viz-sequence__arrow--visible {
  opacity: 1;
}

.viz-sequence__arrow-label {
  fill: var(--text-secondary);
  font-size: 8px;
  font-family: 'JetBrains Mono', monospace;
}

/* === viz-ci-pipeline (slide 56) === */
.viz-pipeline { max-width: 480px; margin: 0 auto; }

.viz-pipeline__job {
  fill: var(--bg-surface);
  stroke: var(--border);
  stroke-width: 1.5;
  rx: 12;
  transition: fill 0.3s, stroke 0.3s;
}

.viz-pipeline__job--active {
  stroke: var(--accent);
  fill: var(--accent-light);
}

.viz-pipeline__item {
  fill: var(--bg-surface-2);
  stroke: var(--border-light);
  rx: 6;
  opacity: 0;
  transition: opacity 0.3s;
}

.viz-pipeline__item--visible {
  opacity: 1;
}

.viz-pipeline__connector {
  stroke: var(--text-muted);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  opacity: 0;
  transition: opacity 0.3s;
}

.viz-pipeline__connector--visible {
  opacity: 1;
  stroke: var(--accent);
  stroke-dasharray: none;
}

/* === viz-framework-layers (slide 66) === */
.viz-layers { max-width: 520px; margin: 0 auto; }

.viz-layers__layer {
  fill: var(--bg-surface-2);
  stroke: var(--border);
  rx: 8;
  opacity: 0.3;
  transition: fill 0.4s, opacity 0.4s, stroke 0.3s;
}

.viz-layers__layer--active {
  opacity: 1;
  fill: var(--accent-light);
  stroke: var(--accent-border);
}

.viz-layers__layer--current {
  stroke: var(--accent);
  stroke-width: 2;
}

.viz-layers__text {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: 'Rubik', sans-serif;
  transition: fill 0.3s;
}

.viz-layers__text--active {
  fill: var(--text-primary);
  font-weight: 600;
}

/* === viz-allure-steps (slide 49) === */
.viz-allure { max-width: 480px; margin: 0 auto; }

.viz-allure__test-name {
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--success);
  margin-bottom: 8px;
}

.viz-allure__step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.viz-allure__step--visible {
  opacity: 1;
  transform: translateY(0);
}

.viz-allure__check {
  color: var(--success);
  font-size: 1rem;
  flex-shrink: 0;
}

.viz-allure__text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* === viz-swipe-demo (slide 39) === */
.viz-swipe { max-width: 200px; margin: 0 auto; }

.viz-swipe__phone {
  fill: var(--bg-surface);
  stroke: var(--border);
  stroke-width: 2;
  rx: 20;
}

.viz-swipe__screen {
  fill: var(--bg-surface-2);
  rx: 4;
}

.viz-swipe__arrow {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
}

.viz-swipe__arrow--animating {
  opacity: 1;
  animation: swipeArrow 0.8s ease-out;
}

@keyframes swipeArrow {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0.3; transform: translateY(-40px); }
}

.viz-swipe__label {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: 'Rubik', sans-serif;
  text-anchor: middle;
}

/* === Responsive === */
@media (max-width: 768px) {
  .viz-appium-chain { max-width: 100%; }
  .viz-sequence { max-width: 100%; }
  .viz-pipeline { max-width: 100%; }
  .viz-layers { max-width: 100%; }
}
