/**
 * Section 3: Solution
 * Tower demo, slider, and features
 */

.section-solution {
  background-color: var(--bg-primary);
}

.solution-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.tower-demo {
  position: relative;
  min-height: 400px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.tower-demo canvas {
  width: 100%;
  height: 100%;
}

/* Slider */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

.slider-value {
  font-size: var(--text-lg);
  color: var(--accent-blue);
}

.slider-track-container {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
}

.wind-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.wind-slider::-webkit-slider-runnable-track {
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wind-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background-color: var(--accent-orange);
  border: none;
  border-radius: 50%;
  margin-top: -8px;
  cursor: grab;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wind-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.wind-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
}

/* Bounce animation for idle slider */
.wind-slider.bounce::-webkit-slider-thumb {
  animation: sliderBounceHorizontal 0.6s ease-in-out infinite;
}

.wind-slider.bounce::-moz-range-thumb {
  animation: sliderBounceHorizontal 0.6s ease-in-out infinite;
}

.wind-slider::-moz-range-track {
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wind-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background-color: var(--accent-orange);
  border: none;
  border-radius: 50%;
  cursor: grab;
}

.wind-slider:focus-visible {
  outline: none;
}

.wind-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: var(--focus-ring);
}

.wind-slider:focus-visible::-moz-range-thumb {
  box-shadow: var(--focus-ring);
}

.slider-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  background-color: var(--accent-orange);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  pointer-events: none;
  z-index: 1;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Graph */
.graph-container {
  grid-column: span 2;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.graph-title {
  font-size: var(--text-lg);
}

.graph-legend {
  display: flex;
  gap: var(--space-5);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-passive .legend-dot {
  background-color: var(--cable-passive);
}

.legend-active .legend-dot {
  background-color: var(--accent-green);
}

.deflection-graph {
  width: 100%;
  height: 200px;
  margin-bottom: var(--space-4);
}

.graph-readout {
  display: flex;
  gap: var(--space-6);
  justify-content: center;
}

/* Deflection Readouts - under slider */
.slider-readouts {
  display: flex;
  gap: var(--space-6);
  justify-content: space-between;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Deflection Readouts - below tower visual (legacy) */
.deflection-readouts {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  padding: var(--space-6) 0;
  margin-bottom: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.readout {
  text-align: center;
}

.readout-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.readout-value {
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.readout-value.active {
  color: var(--accent-green);
}

.readout-value.success {
  color: var(--success);
}

/* Features */
.solution-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature {
  text-align: center;
  padding: var(--space-6);
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition-base);
}

.feature:hover {
  border-color: var(--accent-orange);
}

.feature-icon {
  font-size: var(--text-2xl);
  color: var(--accent-orange);
  margin-bottom: var(--space-4);
}

.feature-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1023px) {
  .solution-demo {
    grid-template-columns: 1fr;
  }
  
  .graph-container {
    grid-column: span 1;
  }
  
  .solution-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .deflection-readouts {
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
  }
}
