/* =============================================
   WAVEFORM VISUALIZER - Estilo DJ Profesional
   2 líneas: Deck A y Deck B (cada una con L/R)
   ============================================= */

.waveform-visualizer-container {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid #1a1a1a;
    margin-bottom: 8px;
}

/* Canal dual (Deck A o B) con L y R dentro */
.waveform-channel-dual {
    position: relative;
    display: flex;
    align-items: stretch;
    background: linear-gradient(180deg, #0a0a12 0%, #060608 100%);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.15s ease;
    height: 60px; /* Más alto para mejor visualización */
}

.waveform-channel-dual:hover {
    background: #111111;
}

.waveform-channel-dual[data-deck="A"] {
    border-left: 3px solid #00d4ff;
}

.waveform-channel-dual[data-deck="B"] {
    border-left: 3px solid #ff6b00;
}

/* Label del Deck (A o B) */
.waveform-label-deck {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    z-index: 5;
    pointer-events: none;
    font-family: 'Courier New', monospace;
}

.waveform-channel-dual[data-deck="A"] .waveform-label-deck {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.waveform-channel-dual[data-deck="B"] .waveform-label-deck {
    color: #ff6b00;
    text-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

/* Contenedor stereo L/R - pegados como una sola línea */
.waveform-stereo {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 28px;
    gap: 0;
    background: #080808;
    border-radius: 2px;
    overflow: hidden;
}

/* Línea individual L o R - mitad superior e inferior sin separación visual */
.waveform-line {
    position: relative;
    flex: 1;
    background: transparent;
}

/* Label L/R pequeño */
.channel-label {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    font-weight: 600;
    color: #444;
    z-index: 5;
    pointer-events: none;
    font-family: 'Courier New', monospace;
}

/* Canvas de waveform */
.waveform-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Marcador CUE */
.cue-marker {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 700;
    color: #ff6600;
    background: rgba(255, 102, 0, 0.15);
    padding: 2px 6px;
    border-radius: 2px;
    border: 1px solid rgba(255, 102, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 0 4px rgba(255, 102, 0, 0.6);
}

.cue-marker.active {
    opacity: 1;
}

/* Separador entre Deck A y B */
.waveform-separator {
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #333 20%,
        #333 80%,
        transparent 100%);
    margin: 2px 0;
    position: relative;
}

.waveform-separator::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #ff66ff);
    border-radius: 1px;
}

/* Playhead - Se dibuja en el canvas ahora */
/* Oculto porque el nuevo waveform lo dibuja dinámicamente */
.waveform-playhead {
    display: none;
}

.waveform-playhead::before,
.waveform-playhead::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
}

.waveform-playhead::before {
    top: -5px;
    border-width: 5px 3px 0 3px;
    border-color: #fff transparent transparent transparent;
}

.waveform-playhead::after {
    bottom: -5px;
    border-width: 0 3px 5px 3px;
    border-color: transparent transparent #fff transparent;
}

/* Estado de arrastre */
.waveform-channel-dual.dragging {
    cursor: grabbing;
}

.waveform-channel-dual.dragging .waveform-canvas {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .waveform-visualizer-container {
        padding: 4px 6px;
    }

    .waveform-channel-dual {
        height: 36px;
    }

    .waveform-label-deck {
        font-size: 12px;
    }

    .channel-label {
        font-size: 7px;
    }

    .cue-marker {
        font-size: 7px;
        padding: 1px 4px;
    }
}
