/* ===== FM MODULE (FREQUENCY MODULATION) ===== */

/* Make components more compact */
.fm-component-container {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.fm-component {
    margin-bottom: 6px;
}

/* Frequency Knob Container (Automated) */
.fm-knob-container {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-size: contain;
    position: relative;
    margin-top: -5px;
}

.fm-knob-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

.fm-knob {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #111;
    position: relative;
    margin: 12px 0 8px 0;
    transform: rotate(-130deg);
    transition: transform 0.1s ease-out;
    pointer-events: none; /* Disable manual interaction for automated knob */
    border: 2px solid #FF6600; /* Orange border to indicate automation */
}

.fm-knob .fm-knob-dot {
    width: 8px;
    height: 8px;
    background: #FF6600; /* Orange dot for automation */
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.fm-knob-value-display {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #FF6600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.fm-labels-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 10px;
    color: #ccc;
    margin-top: 5px;
}

.fm-label-min, .fm-label-max {
    font-size: 9px;
    color: #999;
}

.fm-label-title {
    font-size: 11px;
    color: #FF6600;
    font-weight: bold;
}

/* CV Input Styling */
.fm-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;
}

.fm-cv-input-field {
    background: transparent;
    border: none;
    outline: none;
    font-size: 12px;
    color: #ccc;
    width: 100%;
    font-weight: bold;
}

.fm-cv-input-field::placeholder {
    color: #666;
}

/* CV Connection Indicator */
.cv-connection-indicator {
    width: 8px;
    height: 8px;
    background: gray;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.cv-connection-indicator.connected {
    background: #06F838; /* green like VCA */
}

.cv-connection-indicator.invalid {
    background: red;
}

/* Audio Input Fields - Global Style */
.fm-label-field {
    font-size: 12px;
    font-weight: bold;
    color: #ccc;
    margin-bottom: 5px;
    display: block;
}

.fm-patching-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;
}

.fm-patching-field input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 12px;
    color: #ccc;
    width: 100%;
    font-weight: bold;
}

.fm-patching-field input::placeholder {
    color: #666;
}

/* Slider Pots */
.fm-slider-pot {
      padding: 8px;
}

.fm-slider-pot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.fm-slider-pot-header label {
    color: #ccc;
    font-size: 12px;
    font-weight: bold;
}

.fm-slider-pot-header .fm-value-display {
    color: #FF6600;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    min-width: 10px;
    text-align: center;
}

.fm-slider-pot input[type="range"] {
    width: 100%;
    height: 4px;
    background: #000;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.fm-slider-pot input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #FF6600;
    border-radius: 50%;
    cursor: pointer;
}

.fm-slider-pot input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #FF6600;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Shape Dropdown */
.fm-shape-dropdown {
      padding-top: 8px;
}

.fm-shape-dropdown label {
    display: block;
    color: #ccc;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
}

.fm-shape-dropdown select {
    width: 100%;
    background: #000;
    color: #ccc;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 4px;
    font-size: 11px;
    outline: none;
}

.fm-shape-dropdown select:focus {
    border-color: #FF6600;
}

/* FM Button (Start/Stop) */
.fm-button .fm-btn {
    width: 100%;
    padding: 6px 0;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #333;
    color: #fff;
    transition: background 0.2s, border 0.2s;
}

.fm-button .fm-btn:hover {
    background: #555;
}

.fm-button .fm-btn.active {
    background: #FF6600;
    border: 1px solid #111;
    color: #fff;
}

/* Spacing Classes */
.fm-space5 { margin-bottom: 5px; }
.fm-space10 { margin-bottom: 10px; }
.fm-space15 { margin-bottom: 15px; }
.fm-space20 { margin-bottom: 20px; }
.fm-space30 { margin-bottom: 30px; }