


#components-reconnect-modal {
    display: none;
}

    /* Reconnecting - delay display by 4s so brief drops don't flash */
    #components-reconnect-modal.components-reconnect-show,
    #components-reconnect-modal.components-reconnect-failed,
    #components-reconnect-modal.components-reconnect-rejected {
    display: block !important;
    position: fixed;
    width: min(380px, calc(100vw - 32px));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-surface, #16181B);
    color: var(--text-secondary, #B9BFC6);
    border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.15));
    border-radius: 12px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10001;
}

    #components-reconnect-modal.components-reconnect-show {
    opacity: 0;
    animation: fadeInModal 0.3s ease-in 4s forwards;
}

    /* Terminal failure states - show immediately */
    #components-reconnect-modal.components-reconnect-failed,
    #components-reconnect-modal.components-reconnect-rejected {
    opacity: 1 !important;
}

.ml-reconnect-body { padding: 1.5rem 1.5rem 1.75rem; }
.ml-reconnect-state { display: none; }
#components-reconnect-modal.components-reconnect-show .ml-reconnect-show,
#components-reconnect-modal.components-reconnect-failed .ml-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected .ml-reconnect-rejected { display: block; }

#components-reconnect-modal h2 { color: var(--text-primary, #fff); font-size: 1.25rem; margin: 0 0 0.5rem; }
#components-reconnect-modal p { margin: 0 0 1.25rem; font-size: 1rem; }

.ml-reconnect-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-bottom: 0.75rem;
    border: 3px solid var(--border-strong, rgba(255, 255, 255, 0.25));
    border-top-color: var(--accent, #FF5432);
    border-radius: 50%;
    animation: mlReconnectSpin 0.9s linear infinite;
}
@keyframes mlReconnectSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ml-reconnect-spinner { animation-duration: 3s; } }

.ml-reconnect-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.ml-reconnect-retry {
    background: transparent;
    color: var(--text-primary, #fff);
    border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.3));
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}
.ml-reconnect-retry:hover { border-color: var(--accent, #FF5432); }
.ml-reconnect-actions button:focus-visible { outline: 2px solid var(--accent, #FF5432); outline-offset: 2px; }

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reload-btn {
    background-color: var(--accent, #FF5432);
    color: var(--ml-cta-text, #fff);
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s;
}
    .reload-btn:hover { background-color: var(--accent-hover, #ff6a4d); }

/* iOS zooms the page when a <16px field is focused; pinch-zoom is now allowed, so stop the auto-zoom. */
@media (max-width: 767px) {
    input, select, textarea,
    .e-input, .e-input-group input.e-input, .e-input-group.e-control-wrapper input.e-input,
    .e-float-input input, .e-float-input textarea,
    .e-otp-input input, input.e-otp-input, .e-otp-input .e-input {
        font-size: 16px !important;
    }
}

.custom-appbar-connection {
    background-color: var(--bg-surface) !important;
    border-radius: 10px 10px 0 0;
    min-height: 60px;
    align-content: center;
    padding: 0 15px;
}

.appbar-wordmark-connection {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text-primary, #FFFFFF);
}
