/**
 * DJ Crossfader Curves Module - Styles
 * Selector de curvas para el crossfader
 */

/* ===============================================
   CONTENEDOR DE CURVAS
   =============================================== */
.crossfader-curve-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

/* ===============================================
   SELECTOR DE CURVAS
   =============================================== */
.curve-selector {
    display: flex;
    gap: 2px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.curve-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 2px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: linear-gradient(180deg, #2a2a35 0%, #1a1a22 100%);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.curve-btn.active {
    background: linear-gradient(180deg, #1a3a4a 0%, #0d2530 100%);
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.curve-icon {
    font-size: 10px;
    line-height: 1;
}

.curve-name {
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

/* ===============================================
   PREVIEW DE CURVA
   =============================================== */
.curve-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

#curvePreviewCanvas {
    display: block;
}

/* ===============================================
   LABEL DE CURVA ACTUAL
   =============================================== */
.curve-current-label {
    font-size: 7px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===============================================
   ICONOS DE CURVA
   =============================================== */
/* Linear */
.curve-btn[data-curve="linear"] .curve-icon::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 2px;
    background: currentColor;
    transform: rotate(-45deg);
}

/* Scratch */
.curve-btn[data-curve="scratch"].active {
    background: linear-gradient(180deg, #4a2a1a 0%, #302010 100%);
    color: #ff8800;
    border-color: rgba(255, 136, 0, 0.4);
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.3);
}

/* Smooth */
.curve-btn[data-curve="smooth"].active {
    background: linear-gradient(180deg, #1a4a3a 0%, #0d3025 100%);
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

/* Blend */
.curve-btn[data-curve="blend"].active {
    background: linear-gradient(180deg, #3a1a4a 0%, #250d30 100%);
    color: #ff00c8;
    border-color: rgba(255, 0, 200, 0.4);
    box-shadow: 0 0 8px rgba(255, 0, 200, 0.3);
}

/* ===============================================
   TOOLTIP
   =============================================== */
.curve-btn[title] {
    position: relative;
}

.curve-btn::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;
}

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

/* ===============================================
   ANIMACIÓN DE CAMBIO
   =============================================== */
@keyframes curve-change {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.curve-btn.active {
    animation: curve-change 0.2s ease-out;
}

/* ===============================================
   RESPONSIVE
   =============================================== */
@media (max-width: 768px) {
    .crossfader-curve-container {
        gap: 2px;
        margin-bottom: 4px;
    }

    .curve-selector {
        gap: 1px;
        padding: 1px;
    }

    .curve-btn {
        width: 24px;
        height: 24px;
    }

    .curve-icon {
        font-size: 8px;
    }

    .curve-name {
        font-size: 5px;
    }

    .curve-preview {
        display: none;
    }
}

/* ===============================================
   INTEGRACIÓN CON CROSSFADER
   =============================================== */
/* Indicador visual en el crossfader según curva */
.crossfader-box[data-curve="scratch"] .crossfader-lg::-webkit-slider-thumb {
    background: linear-gradient(180deg, #ff8800 0%, #cc6600 100%);
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

.crossfader-box[data-curve="smooth"] .crossfader-lg::-webkit-slider-thumb {
    background: linear-gradient(180deg, #00ff88 0%, #00cc66 100%);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.crossfader-box[data-curve="blend"] .crossfader-lg::-webkit-slider-thumb {
    background: linear-gradient(180deg, #ff00c8 0%, #cc00a0 100%);
    box-shadow: 0 0 10px rgba(255, 0, 200, 0.5);
}

/* Firefox */
.crossfader-box[data-curve="scratch"] .crossfader-lg::-moz-range-thumb {
    background: linear-gradient(180deg, #ff8800 0%, #cc6600 100%);
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

.crossfader-box[data-curve="smooth"] .crossfader-lg::-moz-range-thumb {
    background: linear-gradient(180deg, #00ff88 0%, #00cc66 100%);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.crossfader-box[data-curve="blend"] .crossfader-lg::-moz-range-thumb {
    background: linear-gradient(180deg, #ff00c8 0%, #cc00a0 100%);
    box-shadow: 0 0 10px rgba(255, 0, 200, 0.5);
}

/* ===============================================
   LEYENDA ATAJOS TECLADO
   =============================================== */
.curve-shortcuts-hint {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 7px;
    color: rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}
