/* B — Strength Slider: vertical slider on desktop, horizontal bar on mobile. */
.option-b-section {
    height: calc(100vh - var(--header-height));

    --switch-width: 20px;
    --switch-height: 10px;
    --switch-knob-size: 8px;
    --switch-off-color: var(--color-gray);
    --switch-on-color: var(--color-green);
    --switch-knob-color: var(--color-white);
}

.option-b-section .toolbar {
    align-items: flex-start;
}

.option-b-section .toolbar__switcher-container {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-inline: 0;
    padding-top: 0;
}

.option-b-section .strength-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: opacity var(--transition);
}

.option-b-section .strength-control--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.option-b-section .strength-value {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* Desktop: a natively vertical slider (writing-mode), no rotation hack. */
.option-b-section .range-container {
    background-color: var(--color-white);
    width: 55px;
    height: 200px;
    border-radius: var(--radius-sm);
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.option-b-section .range-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: var(--range-thumb-size);
    height: 150px;

    --range-track-height: 10px;
    --range-thumb-size: 20px;
    --slider-percentage: 80%;
}

/*
 * The fill is painted on the track rather than the element background, so it
 * follows the vertical track geometry. js/ui/range.js drives the percentage.
 */
.option-b-section .range-slider::-webkit-slider-runnable-track {
    background: linear-gradient(
        to top,
        var(--color-accent) var(--slider-percentage),
        var(--color-gray) var(--slider-percentage)
    );
    border-radius: var(--radius-sm);
}

/* Firefox fills the track with its own progress pseudo-element instead. */
.option-b-section .range-slider::-moz-range-track {
    background: var(--color-gray);
    border-radius: var(--radius-sm);
}

.option-b-section .range-slider::-moz-range-progress {
    block-size: var(--range-track-height);
    background: var(--color-accent);
    border-radius: var(--radius-sm);
}

.option-b-section .range-slider::-moz-range-thumb {
    background: var(--color-accent);
    cursor: pointer;
}

/* Mobile bar, pinned to the bottom of the stage. */
.option-b-section .toolbar__mobile {
    display: none;
    position: absolute;
    bottom: var(--offset);
    left: var(--offset);
    right: var(--offset);
    z-index: 10;
    align-items: center;
    gap: 10px;
    background-color: var(--color-white);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.option-b-section .range-container--mobile {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.option-b-section .range-slider--mobile {
    flex-grow: 1;
    height: var(--range-track-height);

    --range-track-height: 10px;
    --range-thumb-size: 20px;
    background: linear-gradient(
        to right,
        var(--color-accent) 80%,
        var(--color-gray) 80%
    );
    outline: none;
    border-radius: var(--radius-sm);
}

.option-b-section .range-slider--mobile::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px var(--color-gray);
}

.option-b-section .range-slider--mobile::-moz-range-thumb {
    cursor: pointer;
    background: var(--color-white)
        radial-gradient(circle at center, var(--color-accent) 33%, transparent 33%);
    box-shadow: 0 0 0 1px var(--color-gray);
}

.option-b-section .auto-enhance-checkbox {
    display: none;
}

.option-b-section .toolbar-label--mobile {
    cursor: pointer;
    color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-b-section
    .toolbar-switch--mobile:has(input:checked)
    .toolbar-label--mobile {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .option-b-section .toolbar {
        display: none;
    }

    .option-b-section .toolbar__mobile {
        display: flex;
    }
}
