/*
 * Used with Blazor's <FocusOnNavigate /> to focus a predictable element
 * without showing a visible focus ring on first render/navigation.
 */

[data-focus-on-navigate]:focus,
[data-focus-on-navigate]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Blazor Reconnection Modal */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Hide when using class-based control */
#components-reconnect-modal.components-reconnect-hide {
    display: none !important;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

#components-reconnect-modal .show,
#components-reconnect-modal .failed,
#components-reconnect-modal .rejected {
    display: none;
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    max-width: 90vw;
}

#components-reconnect-modal.components-reconnect-show .show { display: block; }
#components-reconnect-modal.components-reconnect-failed .failed { display: block; }
#components-reconnect-modal.components-reconnect-rejected .rejected { display: block; }

.reconnect-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #059669; /* emerald-600 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

