/* The circuit notice (circuit-recovery.js): a small bar at the foot of the page, never a blocking overlay.
   Colours come from the app's design tokens, with fallbacks for a page that has none. */
.ef-circuit {
    position: fixed;
    left: 50%;
    bottom: var(--ef-space-16, 16px);
    transform: translateX(-50%);
    z-index: 2147483000;
    max-width: calc(100vw - 2 * var(--ef-space-16, 16px));
    font-family: var(--ef-font, Inter, system-ui, -apple-system, "Segoe UI", sans-serif);
    font-size: var(--ef-text-13, 13px);
    line-height: 1.4;
}

/* Hidden but still in the accessibility tree, so the status region is already present when its text arrives. */
.ef-circuit[data-state="hidden"] {
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.ef-circuit-box {
    display: flex;
    align-items: center;
    gap: var(--ef-space-12, 12px);
    padding: var(--ef-space-8, 8px) var(--ef-space-16, 16px);
    background: var(--ef-surface, #ffffff);
    color: var(--ef-text, #1f2937);
    border: 1px solid var(--ef-border, #d1d5db);
    border-radius: var(--ef-radius-6, 6px);
    box-shadow: var(--ef-shadow-2, 0 4px 12px rgba(15, 23, 42, 0.15));
}

.ef-circuit[data-state="hidden"] .ef-circuit-box {
    padding: 0;
    border: 0;
    box-shadow: none;
}

.ef-circuit[data-state="lost"] .ef-circuit-box {
    border-color: var(--ef-red, #dc2626);
}

.ef-circuit-status,
.ef-circuit-alert {
    margin: 0;
}

.ef-circuit-alert:empty {
    display: none;
}

.ef-circuit-reload {
    flex: none;
    min-height: 32px;
    padding: 0 var(--ef-space-12, 12px);
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: var(--ef-color-primary, #2563eb);
    border: 1px solid transparent;
    border-radius: var(--ef-radius-4, 4px);
    cursor: pointer;
}

.ef-circuit-reload:hover {
    background: var(--ef-color-primary-hover, #1d4ed8);
}

.ef-circuit-reload:focus-visible {
    outline: 2px solid var(--ef-color-focus, #2563eb);
    outline-offset: 2px;
}

.ef-circuit-reload[hidden] {
    display: none;
}
