/**
 * Control Elements - Sliders, toggles, selects, inputs
 */

/* Control Rows */
.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    min-height: var(--control-height);
}

.control-label {
    flex: 0 0 auto;
    min-width: 80px;
    max-width: 120px;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-container {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 0;
}

.value-display {
    min-width: 40px;
    max-width: 50px;
    text-align: right;
    font-size: 0.9em;
    flex-shrink: 0;
}

/* Range Sliders */
input[type="range"] {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    background: var(--color-slider-track);
    height: var(--slider-height);
    border-radius: var(--radius-md);
    outline: none;
    transition: background var(--transition-fast);
}

input[type="range"]:hover {
    background: #444;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: var(--slider-thumb-size);
    height: var(--slider-thumb-size);
    border-radius: var(--radius-full);
    background: var(--color-slider-thumb);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

input[type="range"]::-moz-range-thumb {
    width: var(--slider-thumb-size);
    height: var(--slider-thumb-size);
    border-radius: var(--radius-full);
    background: var(--color-slider-thumb);
    cursor: pointer;
    border: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

input[type="range"]::-moz-range-thumb:active {
    transform: scale(0.95);
}

/* Toggle Switches */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    min-height: var(--control-height);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: var(--toggle-width);
    height: var(--toggle-height);
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-slider-track);
    transition: background-color 0.4s;
    border-radius: var(--radius-xl);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: var(--toggle-dot-size);
    width: var(--toggle-dot-size);
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform 0.4s, box-shadow var(--transition-fast);
    border-radius: var(--radius-full);
}

.toggle-slider:hover:before {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

input:checked + .toggle-slider {
    background-color: var(--color-accent);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Select Dropdowns */
select {
    background-color: var(--color-slider-track);
    color: white;
    border: none;
    padding: 2px var(--spacing-sm);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    outline: none;
    min-width: 90px;
    flex: 1;
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

select:hover {
    background-color: #444;
}

select:focus {
    background-color: #444;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

select option {
    background-color: #222;
    padding: var(--spacing-sm);
}

/* Color Picker */
#colorPicker {
    appearance: none;
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    border: none;
    cursor: pointer;
    background-color: transparent;
    transition: transform var(--transition-fast);
}

#colorPicker:hover {
    transform: scale(1.1);
}

#colorPicker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#colorPicker::-webkit-color-swatch {
    border: 1px solid white;
    border-radius: var(--radius-full);
}








