/* ============ MULTITRACK MIXER UI ============ */

#view-multitrack {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.mt-header {
    background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 5;
    justify-content: space-between;
}

.mt-header-title {
    font-size: 15px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Folder selector */
.mt-folder-row {
    padding: 12px 14px;
    background-color: #18181b;
    border-bottom: 1px solid #27272a;
    flex-shrink: 0;
}

.mt-folder-select {
    width: 100%;
    background-color: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 6px;
    color: white;
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.mt-folder-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Transport controls */
.mt-transport {
    padding: 12px 14px;
    background-color: #18181b;
    border-bottom: 1px solid #27272a;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt-transport-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mt-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, #a3e635, #84cc16);
    border: none;
    color: #064e3b;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.1s, background 0.2s;
    flex-shrink: 0;
}

.mt-play-btn:hover {
    transform: scale(1.05);
}

.mt-play-btn.playing {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    color: white;
}

.mt-stop-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f87171, #ef4444);
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.1s;
    flex-shrink: 0;
}

.mt-stop-btn:hover {
    transform: scale(1.05);
}

.mt-progress-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mt-progress-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #a1a1aa;
}

.mt-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #27272a;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.mt-progress-bar:hover {
    background-color: #3f3f46;
}

.mt-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Master volume */
.mt-master-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 0 0;
}

.mt-master-label {
    font-size: 11px;
    font-weight: 700;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 55px;
    flex-shrink: 0;
}

.mt-master-slider {
    flex: 1;
    -webkit-appearance: none;
    background: transparent;
    outline: none;
}

.mt-master-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 5px;
    background: #3f3f46;
    border-radius: 3px;
}

.mt-master-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    cursor: pointer;
    margin-top: -6px;
}

/* Quick actions */
.mt-quick-actions {
    display: flex;
    gap: 6px;
}

.mt-quick-btn {
    padding: 5px 10px;
    background-color: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    color: #a1a1aa;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.mt-quick-btn:hover {
    background-color: #3f3f46;
    color: white;
}

/* Track list */
.mt-tracks-scroll {
    flex: 1;
    overflow-y: auto;
    background-color: #09090b;
    padding: 6px 0;
}

.mt-track-row {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: opacity 0.2s;
}

.mt-track-row.dimmed {
    opacity: 0.35;
}

.mt-track-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.mt-track-name {
    font-size: 12px;
    font-weight: 600;
    color: #e4e4e7;
    width: 100px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt-track-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.mt-btn-mute, .mt-btn-solo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #3f3f46;
    background-color: #27272a;
    color: #71717a;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.mt-btn-mute:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.mt-btn-solo:hover {
    border-color: #eab308;
    color: #eab308;
}

.mt-btn-mute.active {
    background-color: #ef4444;
    border-color: #ef4444;
    color: white;
}

.mt-btn-solo.active {
    background-color: #eab308;
    border-color: #eab308;
    color: #000;
}

.mt-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    background: transparent;
    outline: none;
    min-width: 60px;
}

.mt-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #3f3f46;
    border-radius: 2px;
}

.mt-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #e4e4e7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
    margin-top: -5px;
}

.mt-volume-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #3f3f46;
    border-radius: 2px;
}

.mt-volume-slider::-moz-range-thumb {
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #e4e4e7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    cursor: pointer;
    border: none;
}
