/**
 * DJ Slip Mode Module - Styles
 * Botón y efectos visuales para Slip Mode
 */

/* ===============================================
   CONTENEDOR SLIP MODE
   =============================================== */
.slip-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* ===============================================
   BOTÓN SLIP MODE
   =============================================== */
.slip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 38px;
    height: 22px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;

    background: linear-gradient(180deg, #2a2a35 0%, #1a1a22 100%);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.slip-btn:hover {
    background: linear-gradient(180deg, #3a3a45 0%, #2a2a32 100%);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Estado activo - Amarillo/Naranja */
.slip-btn.active {
    background: linear-gradient(180deg, #4a3a1a 0%, #302510 100%);
    color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.4);
    box-shadow:
        0 0 10px rgba(255, 170, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slip-pulse 1.5s ease-in-out infinite;
}

.slip-btn.active:hover {
    background: linear-gradient(180deg, #5a4a2a 0%, #403520 100%);
    box-shadow:
        0 0 15px rgba(255, 170, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Flash cuando retorna del slip */
.slip-btn.slip-return {
    background: linear-gradient(180deg, #ffaa00 0%, #cc8800 100%);
    color: #000;
    box-shadow:
        0 0 20px rgba(255, 170, 0, 0.8),
        0 0 40px rgba(255, 170, 0, 0.4);
    transform: scale(1.1);
}

/* ===============================================
   LED INDICADOR
   =============================================== */
.slip-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(80, 80, 90, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.slip-led.active {
    background: #ffaa00;
    box-shadow:
        0 0 6px rgba(255, 170, 0, 0.8),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* ===============================================
   LABEL
   =============================================== */
.slip-label {
    font-size: 7px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slip-btn.active + .slip-label,
.slip-container.active .slip-label {
    color: rgba(255, 170, 0, 0.7);
}

/* ===============================================
   ANIMACIÓN PULSE
   =============================================== */
@keyframes slip-pulse {
    0%, 100% {
        box-shadow:
            0 0 10px rgba(255, 170, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 15px rgba(255, 170, 0, 0.5),
            0 0 25px rgba(255, 170, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

/* ===============================================
   INDICADOR EN WAVEFORM
   =============================================== */
/* Borde brillante cuando slip está activo */
.waveform-channel-dual[data-slip-active="true"] {
    border-color: rgba(255, 170, 0, 0.4);
    box-shadow: inset 0 0 10px rgba(255, 170, 0, 0.1);
}

/* Flash cuando retorna del slip */
.waveform-channel-dual.slip-flash {
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.8);
}

/* Línea de tiempo virtual (opcional) */
.slip-virtual-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 170, 0, 0.6);
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 0 4px rgba(255, 170, 0, 0.8);
}

/* ===============================================
   POSICIONAMIENTO EN DECK
   =============================================== */
.deck-a .slip-container {
    position: absolute;
    left: 8px;
    bottom: 95px;
    z-index: 50;
}

.deck-b .slip-container {
    position: absolute;
    right: 8px;
    bottom: 95px;
    z-index: 50;
}

/* ===============================================
   ICONO SLIP (Flecha circular)
   =============================================== */
.slip-icon {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.slip-btn.active .slip-icon {
    stroke: #ffaa00;
    filter: drop-shadow(0 0 2px rgba(255, 170, 0, 0.6));
}

/* ===============================================
   RESPONSIVE
   =============================================== */
@media (max-width: 768px) {
    .slip-btn {
        width: 34px;
        height: 20px;
        font-size: 7px;
    }

    .slip-icon {
        width: 8px;
        height: 8px;
    }

    .slip-led {
        width: 5px;
        height: 5px;
    }

    .deck-a .slip-container,
    .deck-b .slip-container {
        bottom: 70px;
    }
}

/* ===============================================
   TOOLTIP
   =============================================== */
.slip-btn[title]::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    font-size: 9px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
    margin-bottom: 4px;
}

.slip-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===============================================
   INTEGRACIÓN CON OTROS CONTROLES
   =============================================== */
/* Cuando slip está activo, resaltar controles relacionados */
.deck[data-slip-active="true"] .loop-buttons-vertical,
.deck[data-slip-active="true"] .cue-memory-vertical,
.deck[data-slip-active="true"] .vinyl-xl {
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.15);
}

/* Indicador en el vinilo cuando slip está activo */
.deck[data-slip-active="true"] .vinyl-xl::after {
    content: 'SLIP';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    color: #ffaa00;
    text-shadow: 0 0 4px rgba(255, 170, 0, 0.8);
    letter-spacing: 1px;
    z-index: 10;
}
