/* Shared Evo light/dark action control. The icon shows the theme you can switch to. */
.evo-theme-toggle {
    align-items: center !important;
    appearance: none;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
    box-sizing: border-box;
    color: #f59e0b !important;
    cursor: pointer;
    display: inline-flex !important;
    flex: 0 0 3rem;
    height: 3rem !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 3rem !important;
    min-width: 3rem !important;
    overflow: hidden;
    padding: 0 !important;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    width: 3rem !important;
}

.evo-theme-toggle:hover,
.evo-theme-toggle:focus-visible {
    border-color: color-mix(in srgb, var(--ta-primary, #0ea5e9) 42%, #cbd5e1) !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12), 0 0 0 4px var(--ta-primary-ring, rgba(14, 165, 233, 0.18)) !important;
    outline: none;
}

.evo-theme-toggle:active {
    transform: translateY(1px);
}

.evo-theme-toggle__icon {
    align-items: center;
    display: inline-flex !important;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1rem !important;
    font-style: normal;
    height: 1.25rem;
    justify-content: center;
    line-height: 1 !important;
    pointer-events: none;
    user-select: none;
    width: 1.25rem;
}

.evo-theme-toggle__icon::before,
.evo-theme-toggle__icon::after {
    content: none !important;
    display: none !important;
}

html[data-theme="dark"] .evo-theme-toggle,
html.dark .evo-theme-toggle {
    background: #232526 !important;
    border-color: #424445 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .evo-theme-toggle:hover,
html[data-theme="dark"] .evo-theme-toggle:focus-visible,
html.dark .evo-theme-toggle:hover,
html.dark .evo-theme-toggle:focus-visible {
    background: #2e3031 !important;
    border-color: color-mix(in srgb, var(--ta-primary, #0ea5e9) 42%, #424445) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), 0 0 0 4px var(--ta-primary-ring, rgba(14, 165, 233, 0.18)) !important;
}

/* Shared interaction states. This stylesheet is booted on every Evo shell,
   including layouts that do not load the larger application stylesheet. */
:root {
    --evo-disabled-control-opacity: 0.46;
    --evo-busy-control-opacity: 0.72;
}

:where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    [role="button"],
    a
):is(:disabled, .disabled, .is-disabled, [aria-disabled="true"]):not([aria-busy="true"]):not(.evo-button-busy):not(.is-loading) {
    box-shadow: none !important;
    cursor: not-allowed !important;
    filter: saturate(0.35) !important;
    opacity: var(--evo-disabled-control-opacity) !important;
    transform: none !important;
}

:where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    [role="button"],
    a
):is(.disabled, .is-disabled, [aria-disabled="true"]):not(:disabled) {
    pointer-events: none !important;
}

:where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"]
):is([aria-busy="true"], [data-evo-busy="1"], .evo-button-busy, .is-loading) {
    cursor: progress !important;
    filter: none !important;
    opacity: var(--evo-busy-control-opacity) !important;
    pointer-events: none !important;
}
