/* ==========================================================================
   BandBangla - Instrument Visualizers Stylesheet
   Styles for 3-Piston Brass Valves, Trombone Slide, 9-Hole Bagpipe Chanter,
   and Dual-Mode Snare Drum Visualizers.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Visualizer Container & Wrapper Cards
   -------------------------------------------------------------------------- */
.visualizer-card {
  background: var(--bg-card, #16223b);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-card, 0 8px 24px -4px rgba(0, 0, 0, 0.45));
  position: relative;
  overflow: hidden;
}

.visualizer-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.visualizer-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white, #ffffff);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.visualizer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full, 9999px);
  background: rgba(229, 169, 59, 0.15);
  color: var(--brass-gold-light, #f7cb68);
  border: 1px solid rgba(229, 169, 59, 0.35);
}

.visualizer-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
  background: #090e1a;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 8px);
  padding: 1.25rem;
}

/* --------------------------------------------------------------------------
   2. Brass 3-Piston Valve Visualizer
   -------------------------------------------------------------------------- */
.brass-valves-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 480px;
}

.valves-cluster-svg {
  width: 100%;
  max-width: 380px;
  height: 200px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* Valve Piston Animations */
.valve-piston {
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center top;
}

.valve-piston.valve-depressed {
  transform: translateY(24px);
}

.valve-cap-indicator {
  transition: fill 0.15s ease, filter 0.15s ease;
}

.valve-depressed .valve-cap-indicator {
  fill: #f59e0b !important;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.9)) !important;
}

.valve-glow-ring {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.valve-depressed .valve-glow-ring {
  opacity: 1;
}

.valve-readout-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 4px);
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
}

.valve-readout-pill {
  color: var(--brass-gold-light, #f7cb68);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   3. Trombone 7-Position Slide Visualizer
   -------------------------------------------------------------------------- */
.trombone-slide-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.trombone-slide-svg {
  width: 100%;
  max-width: 720px;
  height: 140px;
}

.trombone-outer-slide {
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-pos-marker {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  fill: var(--text-dim, #64748b);
  transition: fill 0.15s ease;
}

.slide-pos-marker.active-pos {
  fill: #38bdf8 !important;
  filter: drop-shadow(0 0 6px #38bdf8);
}

.slide-position-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 520px;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 4px);
  font-size: 0.9rem;
}

.slide-pos-val {
  font-family: var(--font-heading, sans-serif);
  font-weight: 800;
  color: #38bdf8;
}

/* --------------------------------------------------------------------------
   4. Bagpipe Practice Chanter (9-Hole Visualizer)
   -------------------------------------------------------------------------- */
.chanter-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  flex-wrap: wrap;
}

.chanter-svg-wrapper {
  position: relative;
  width: 160px;
  height: 380px;
}

.chanter-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
}

.chanter-hole {
  transition: fill 0.12s ease, stroke 0.12s ease, filter 0.12s ease;
  cursor: pointer;
}

/* Hole States: Covered (Closed Finger) vs Uncovered (Open Finger) */
.chanter-hole.hole-closed {
  fill: #10b981 !important; /* Highland Emerald: Covered */
  stroke: #34d399 !important;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.8)) !important;
}

.chanter-hole.hole-open {
  fill: #080d1a !important; /* Dark open hole */
  stroke: #64748b !important;
  filter: none !important;
}

.chanter-info-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 280px;
}

.chanter-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.swatch-closed {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.swatch-open {
  background: #080d1a;
  border: 1.5px solid #64748b;
}

.chanter-note-badge {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #34d399;
}

/* --------------------------------------------------------------------------
   5. Dual-Mode Snare Drum Switcher & Visualizer
   -------------------------------------------------------------------------- */
.drum-switcher-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.btn-drum-mode {
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all var(--transition-fast, 0.18s ease);
}

.btn-drum-mode.is-active-mode {
  background: var(--regimental-red, #c53030);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(197, 48, 48, 0.4);
}

.btn-drum-mode.mode-pipe.is-active-mode {
  background: var(--highland-emerald, #10b981);
  color: #070b14;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.drum-stage-layout {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  width: 100%;
  flex-wrap: wrap;
}

.drumhead-svg-container {
  position: relative;
  width: 220px;
  height: 220px;
}

.drumhead-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

/* Drum Stick Hit Ripples */
.drum-hit-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.drum-hit-ripple.ripple-left {
  left: 36%;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 16px #38bdf8;
}

.drum-hit-ripple.ripple-right {
  left: 64%;
  border: 3px solid #f87171;
  box-shadow: 0 0 16px #f87171;
}

.drum-hit-ripple.ripple-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(2.6);
}

/* Stick Indicators */
.stick-indicators {
  display: flex;
  gap: 1.5rem;
}

.stick-indicator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 90px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 8px);
  transition: all 0.12s ease;
}

.stick-indicator-card.is-active-hit {
  transform: scale(1.08);
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

.stick-hand-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim, #64748b);
  margin-bottom: 0.25rem;
}

.stick-hand-letter {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary, #f8fafc);
  line-height: 1;
}

.is-active-hit .stick-hand-letter {
  color: #fce08b;
}

/* --------------------------------------------------------------------------
   6. Responsive Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .chanter-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .drum-stage-layout {
    flex-direction: column;
  }
  .trombone-slide-svg {
    height: 110px;
  }
}
