/* NOISE Module Specific Styles */
/* Uses global module-type1 styling but adds noise-specific components */

.noise-component-container {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}
.noise-component {
    margin-bottom: 15px;
}
/*========================DROPDOWN===================*/
.noise-dropdown {
    width: 100%;
    padding: 6px 8px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ccc;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    margin-top: 2px;
}
.noise-dropdown:hover {
    background: #3a3a3a;
    border-color: #666;
}
.noise-dropdown:focus {
    background: #3a3a3a;
    border-color: #4a9eff;
    box-shadow: 0 0 4px rgba(74, 158, 255, 0.3);
}
.noise-dropdown option {
    background: #2a2a2a;
    color: #ccc;
    padding: 4px;
}
/*========================LEVEL===================*/

/* Level Slider Pot Container */
.noise-level-slider-pot {
    display: flex;
    flex-direction: column;
}

/* Header row: title left, value right */
.noise-level-slider-pot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.noise-level-slider-pot-header label {
    font-size: 12px;
    font-weight: bold;
	color: #999;
    margin: 0;
}

.noise-level-slider-pot-header .noise-value-display {
    font-size: 12px;
    color: #08e800; 
    font-family: monospace;
}

/* Slider track and thumb styling */
.noise-level-slider-pot input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #030303;
    border-radius: 3px;
    outline: none;
    margin: 0;
}
/* Webkit browsers thumb */
.noise-level-slider-pot input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #b5dd02;
    border: 2px solid #b5dd02;
    cursor: pointer;
    margin-top: -4px;
    transition: background 0.2s;
}
.noise-level-slider-pot input[type="range"]::-webkit-slider-thumb:hover {
    background: #555;
}

/*========================FILTER CONTROL===================*/
.noise-control-label {
    font-size: 12px;
    font-weight: bold;
    color: #999;
    margin-bottom: 8px;
}

.noise-filter-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.noise-filter-type-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.noise-filter-type-btn {
    background: #2a2a2a;
    border: 1px solid #555;
    color: #ccc;
    padding: 4px 6px;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
}

.noise-filter-type-btn:hover {
    background: #3a3a3a;
    border-color: #666;
}

.noise-filter-type-btn.active {
    background: #ff6b4a;
    border-color: #ff8566;
    color: #fff;
}

.noise-filter-freq-control,
.noise-filter-res-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.noise-sub-label {
    font-size: 9px;
    color: #999;
    min-width: 35px;
    font-weight: bold;
    text-align: right;
}

.noise-freq-slider-pot,
.noise-res-slider-pot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.noise-freq-slider,
.noise-res-slider {
    width: 60px;
    display: flex;
    height: 4px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    appearance: none;
}

/* Orange Knob Thumb */
.noise-freq-slider::-webkit-slider-thumb,
.noise-res-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #ff6b4a;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(255, 107, 74, 0.5);
}

.noise-freq-slider::-moz-range-thumb,
.noise-res-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ff6b4a;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(255, 107, 74, 0.5);
}
.noise-freq-display,
.noise-res-display {
    font-size: 10px;
    color: #ddd;
    min-width: 35px;
    text-align: right;
}
.noise-freq-display,
.noise-res-display {
    font-size: 9px;
    color: #ff6b4a;
    min-width: 35px;
    text-align: center;
    font-weight: bold;
}
/*========================MOD CONTROL===================*/
.noise-mod-controls {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.noise-mod-rate-control,
.noise-mod-depth-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.noise-mod-rate-pot,
.noise-mod-depth-pot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.noise-mod-rate-slider,
.noise-mod-depth-slider {
    width: 60px;
    display: flex;
    height: 4px;
    background: #000;
    border: 1px solid #000;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.noise-mod-rate-slider::-webkit-slider-thumb,
.noise-mod-depth-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #9f4aff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(159, 74, 255, 0.5);
}

.noise-mod-rate-display,
.noise-mod-depth-display {
    font-size: 9px;
    color: #888;
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
}
/*======================== CV INPUTS ===================*/

/* CV Patching Fields */
.noise-cv-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    height: 25px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #111;
    font-size: 12px;
    color: #999;
}

.noise-cv-field input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 12px;
    color: #ccc;
    width: 100%;
    font-weight: bold;
}

.noise-cv-field input::placeholder {
    color: #666;
    font-weight: normal;
}

/* Connection indicator dot */
.noise-cv-connection-indicator {
    width: 10px;
    height: 10px;
    background: gray;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 6px;
}

.noise-cv-connection-indicator.connected {
    background: #06F838; /* bright green for valid connection */
    box-shadow: 0 0 4px rgba(6, 248, 56, 0.6);
}

.noise-cv-connection-indicator.invalid {
    background: red;
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.6);
}

/*======================== OUTPUT ===================*/
.noise-output-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.noise-start-stop-btn {
    background: #2a2a2a;
    border: 1px solid #555;
    color: #ccc;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.noise-start-stop-btn:hover {
    background: #3a3a3a;
    border-color: #666;
}

.noise-start-stop-btn.active {
    background: #00ff88;
    border-color: #00ff88;
    color: #000;
}

.noise-output-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #555;
    transition: all 0.3s;
}

.noise-output-led.active {
    background: #00ff88;
    border-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

/* Output Level Meter */
.noise-output-level-meter {
    flex: 1;
    height: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
/* Level Slider (inherits from global but with noise-specific colors) */
.noise-level-slider-pot .noise-level-slider::-webkit-slider-thumb {
    background: #00ff88;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.5);
}

.noise-level-slider-pot .noise-value-display {
    color: #00ff88;
}

/* Level Bar for visual feedback */
.noise-level-bar {
    flex: 1;
    height: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-left: 8px;
}

.noise-level-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, #00ff88, #ffff00, #ff0000);
    width: 0%;
    transition: width 0.1s ease;
}

/* Responsive adjustments for noise module */
@media (max-width: 300px) {
    .filter-type-selector {
        grid-template-columns: 1fr 1fr;
    }
    
    .mod-controls {
        flex-direction: column;
        gap: 8px;
    }
}

/*========================SPACER===================*/
.noise-space10 {
    height: 10px; /* Adjust gap size */
    width: 100%;
}
.noise-space20 {
    height: 20px; /* Adjust gap size */
    width: 100%;
}
.noise-space30 {
    height: 30px; /* Adjust gap size */
    width: 100%;
}
.noise-space40 {
    height: 40px; /* Adjust gap size */
    width: 100%;
}
