/* Classic controls use one scalable mark instead of version-specific WordPress SVGs.
 * React switches/checkboxes keep their own SVG and toggle implementations. */
:is(body.aquila-admin, body.login)
    input[type='checkbox']:not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not([role='switch']),
:is(body.aquila-admin, body.login) input[type='radio']:not(.components-radio-control__input) {
    position: relative;
    box-sizing: border-box;
    appearance: none;
    background: var(--aq-surface);
    border: 1px solid var(--aq-muted);
    box-shadow: none;
    color: var(--aq-active-text);
    vertical-align: middle;
}
:is(body.aquila-admin, body.login)
    input[type='checkbox']:not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not([role='switch'])::before {
    content: '';
    display: none;
    position: absolute;
    box-sizing: border-box;
    float: none;
    margin: 0;
    background: none;
}
:is(body.aquila-admin, body.login)
    input[type='checkbox']:not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not([role='switch']):checked,
:is(body.aquila-admin, body.login)
    input[type='checkbox']:not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not([role='switch']):indeterminate,
:is(body.aquila-admin, body.login)
    input[type='radio']:not(.components-radio-control__input):checked {
    background: var(--aq-primary);
    border-color: var(--aq-primary);
}
:is(body.aquila-admin, body.login)
    input[type='checkbox']:not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not([role='switch']):checked::before {
    display: block;
    left: 50%;
    top: 50%;
    width: 75%;
    height: 75%;
    border: 0;
    background: var(--aq-active-text);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 12 5 5L20 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        center / contain no-repeat;
    transform: translate(-50%, -50%);
}
:is(body.aquila-admin, body.login)
    input[type='checkbox']:not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not([role='switch']):indeterminate::before {
    display: block;
    left: 22%;
    top: calc(50% - 1px);
    width: 56%;
    height: 2px;
    border: 0;
    background: var(--aq-active-text);
    transform: none;
}
:is(body.aquila-admin, body.login)
    input[type='radio']:not(.components-radio-control__input)::before {
    content: '';
    display: none;
    position: absolute;
    left: 27%;
    top: 27%;
    width: 46%;
    height: 46%;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: var(--aq-active-text);
}
:is(body.aquila-admin, body.login)
    input[type='radio']:not(.components-radio-control__input):checked::before {
    display: block;
}
:is(body.aquila-admin, body.login) input:is([type='checkbox'], [type='radio']):focus-visible {
    outline: 2px solid var(--aq-primary);
    outline-offset: 3px;
}
:is(body.aquila-admin, body.login) input:is([type='checkbox'], [type='radio']):disabled {
    opacity: 0.55;
    cursor: default;
}
@media (forced-colors: active) {
    :is(body.aquila-admin, body.login)
        input:is([type='checkbox'], [type='radio']):not(.components-form-toggle__input):not(
            .components-checkbox-control__input
        ):not(.components-radio-control__input):not([role='switch']) {
        forced-color-adjust: none;
        background: Canvas !important;
        border-color: CanvasText !important;
    }
    :is(body.aquila-admin, body.login)
        input:is([type='checkbox'], [type='radio']):not(.components-form-toggle__input):not(
            .components-checkbox-control__input
        ):not(.components-radio-control__input):not([role='switch']):checked,
    :is(body.aquila-admin, body.login)
        input[type='checkbox']:not(.components-form-toggle__input):not(
            .components-checkbox-control__input
        ):not(.components-radio-control__input):not([role='switch']):indeterminate {
        background: Highlight !important;
        border-color: Highlight !important;
    }
    :is(body.aquila-admin, body.login)
        input[type='checkbox']:not(.components-form-toggle__input):not(
            .components-checkbox-control__input
        ):not(.components-radio-control__input):not([role='switch']):checked::before {
        background: HighlightText !important;
    }
    :is(body.aquila-admin, body.login)
        input[type='checkbox']:not(.components-form-toggle__input):not(
            .components-checkbox-control__input
        ):not(.components-radio-control__input):not([role='switch']):indeterminate::before,
    :is(body.aquila-admin, body.login)
        input[type='radio']:not(.components-form-toggle__input):not(
            .components-checkbox-control__input
        ):not(.components-radio-control__input):not([role='switch']):checked::before {
        background: HighlightText !important;
    }
}
/* Standalone settings controls and inline choice labels share one centre line. */
:is(body.aquila-admin, body.login)
    input:is([type='checkbox'], [type='radio']):not(.components-form-toggle__input):not(
        .components-checkbox-control__input
    ):not(.components-radio-control__input):not([role='switch']) {
    flex-shrink: 0;
    margin-block: 0;
    vertical-align: middle;
}
.aq-settings .aq-choice-list input[type='checkbox'],
.aq-settings .aq-reset-form input[type='checkbox'] {
    width: 20px;
    height: 20px;
    margin: 0;
}
.aq-settings .aq-reset-form label:has(> input[type='checkbox']) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
