/* ─────────────────────────────────────────────────────────────────────────
   Blazor reconnect overlay — MCA look (maroon + gold).
   Blazor toggles these classes on #components-reconnect-modal:
     components-reconnect-show      → reconnecting
     components-reconnect-failed    → gave up (network)
     components-reconnect-rejected  → server lost the session (e.g. after an update)
   ───────────────────────────────────────────────────────────────────────── */
#components-reconnect-modal {
    display: none;
    position: fixed; inset: 0; z-index: 20000;
    background: rgba(40, 8, 9, .55);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
    padding: 16px;
    font-family: inherit;
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected { display: flex; }

#components-reconnect-modal .rc-card {
    width: 100%; max-width: 420px;
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    text-align: center;
    animation: rc-pop .25s ease-out;
}
@keyframes rc-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#components-reconnect-modal .rc-head {
    background: linear-gradient(135deg, #7b1113 0%, #5a0c0e 100%);
    border-bottom: 4px solid #c9a227;
    padding: 22px 16px 18px; color: #fff;
}
#components-reconnect-modal .rc-logo {
    width: 64px; height: 64px; border-radius: 50%;
    background: #fff; padding: 4px; box-shadow: 0 0 0 3px rgba(201,162,39,.6);
}
#components-reconnect-modal .rc-school { margin-top: 8px; font-weight: 700; letter-spacing: .5px; font-size: 15px; }
#components-reconnect-modal .rc-app { font-size: 12px; opacity: .8; }

#components-reconnect-modal .rc-body { padding: 22px 24px 24px; color: #333; }
#components-reconnect-modal .rc-title { font-size: 18px; font-weight: 700; color: #7b1113; margin: 10px 0 6px; }
#components-reconnect-modal .rc-text { font-size: 14px; color: #555; margin: 0 0 4px; line-height: 1.45; }
#components-reconnect-modal .rc-small { font-size: 12px; color: #888; margin-top: 8px; }

/* one block per state — only the matching one shows */
#components-reconnect-modal .rc-state { display: none; }
#components-reconnect-modal.components-reconnect-show     .rc-show     { display: block; }
#components-reconnect-modal.components-reconnect-failed   .rc-failed   { display: block; }
#components-reconnect-modal.components-reconnect-rejected .rc-rejected { display: block; }

/* spinner ring */
#components-reconnect-modal .rc-spinner {
    width: 54px; height: 54px; margin: 4px auto 0; border-radius: 50%;
    border: 5px solid #f1e3e3; border-top-color: #7b1113; border-right-color: #c9a227;
    animation: rc-spin 1s linear infinite;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }

#components-reconnect-modal .rc-icon {
    width: 54px; height: 54px; margin: 4px auto 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
}
#components-reconnect-modal .rc-icon.warn  { background: #fff4d6; }
#components-reconnect-modal .rc-icon.info  { background: #e8f1fb; }

#components-reconnect-modal .rc-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
#components-reconnect-modal .rc-btn {
    border: 0; border-radius: 8px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
#components-reconnect-modal .rc-btn-primary { background: #7b1113; color: #fff; }
#components-reconnect-modal .rc-btn-primary:hover { background: #5a0c0e; }
#components-reconnect-modal .rc-btn-light { background: #f3eded; color: #7b1113; }
#components-reconnect-modal .rc-btn-light:hover { background: #e8dcdc; }

#components-reconnect-modal .rc-dots::after { content: ""; animation: rc-dots 1.5s steps(4, end) infinite; }
@keyframes rc-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

@media (prefers-reduced-motion: reduce) {
    #components-reconnect-modal .rc-spinner, #components-reconnect-modal .rc-card { animation: none; }
}
