/**
 * Options window. Load order is significant: keep this file's <link> position in index.html.
 */

.modal-panel--options {
    max-width: min(320px, 92vw);
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.modal-panel--options .modal-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    margin-bottom: 8px;
    width: 100%;
    position: relative;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.options-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--well);
    border: 2px solid var(--edge);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.options-row input[type='checkbox'] {
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 3px solid var(--edge);
    border-radius: 4px;
    background: linear-gradient(var(--surface-top), var(--surface-bottom));
    cursor: pointer;
    position: relative;
    flex: 0 0 20px;
}

.options-row input[type='checkbox']:checked::after {
    content: '✓';
    position: absolute;
    inset: -3px 0 0;
    color: var(--text-strong);
    font-size: 16px;
    line-height: 18px;
    text-align: center;
}

.options-row input[type='checkbox']:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.options-row--restart {
    cursor: default;
    justify-content: center;
}

.options-restart {
    padding: 8px 22px;
    border-radius: 8px;
    border: 3px solid var(--danger);
    background: transparent;
    color: var(--danger-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.options-restart:hover {
    filter: brightness(1.15);
}

.options-restart:active {
    transform: scale(0.93);
}

.options-restart:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/*
 * Volume rows. The channel checkbox above says on/off; the slider says how
 * loud. A muted channel keeps its level and only stops taking input, so the
 * player gets the same volume back when they switch the channel on again.
 */
.options-row--slider {
    justify-content: space-between;
    gap: 14px;
    cursor: default;
}

.options-row--slider.is-disabled {
    opacity: 0.45;
}

.options-slider__label {
    flex: 0 0 auto;
    font-size: 13px;
}

.options-slider {
    appearance: none;
    flex: 1 1 auto;
    min-width: 120px;
    height: 10px;
    margin: 0;
    border: 2px solid var(--edge);
    border-radius: 999px;
    background: var(--well);
    cursor: pointer;
}

.options-slider:disabled {
    cursor: default;
}

.options-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--edge);
    border-radius: 50%;
    background: linear-gradient(var(--surface-top), var(--surface-bottom));
    cursor: inherit;
}

.options-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 2px solid var(--edge);
    border-radius: 50%;
    background: linear-gradient(var(--surface-top), var(--surface-bottom));
    cursor: inherit;
}

.options-slider:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
