/* Reset visibility - hide everything by default */
.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

    /* Show based on Blazor state classes */
    #components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
    #components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
    #components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
    #components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,
    #components-reconnect-modal.components-pause .components-pause-visible,
    #components-reconnect-modal.components-resume-failed .components-resume-failed-visible {
        display: block;
    }

/* Glassmorphism container - premium finance feel */
#components-reconnect-modal {
    background: rgba(11, 3, 15, 0.45); /* semi-transparent dark purple-black */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0px solid rgba(96, 230, 110, 0.25); /* subtle neon green border */
    border-radius: 0px;
    box-shadow: 1px 8px 32px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(96, 230, 110, 0.08); /* faint inner glow */
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    color: #f0f0f5;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 15px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

    #components-reconnect-modal:focus,
    #components-reconnect-modal *:focus-visible {
        outline: 0px solid rgba(96, 230, 110, 0.6);
    }

    /* When open: smooth reveal */
    #components-reconnect-modal[open] {
        opacity: 1;
        transform: translateY(0) scale(1);
        animation: modalReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }

@keyframes modalReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Backdrop - deeper for premium immersion */
#components-reconnect-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

/* Your GIF - centered & slightly scaled for elegance */
.components-rejoining-animation {
    display: block;
    margin: 0 auto 1.75rem;
}

/* Premium gradient button - used for Retry & Resume */
.premium-btn {
    margin-top: 1.25rem;
    width: 100%;
    height: 48px;
    font-family: 'Space Grotesk';
    font-size: 16px;
    font-weight: 400;
    color: white;
    background: linear-gradient(0deg, #B524FF 0%, #B524FF 54.81%, #D788FF 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Text refinements for finance trust */
.components-reconnect-container p {
    margin: 0.75rem 0 1.25rem;
    line-height: 1.45;
}

.components-reconnect-container {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Optional subtle glow on text during show state */
#components-reconnect-modal.components-reconnect-show p:first-of-type {
    text-shadow: 0 0 10px rgba(96, 230, 110, 0.4);
}

dialog:-internal-dialog-in-top-layer {
    position: fixed;
    inset-block-start: 0px;
    inset-block-end: 0px;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    user-select: text;
    visibility: visible;
    overflow: auto;
}

dialog {
    position: fixed;
    inset-block-start: 0px;
    inset-block-end: 0px;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    user-select: text;
    visibility: visible;
    overflow: auto;
}