/* ---------------------------------------------------------------------------
   Controls (shared by the toolkit panel and the Content Preferences page)
   ------------------------------------------------------------------------- */
.ateControls { display:block; min-inline-size:0; overflow-wrap:anywhere; font-size:.94rem; line-height:1.45; color:var(--ate-text); }
.ateControls__section { display:grid; grid-template-columns:minmax(0,1fr); gap:.45rem; padding-top:.85rem; }
.ateControls__section h3 { margin:0; font-size:.85rem; font-weight:750; color:var(--ate-soft-text); }
.ateControls__note { font-size:.8rem; line-height:1.4; color:var(--ate-soft-text); }
.ateControls__size { display:flex; gap:.4rem; flex-wrap:wrap; }
.ateControls__button {
    min-height:44px; min-width:44px; padding:.45rem .8rem; font:inherit; cursor:pointer;
    border:1px solid var(--ate-border); border-radius:7px; color:var(--ate-text); background:var(--ate-surface);
}
.ateControls__button:hover:not(:disabled) { border-color:var(--ate-accent); }
.ateControls__button[aria-pressed="true"] { border-color:var(--ate-accent); box-shadow:inset 0 0 0 1px var(--ate-accent); }
.ateControls__button:disabled { cursor:not-allowed; opacity:.5; }
.ateControls__sizeStatus { font-size:.82rem; }
.ateControls__check { display:flex; align-items:center; gap:.6rem; margin:0; padding:.3rem 0; cursor:pointer; min-height:44px; }
.ateControls__check input { width:1.1rem; height:1.1rem; flex:0 0 auto; accent-color:var(--ate-accent); }
.ateControls__check input:disabled + span { opacity:.55; }
.ateControls__check input:disabled { cursor:not-allowed; }
.ateControls__reset { width:100%; margin-top:1rem; }
.ateControls :focus-visible { outline:3px solid var(--ate-focus); outline-offset:3px; }


@media (forced-colors:active) { .ateControls__button { border-color:ButtonText; } }

/* Phase 22: two-tone focus on owned controls, visible on light and dark surfaces. */
html[data-ate-mode="on"].atePref--focusStrong .ateControls :is(button, input, select):focus-visible {
    outline:3px solid #111 !important; outline-offset:3px !important;
    box-shadow:0 0 0 3px #fff !important;
}
@media (forced-colors:active) {
    html[data-ate-mode="on"].atePref--focusStrong .ateControls :is(button, input, select):focus-visible,
    html[data-ate-mode] .ateControls :is(button, input, select):focus-visible {
        outline:3px solid Highlight !important; outline-offset:3px !important;
        box-shadow:none !important;
    }
}

/* Shared base for every labelled select (presets, advanced accessibility and
   any section without its own rules). Single-class specificity: section rules still win. */
:where(.ateControls__field) { display: grid; gap: .3rem; max-inline-size: 32rem; }
:where(.ateControls__fieldLabel) { font-size: .82rem; font-weight: 650; }
.ateControls__select {
    box-sizing: border-box;
    min-block-size: 44px;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    padding: .4rem .65rem;
    border: 1px solid var(--ate-border, currentColor);
    border-radius: 6px;
    color: var(--ate-text, inherit);
    background: var(--ate-surface, transparent);
    font: inherit;
}
.ateControls__select:disabled { opacity: .55; }
