/**
 * DJ 8 Hot Cues Module - Styles
 * Estilos para Hot Cues 5-8 extendidos con colores
 */

/* ===============================================
   CONTENEDOR HOT CUES EXTENDIDOS (5-8)
   =============================================== */
.cue-memory-extended {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cue-row-extended {
    display: flex;
    align-items: center;
    gap: 3px;
}

.cue-row-extended.deck-a {
    flex-direction: row;
}

.cue-row-extended.deck-b {
    flex-direction: row-reverse;
}

/* ===============================================
   BOTONES HOT CUE EXTENDIDOS
   =============================================== */
.cue-memory-btn-extended {
    width: 18px;
    height: 18px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, #2a2a35 0%, #1a1a22 100%);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.cue-memory-btn-extended:hover {
    background: linear-gradient(180deg, #3a3a45 0%, #2a2a32 100%);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Estado activo - con color del cue */
.cue-memory-btn-extended.active {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--cue-color, #ff4444) 30%, #2a2a35) 0%,
        color-mix(in srgb, var(--cue-color, #ff4444) 20%, #1a1a22) 100%
    );
    border-color: var(--cue-color, #ff4444);
    color: var(--cue-color, #ff4444);
    box-shadow: 0 0 8px color-mix(in srgb, var(--cue-color, #ff4444) 50%, transparent);
}

.cue-memory-btn-extended.active:hover {
    box-shadow: 0 0 12px color-mix(in srgb, var(--cue-color, #ff4444) 70%, transparent);
}

/* Flash al activar */
.cue-memory-btn-extended.flash {
    animation: hotcue-flash 0.15s ease-out;
}

@keyframes hotcue-flash {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 15px var(--cue-color, #ff4444); }
    100% { transform: scale(1); }
}

/* ===============================================
   LED HOT CUE EXTENDIDO
   =============================================== */
.cue-led-extended {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(80, 80, 90, 0.5);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cue-led-extended.active {
    background: var(--cue-color, #ff4444);
    box-shadow: 0 0 6px var(--cue-color, #ff4444);
}

.cue-led-extended:hover {
    transform: scale(1.2);
}

/* ===============================================
   COLORES PREDETERMINADOS POR SLOT
   =============================================== */
/* Slot 5 - Cyan */
.cue-memory-btn-extended[data-slot="5"] { --cue-color: #00d4ff; }
.cue-led-extended[data-slot="5"] { --cue-color: #00d4ff; }

/* Slot 6 - Azul */
.cue-memory-btn-extended[data-slot="6"] { --cue-color: #4488ff; }
.cue-led-extended[data-slot="6"] { --cue-color: #4488ff; }

/* Slot 7 - Púrpura */
.cue-memory-btn-extended[data-slot="7"] { --cue-color: #aa44ff; }
.cue-led-extended[data-slot="7"] { --cue-color: #aa44ff; }

/* Slot 8 - Rosa */
.cue-memory-btn-extended[data-slot="8"] { --cue-color: #ff44aa; }
.cue-led-extended[data-slot="8"] { --cue-color: #ff44aa; }

/* ===============================================
   TAMBIÉN ACTUALIZAR ESTILOS DE CUES 1-4
   =============================================== */
.cue-memory-btn[data-slot="1"] { --cue-color: #ff4444; }
.cue-memory-btn[data-slot="2"] { --cue-color: #ff8800; }
.cue-memory-btn[data-slot="3"] { --cue-color: #ffcc00; }
.cue-memory-btn[data-slot="4"] { --cue-color: #00ff88; }

.cue-led[data-slot="1"] { --cue-color: #ff4444; }
.cue-led[data-slot="2"] { --cue-color: #ff8800; }
.cue-led[data-slot="3"] { --cue-color: #ffcc00; }
.cue-led[data-slot="4"] { --cue-color: #00ff88; }

/* Estado activo de Hot Cues originales con color */
.cue-memory-btn.active {
    border-color: var(--cue-color, #00ff88);
    color: var(--cue-color, #00ff88);
    box-shadow: 0 0 8px color-mix(in srgb, var(--cue-color, #00ff88) 50%, transparent);
}

.cue-led.active {
    background: var(--cue-color, #00ff88);
    box-shadow: 0 0 6px var(--cue-color, #00ff88);
}

/* ===============================================
   COLOR PICKER
   =============================================== */
.hotcue-color-picker {
    background: rgba(20, 20, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 120px;
}

.hotcue-color-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hotcue-color-picker-header span {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hotcue-color-close {
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: all 0.15s ease;
}

.hotcue-color-close:hover {
    background: rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.hotcue-color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.hotcue-color-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hotcue-color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px currentColor;
}

.hotcue-color-option.active {
    border-color: white;
    box-shadow: 0 0 8px currentColor;
}

/* ===============================================
   LABEL DE SECCIÓN
   =============================================== */
.cue-extended-label {
    font-size: 6px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 2px;
}

/* ===============================================
   RESPONSIVE
   =============================================== */
@media (max-width: 768px) {
    .cue-memory-btn-extended {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .cue-led-extended {
        width: 4px;
        height: 4px;
    }

    .hotcue-color-picker {
        min-width: 100px;
        padding: 6px;
    }

    .hotcue-color-option {
        width: 20px;
        height: 20px;
    }
}

/* ===============================================
   INDICADORES EN WAVEFORM
   =============================================== */
/* Marcadores de Hot Cue en waveform con color */
.waveform-hotcue-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    pointer-events: none;
    z-index: 15;
}

.waveform-hotcue-marker::before {
    content: attr(data-slot);
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px;
    background: inherit;
    color: #000;
}

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

.cue-memory-btn-extended:hover::after {
    opacity: 1;
    visibility: visible;
}
