/*
 * Neutral base CSS of the parent theme (handle ee-core-base, design D1).
 * Only contract presets and the documented --ee-* properties of
 * contract.json; no literal colours. A child changes any --ee-* property
 * in a stylesheet that depends on ee-core-base, so it prints after this one.
 */

:root {
    --ee-focus-color: currentcolor;
    --ee-focus-width: 2px;
    --ee-focus-offset: 2px;
}

/* A visible keyboard focus on everything that takes focus (WCAG 2.4.7). */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: var(--ee-focus-width) solid var(--ee-focus-color);
    outline-offset: var(--ee-focus-offset);
}

/* The header-actions slot is empty until a child fills it. */
.ee-header-actions:empty {
    display: none;
}

/*
 * Reduced motion: CSS animations end at once and CSS transitions are off.
 * Transitions get 0s, not the common 0.01ms: transition-property defaults
 * to all, so any duration above zero on every element starts a transition
 * on every style change, also where the CSS declares none, and a script
 * that writes a style and reads it back (GSAP's from() with a delay or a
 * stagger) reads the old value. With 0s no transition starts, so
 * transitionend does not fire either. Motion made in JavaScript honours
 * the preference itself.
 */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-delay: 0s !important;
        transition-duration: 0s !important;
    }
}
