/* Hide default Blazor Server reconnect modal — custom UX in erp-reconnect.js */
#components-reconnect-modal,
.components-reconnect-modal,
#components-reconnect-failed,
#components-reconnect-rejected,
[id^="components-reconnect"],
[class*="components-reconnect"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    position: fixed !important;
    inset: auto !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

/* Non-blocking reconnect tip after silent window (~6s) */
#erp-reconnect-tip {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 10500;
    max-width: min(420px, calc(100vw - 24px));
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(28, 33, 40, 0.92);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 550;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#erp-reconnect-tip.is-visible {
    opacity: 1;
}

/* Compact failure — not fullscreen, does not dim the page */
#erp-reconnect-failed {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 10510;
    max-width: min(460px, calc(100vw - 24px));
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    color: #1c2128;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    display: none;
}

#erp-reconnect-failed.is-visible {
    display: block;
}

#erp-reconnect-failed p {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
}

#erp-reconnect-failed .erp-reconnect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#erp-reconnect-failed button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

#erp-reconnect-failed .erp-reconnect-reload {
    background: #2563eb;
    color: #fff;
}

a.erp-reconnect-disabled-link {
    pointer-events: none;
    opacity: 0.55;
}

/* While circuit is down, do not dim or block reading */
html.erp-circuit-down {
    /* intentionally empty — no fullscreen overlay / backdrop */
}
