/**
 * Multi-Style Selector Widget CSS
 *
 * Usage: Add classes to container to change style
 * - Default (no class): Toggle buttons
 * - .selector-style-slider: Traditional slider
 * - .selector-style-bidirectional: Bidirectional from center
 * - .selector-style-enhanced: Position stops
 */

/* ===== BASE STYLES ===== */
.multi-selector-widget {
    position: relative;
}

.multi-selector-container {
    position: relative;
}

.selector-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary, #1a1a2e);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.selector-counter .counter-dots {
    display: flex;
    gap: 0.35rem;
}

.selector-counter .counter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border, rgba(255,255,255,0.2));
    transition: all 0.3s ease;
}

.selector-counter .counter-dot.active {
    background: var(--accent-psi, #a78bfa);
    box-shadow: 0 0 8px var(--accent-psi, #a78bfa);
}

.selector-counter .counter-text {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.selector-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.selector-item {
    background: var(--bg-tertiary, #2a2a3e);
    border-radius: 12px;
    /*padding: 1rem;*/
    transition: all 0.3s ease;
}

.selector-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.item-icon {
    font-size: 1.25rem;
}

.item-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-description {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-primary, #1a1a2e);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary, #a78bfa);
}

.description-text {
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
    font-style: italic;
}

/* ===== TOGGLE STYLE (DEFAULT) ===== */
.toggle-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary, #1a1a2e);
    border: 2px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary, #94a3b8);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    flex-direction: column;
}

.toggle-btn:hover:not(.active):not(.selector-item.disabled .toggle-btn) {
    background: var(--bg-secondary, #22223b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toggle-btn.active {
    color: var(--text-primary, #f1f5f9);
    border-color: var(--accent-primary, #a78bfa);
    background: var(--bg-secondary, #22223b);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.toggle-btn.center {
    max-width: 140px;
}

.toggle-btn.center .item-icon {
    opacity: 0.7;
}

.toggle-btn.center.active .item-icon {
    opacity: 1;
}

/* ===== SLIDER STYLE ===== */
.selector-style-slider .slider-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selector-style-slider .slider-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.selector-style-slider .slider-label.left {
    justify-content: flex-end;
}

.selector-style-slider .slider-label.right {
    justify-content: flex-start;
}

.selector-style-slider .slider-track-container {
    position: relative;
    flex: 1;
    height: 30px;
}

.selector-style-slider .slider-track {
    position: absolute;
    width: 100%;
    height: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-primary, #1a1a2e);
    border-radius: 4px;
}

.selector-style-slider .slider-fill {
    position: absolute;
    height: 100%;
    width: 33.33%;
    left: 33.33%;
    background: #475569;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.selector-style-slider .slider-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.selector-style-slider .slider-input::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== BIDIRECTIONAL STYLE ===== */
.selector-style-bidirectional .bi-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.selector-style-bidirectional .bi-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.selector-style-bidirectional .bi-center-mark {
    width: 2px;
    height: 20px;
    background: var(--border, rgba(255,255,255,0.1));
}

.selector-style-bidirectional .bi-track-container {
    position: relative;
    height: 40px;
}

.selector-style-bidirectional .bi-track {
    position: absolute;
    width: 100%;
    height: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-primary, #1a1a2e);
    border-radius: 6px;
}

.selector-style-bidirectional .bi-center-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--border, rgba(255,255,255,0.1));
    z-index: 2;
}

.selector-style-bidirectional .bi-fill-left,
.selector-style-bidirectional .bi-fill-right {
    position: absolute;
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

.selector-style-bidirectional .bi-fill-left {
    right: 50%;
}

.selector-style-bidirectional .bi-fill-right {
    left: 50%;
}

.selector-style-bidirectional .bi-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ===== ENHANCED STYLE ===== */
.selector-style-enhanced .enhanced-stops {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selector-style-enhanced .stop-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary, #94a3b8);
    font-family: inherit;
    opacity: 0.6;
}

.selector-style-enhanced .stop-btn:hover {
    opacity: 0.8;
    background: var(--bg-primary, #1a1a2e);
}

.selector-style-enhanced .stop-btn.active {
    opacity: 1;
    background: var(--bg-primary, #1a1a2e);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
}

.selector-style-enhanced .enhanced-track {
    position: relative;
    height: 8px;
    background: var(--bg-primary, #1a1a2e);
    border-radius: 4px;
}

.selector-style-enhanced .track-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        var(--accent-primary, #a78bfa) 0%,
        var(--bg-secondary, #22223b) 50%,
        var(--accent-secondary, #60a5fa) 100%);
    opacity: 0.3;
    border-radius: 4px;
}

.selector-style-enhanced .position-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary, #a78bfa);
    border: 3px solid var(--bg-primary, #1a1a2e);
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .selector-item {
        padding: 0.75rem;
    }

    .item-name {
        font-size: 0.75rem;
    }

    .item-icon {
        font-size: 1rem;
    }

    /* Toggle responsive */
    .toggle-buttons {
        flex-direction: column;
    }

    .toggle-btn {
        width: 100%;
    }

    .toggle-btn.center {
        max-width: 100%;
    }

    /* Slider responsive */
    .selector-style-slider .slider-label {
        min-width: auto;
        flex-direction: column;
        gap: 0.25rem;
    }

    .selector-style-slider .slider-content {
        gap: 0.5rem;
    }

    /* Enhanced responsive */
    .selector-style-enhanced .stop-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}