/**
 * Audio Settings Styles — tabs, volume slider, device dropdowns.
 *
 * Follows the mm-acct-* pattern from auth.css for visual consistency.
 */

/* --- Config Tab Bar --- */

.mm-config-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    flex-shrink: 0;
}

.mm-config-tab {
    padding: 8px 20px;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.mm-config-tab:hover {
    color: rgba(255, 255, 255, 0.55);
}

.mm-config-tab.active {
    color: rgba(255, 255, 255, 0.7);
    border-bottom-color: var(--ase-mm-ring-color, #ed1c24);
}

.mm-config-tab-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* --- Volume Slider --- */

.mm-audio-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.mm-audio-slider-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    width: 100px;
}

.mm-audio-slider-value {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.mm-audio-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.mm-audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.15s ease;
}

.mm-audio-slider::-webkit-slider-thumb:hover {
    background: rgba(255, 255, 255, 0.85);
}

.mm-audio-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.15s ease;
}

.mm-audio-slider::-moz-range-thumb:hover {
    background: rgba(255, 255, 255, 0.85);
}

.mm-audio-slider::-moz-range-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    border: none;
}

/* --- Device Dropdowns (Custom div-based — native <select> popups are
       unstyled white in Firefox/Linux and cannot be themed) --- */

.mm-audio-select-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.mm-audio-select-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    width: 100px;
}

.mm-csel {
    flex: 1;
    position: relative;
    user-select: none;
}

.mm-csel-display {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    padding: 6px 10px;
    padding-right: 28px;
    font-family: inherit;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-height: 22px;
}

.mm-csel-display:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
}

.mm-csel-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mm-csel-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.mm-csel-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 2px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.mm-csel-list.open {
    display: block;
}

.mm-csel-option {
    padding: 5px 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.1s ease;
}

.mm-csel-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mm-csel-option.selected {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.07);
}

.mm-csel-option.disabled {
    color: rgba(255, 255, 255, 0.25);
    cursor: default;
    font-style: italic;
}

.mm-csel-option.disabled:hover {
    background: none;
}

/* --- HTTPS Notice --- */

.mm-audio-notice {
    font-size: 10px;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.3);
    padding: 8px 0;
    line-height: 1.5;
}

/* --- Refresh Devices Button --- */

.mm-audio-refresh {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 3px 10px;
    font-family: inherit;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.mm-audio-refresh:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
}

/* --- Mute Toggle Row --- */

.mm-audio-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    min-height: 28px;
}

.mm-audio-toggle-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.mm-audio-toggle {
    position: relative;
    width: 32px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    padding: 0;
}

.mm-audio-toggle.active {
    background: var(--ase-mm-ring-color, #ed1c24);
    opacity: 0.6;
}

.mm-audio-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
}

.mm-audio-toggle.active::after {
    transform: translateX(16px);
}
