/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* Sensa-style reconnect modal in Certa's teal palette. Plain <div> (not <dialog>) overlay so
   Blazor controls visibility purely via the standard `components-reconnect-*` classes — no
   custom JS handler, no <dialog>.showModal()/close() lifecycle. */

#components-reconnect-modal.ct-reconnect[b-czlvpqwx53] {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    /* Mix of brand-teal + dark slate for a tinted, branded dimmer (mirrors Sensa's approach,
       which mixes its hot accent into rgba(15,23,42,.55)). */
    background: color-mix(in srgb, var(--color-certa-500) 28%, rgba(15, 23, 42, 0.55));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Blazor applies one of these classes to the modal element when the circuit drops. The
   show / retrying classes both map to the "trying" state; paused / resume-failed both map
   to "rejected". */
#components-reconnect-modal.components-reconnect-show[b-czlvpqwx53],
#components-reconnect-modal.components-reconnect-retrying[b-czlvpqwx53],
#components-reconnect-modal.components-reconnect-failed[b-czlvpqwx53],
#components-reconnect-modal.components-reconnect-paused[b-czlvpqwx53],
#components-reconnect-modal.components-reconnect-resume-failed[b-czlvpqwx53] {
    display: flex !important;
}

.ct-reconnect-card[b-czlvpqwx53] {
    width: min(100%, 420px);
    background: #ffffff;
    border-radius: 8px;
    padding: 28px 28px 24px;
    box-shadow: 0 24px 48px rgba(20, 63, 68, 0.22),
                0 6px 16px rgba(20, 63, 68, 0.12);
    border-top: 3px solid var(--color-certa-500);
    text-align: center;
}

.ct-reconnect-state[b-czlvpqwx53] { display: none; }

#components-reconnect-modal.components-reconnect-show .ct-reconnect-state-trying[b-czlvpqwx53],
#components-reconnect-modal.components-reconnect-retrying .ct-reconnect-state-trying[b-czlvpqwx53] { display: block; }
#components-reconnect-modal.components-reconnect-failed .ct-reconnect-state-failed[b-czlvpqwx53] { display: block; }
#components-reconnect-modal.components-reconnect-paused .ct-reconnect-state-rejected[b-czlvpqwx53],
#components-reconnect-modal.components-reconnect-resume-failed .ct-reconnect-state-rejected[b-czlvpqwx53] { display: block; }

/* ── Trying-state spinner ─────────────────────────────────────────────── */

.ct-reconnect-spinner[b-czlvpqwx53] {
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
    border: 3px solid color-mix(in srgb, var(--color-certa-500) 18%, transparent);
    border-top-color: var(--color-certa-500);
    border-radius: 50%;
    animation: ct-reconnect-spin-b-czlvpqwx53 0.9s linear infinite;
}

@keyframes ct-reconnect-spin-b-czlvpqwx53 {
    to { transform: rotate(360deg); }
}

/* ── Typography ──────────────────────────────────────────────────────── */

.ct-reconnect-title[b-czlvpqwx53] {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.ct-reconnect-text[b-czlvpqwx53] {
    margin: 0;
    font-size: 0.92rem;
    color: #4b5563;
    line-height: 1.5;
}

/* ── Stacked button column ───────────────────────────────────────────── */

.ct-reconnect-actions[b-czlvpqwx53] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.ct-reconnect-button[b-czlvpqwx53] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ct-reconnect-button-primary[b-czlvpqwx53] {
    background: var(--color-certa-500);
    color: #ffffff;
}

.ct-reconnect-button-primary:hover[b-czlvpqwx53] {
    background: color-mix(in srgb, var(--color-certa-500) 88%, #000);
}

.ct-reconnect-button-quiet[b-czlvpqwx53] {
    background: transparent;
    color: var(--color-certa-500);
    border-color: color-mix(in srgb, var(--color-certa-500) 35%, transparent);
}

.ct-reconnect-button-quiet:hover[b-czlvpqwx53] {
    background: color-mix(in srgb, var(--color-certa-500) 6%, transparent);
}
