/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* Scoped to ReconnectModal.razor. Rules here carry the component's scope attribute, which
   outranks app.css — which is why the reconnect styles live here rather than there.
   Colour values are literal because custom properties do not cross the scope boundary
   reliably. */

#components-reconnect-modal[b-k8rtvmrs6r] {
    border: none;
    background: none;
    padding: 0;
    max-width: none;
    max-height: none;
    overflow: visible;
}

    #components-reconnect-modal[b-k8rtvmrs6r]::backdrop {
        background: rgba(20, 21, 28, 0.45);
    }

.reconnect-box[b-k8rtvmrs6r] {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 24px rgba(20, 21, 28, 0.3);
    padding: 32px;
    width: 340px;
    max-width: 90vw;
    text-align: center;
}

/* ---------------------------------------------------------------- states

   The module puts the state on the dialog: components-reconnect-show while connected
   attempts run, plus -retrying between attempts, and -failed or -rejected once it gives
   up. Every state block is hidden and the matching one revealed. */

.reconnect-state[b-k8rtvmrs6r],
.reconnect-action[b-k8rtvmrs6r] {
    display: none;
    margin: 0 0 16px;
}

/* An attempt is in flight. */
.components-reconnect-show .components-reconnect-first-attempt-visible[b-k8rtvmrs6r] {
    display: block;
}

/* Waiting between attempts — the countdown is live, so this supersedes the first-attempt
   copy. */
.components-reconnect-retrying .components-reconnect-first-attempt-visible[b-k8rtvmrs6r] {
    display: none;
}

.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-k8rtvmrs6r] {
    display: block;
}

.components-reconnect-failed .components-reconnect-failed-visible[b-k8rtvmrs6r],
.components-reconnect-rejected .components-reconnect-failed-visible[b-k8rtvmrs6r] {
    display: block;
}

.components-reconnect-paused .components-pause-visible[b-k8rtvmrs6r] {
    display: block;
}

.components-reconnect-resume-failed .components-resume-failed-visible[b-k8rtvmrs6r] {
    display: block;
}

/* Buttons follow their state. Reload is always available — someone who knows the
   connection is gone should not have to wait out the retries before they can act. */
.components-reconnect-failed #components-reconnect-button[b-k8rtvmrs6r],
.components-reconnect-rejected #components-reconnect-button[b-k8rtvmrs6r],
.components-reconnect-paused #components-resume-button[b-k8rtvmrs6r],
.components-reconnect-resume-failed #components-resume-button[b-k8rtvmrs6r],
.reconnect-reload[b-k8rtvmrs6r] {
    display: block;
    margin: 8px 0 0;
}

/* Nothing to show progress toward once it has given up. */
.components-reconnect-failed .reconnect-progress[b-k8rtvmrs6r],
.components-reconnect-rejected .reconnect-progress[b-k8rtvmrs6r],
.components-reconnect-paused .reconnect-progress[b-k8rtvmrs6r],
.components-reconnect-resume-failed .reconnect-progress[b-k8rtvmrs6r] {
    display: none;
}

/* ---------------------------------------------------------------- content */

.reconnect-title[b-k8rtvmrs6r] {
    display: block;
    font-family: 'Poppins', system-ui, 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.3;
    color: #14151C;
    margin-bottom: 8px;
}

.reconnect-body[b-k8rtvmrs6r] {
    display: block;
    font-size: 15px;
    line-height: 1.5;
    color: #4A4C5C;
}

#components-seconds-to-next-attempt[b-k8rtvmrs6r] {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #14151C;
}

/* ---------------------------------------------------------------- spinner

   The component ships two divs inside the animation element. The first becomes the ring;
   the second is hidden, since one is enough. */

.reconnect-spinner[b-k8rtvmrs6r] {
    width: 44px;
    height: 44px;
    margin: 0 auto 24px;
    position: relative;
}

    .reconnect-spinner div:first-child[b-k8rtvmrs6r] {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        /* A conic gradient rather than a bordered ring: the arc runs violet through to the
           track colour, which a border-top cannot express. */
        background: conic-gradient(from 0deg, #7C3AED 0deg, #7C3AED 70deg, #F0F0F3 90deg, #F0F0F3 360deg);
        animation: reconnect-spin-b-k8rtvmrs6r 0.9s linear infinite;
    }

        .reconnect-spinner div:first-child[b-k8rtvmrs6r]::after {
            content: "";
            position: absolute;
            inset: 5px;
            background: #fff;
            border-radius: 50%;
        }

    .reconnect-spinner div:last-child[b-k8rtvmrs6r] {
        display: none !important;
    }

@keyframes reconnect-spin-b-k8rtvmrs6r {
    to {
        transform: rotate(360deg);
    }
}

/* ---------------------------------------------------------------- progress */

.reconnect-progress[b-k8rtvmrs6r] {
    height: 4px;
    border-radius: 2px;
    background: #F0F0F3;
    overflow: hidden;
    margin-bottom: 16px;
}

/* Width is set from the countdown by reconnect.js — the module exposes seconds remaining,
   not an attempt number, so the bar tracks the wait rather than the attempts. */
.reconnect-progress-fill[b-k8rtvmrs6r] {
    height: 100%;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(135deg, #7C3AED, #0E7490);
    transition: width 0.9s linear;
}

/* ---------------------------------------------------------------- buttons */

.reconnect-action[b-k8rtvmrs6r] {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    font-family: 'Poppins', system-ui, 'Segoe UI', Arial, sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #14151C;
    background: #fff;
    border: 1px solid #E4E4E9;
    border-radius: 10px;
    cursor: pointer;
}

    .reconnect-action:hover[b-k8rtvmrs6r] {
        border-color: #7C3AED;
        color: #7C3AED;
    }

/* ---------------------------------------------------------------- the board's extra lines */

.reconnect-eyebrow[b-k8rtvmrs6r] {
    display: block;
    margin: -12px 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #6B6D7C;
}

/* Only between attempts, when there is a countdown to show. */
.reconnect-next[b-k8rtvmrs6r] {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: #6B6D7C;
}

.components-reconnect-retrying .reconnect-next[b-k8rtvmrs6r] {
    display: block;
}

#components-reconnect-current-attempt[b-k8rtvmrs6r],
#components-reconnect-max-retries[b-k8rtvmrs6r] {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #14151C;
}

/* Once it has given up or paused, the waiting line no longer applies. */
.components-reconnect-failed .reconnect-eyebrow[b-k8rtvmrs6r],
.components-reconnect-rejected .reconnect-eyebrow[b-k8rtvmrs6r],
.components-reconnect-paused .reconnect-eyebrow[b-k8rtvmrs6r],
.components-reconnect-resume-failed .reconnect-eyebrow[b-k8rtvmrs6r] {
    display: none;
}

/* The framework adds a state class without always taking components-reconnect-show off, so
   a given-up state hides the attempt copy and the spinner explicitly rather than relying on
   which other classes happen to be present. */
.components-reconnect-failed .components-reconnect-first-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-failed .components-reconnect-repeated-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-rejected .components-reconnect-first-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-rejected .components-reconnect-repeated-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-paused .components-reconnect-first-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-paused .components-reconnect-repeated-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-resume-failed .components-reconnect-first-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-resume-failed .components-reconnect-repeated-attempt-visible[b-k8rtvmrs6r],
.components-reconnect-failed .reconnect-spinner[b-k8rtvmrs6r],
.components-reconnect-rejected .reconnect-spinner[b-k8rtvmrs6r],
.components-reconnect-paused .reconnect-spinner[b-k8rtvmrs6r],
.components-reconnect-resume-failed .reconnect-spinner[b-k8rtvmrs6r] {
    display: none;
}
