/* Ableton Live Inspired Stem Player Styling */

#stem-player-container {
    display: flex;
    flex-direction: row; /* Horizontal layout for mixer strips */
    gap: 10px;
    padding: 20px;
    background-color: #383838; /* Ableton Dark Grey */
    border-radius: 8px;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: auto; /* Allow scrolling if many tracks */
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    height: 400px; /* Fixed height for the mixer */
    align-items: stretch;
}

.mixer-strip {
    display: flex;
    flex-direction: column;
    width: 70px;
    background-color: #5a5a5a;
    border: 1px solid #222;
    border-radius: 2px;
    padding: 5px;
    position: relative;
    justify-content: space-between;
}

.track-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    background-color: #333;
    padding: 4px 2px;
    margin-bottom: 10px; /* Increased margin since pan knob is gone */
    border-radius: 2px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fader-section {
    display: flex;
    flex-direction: row;
    height: 200px;
    justify-content: center;
    gap: 5px;
    position: relative;
}

/* Custom Vertical Slider (Fader) */
.volume-fader {
    -webkit-appearance: none;
    appearance: none;
    width: 25px; /* Width of the slider track area */
    height: 100%;
    background: transparent;
    outline: none;
    writing-mode: bt-lr; /* IE */
    -webkit-appearance: slider-vertical; /* WebKit */
}

/* Webkit (Chrome/Safari) Fader Styling */
.volume-fader::-webkit-slider-runnable-track {
    width: 6px;
    background: #222;
    border-radius: 2px;
    border: 1px solid #555;
}

.volume-fader::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #000;
    height: 10px;
    width: 30px; /* Make thumb wider than track */
    border-radius: 2px;
    background: #ccc;
    margin-left: -12px; /* Center the thumb */
    margin-top: 0;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
    position: relative;
}

/* Triangle indicator on fader thumb */
.volume-fader::-webkit-slider-thumb::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 2px;
    width: 0; 
    height: 0; 
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-right: 5px solid #333;
}

/* Firefox Fader Styling */
.volume-fader::-moz-range-track {
    width: 6px;
    background: #222;
    border-radius: 2px;
}

.volume-fader::-moz-range-thumb {
    width: 20px;
    height: 10px;
    background: #ccc;
    border: 1px solid #000;
    cursor: pointer;
    border-radius: 2px;
}

/* VU Meter Canvas */
.vu-meter {
    width: 12px;
    height: 100%;
    background-color: #222;
    border: 1px solid #111;
    border-radius: 1px;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
}

.ableton-btn {
    width: 100%;
    height: 24px;
    border: none;
    border-radius: 2px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    background-color: #888;
    color: #222;
    text-align: center;
    line-height: 24px;
    transition: background-color 0.1s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 1px rgba(0,0,0,0.2);
}

.ableton-btn:hover {
    filter: brightness(1.1);
}

/* Track Activator (Mute/On) - Yellow when active */
.btn-activator {
    background-color: #555; /* Default off state (darker) */
    color: #888;
}
.btn-activator.active {
    background-color: #eec643; /* Ableton Yellow */
    color: #000;
    box-shadow: 0 0 5px rgba(238, 198, 67, 0.5);
}

/* Solo Button - Blue when active */
.btn-solo {
    background-color: #555;
    color: #888;
}
.btn-solo.active {
    background-color: #2d8cf0; /* Ableton Blue */
    color: #fff;
}

/* Master Strip specific styles */
.master-strip {
    background-color: #444;
    margin-left: 10px;
    border-left: 2px solid #222;
}

#play-controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
}

.master-play-btn {
    width: 100%;
    height: 30px;
    background-color: #222;
    color: #ccc;
    font-size: 14px;
    border: 1px solid #555;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.master-play-btn:hover {
    background-color: #333;
}
.master-play-btn.playing {
    background-color: #4caf50; /* Green play state */
    color: #fff;
}

.track-number {
    font-size: 14px;
    font-weight: bold;
}
