/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* Global layout styles live in app.css */
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* Global styles in app.css drive the navbar */
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
/* ---- state visibility (classes toggled by Blazor on the dialog) ---- */
.components-reconnect-first-attempt-visible[b-ejuy3hhu02],
.components-reconnect-repeated-attempt-visible[b-ejuy3hhu02],
.components-reconnect-failed-visible[b-ejuy3hhu02],
.components-pause-visible[b-ejuy3hhu02],
.components-resume-failed-visible[b-ejuy3hhu02],
.components-rejoining-animation[b-ejuy3hhu02],
.mt-rc-status-connecting[b-ejuy3hhu02],
.mt-rc-status-offline[b-ejuy3hhu02],
.mt-rc-status-failed[b-ejuy3hhu02],
.mt-rc-status-paused[b-ejuy3hhu02] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-show .mt-rc-status-connecting[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-retrying .mt-rc-status-connecting[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-failed .mt-rc-status-failed[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-paused .mt-rc-status-paused[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-resume-failed .mt-rc-status-failed[b-ejuy3hhu02] {
    display: inline;
}
#components-reconnect-modal .mt-rc-actions button.components-reconnect-failed-visible[b-ejuy3hhu02],
#components-reconnect-modal .mt-rc-actions button.components-reconnect-repeated-attempt-visible[b-ejuy3hhu02],
#components-reconnect-modal .mt-rc-actions button.components-pause-visible[b-ejuy3hhu02],
#components-reconnect-modal .mt-rc-actions button.components-resume-failed-visible[b-ejuy3hhu02] { display: none; }
#components-reconnect-modal.components-reconnect-retrying .mt-rc-actions button.components-reconnect-repeated-attempt-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-failed .mt-rc-actions button.components-reconnect-failed-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-paused .mt-rc-actions button.components-pause-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-resume-failed .mt-rc-actions button.components-resume-failed-visible[b-ejuy3hhu02] { display: inline-flex; }
#components-reconnect-modal.components-reconnect-show .mt-rc-progress[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-retrying .mt-rc-progress[b-ejuy3hhu02] { display: block; }

/* Blazor keeps -show on while adding -retrying, so the first-attempt copy must yield */
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-first-attempt-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-first-attempt-visible[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-repeated-attempt-visible[b-ejuy3hhu02] { display: none; }

/* offline overrides the status pill text; set by the module script */
#components-reconnect-modal.is-offline .mt-rc-status-connecting[b-ejuy3hhu02],
#components-reconnect-modal.is-offline .mt-rc-status-failed[b-ejuy3hhu02] { display: none; }
#components-reconnect-modal.is-offline .mt-rc-status-offline[b-ejuy3hhu02] { display: inline; }

/* ---- the dialog ---- */
#components-reconnect-modal[b-ejuy3hhu02] {
    --rc-navy: #0B2A6F;
    --rc-gold: #F3B72B;
    --rc-ink: #0E1410;
    --rc-muted: #5A6464;
    width: min(420px, calc(100vw - 2rem));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent !important; /* MudBlazor forces a background on this id */
    color: var(--rc-ink);
    font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1), display .35s allow-discrete, overlay .35s allow-discrete;
}
#components-reconnect-modal[open][b-ejuy3hhu02] { opacity: 1; transform: none; }
@starting-style {
    #components-reconnect-modal[open][b-ejuy3hhu02] { opacity: 0; transform: translateY(16px) scale(0.97); }
}
#components-reconnect-modal[b-ejuy3hhu02]::backdrop {
    background:
        radial-gradient(ellipse 60% 50% at 50% 30%, rgba(11, 42, 111, 0.35), transparent 70%),
        rgba(7, 10, 14, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}
#components-reconnect-modal:focus[b-ejuy3hhu02] { outline: none; }

.mt-rc-card[b-ejuy3hhu02] {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 2.25rem 1.75rem 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 0 0 1px rgba(14, 20, 16, 0.06),
        0 40px 90px -30px rgba(11, 42, 111, 0.55);
    overflow: hidden;
}
.mt-rc-card[b-ejuy3hhu02]::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--rc-navy), var(--rc-gold));
}

/* mark with pulsing rings */
.mt-rc-mark[b-ejuy3hhu02] { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.mt-rc-tile[b-ejuy3hhu02] {
    position: relative;
    z-index: 1;
    width: 64px; height: 64px;
    border-radius: 20px;
    background: var(--rc-navy);
    display: grid; place-items: center;
    box-shadow: 0 14px 30px -12px rgba(11, 42, 111, 0.7);
}
.mt-rc-tile[b-ejuy3hhu02] { overflow: hidden; }
.mt-rc-tile img[b-ejuy3hhu02] { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.mt-rc-ring[b-ejuy3hhu02] {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(11, 42, 111, 0.35);
    animation: mt-rc-ring-b-ejuy3hhu02 1.8s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.mt-rc-ring:nth-child(2)[b-ejuy3hhu02] { animation-delay: -0.9s; }
@keyframes mt-rc-ring-b-ejuy3hhu02 {
    0% { transform: scale(0.55); opacity: 0; }
    15% { opacity: 0.9; }
    100% { transform: scale(1.25); opacity: 0; }
}
#components-reconnect-modal.components-reconnect-failed .mt-rc-ring[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-resume-failed .mt-rc-ring[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-paused .mt-rc-ring[b-ejuy3hhu02] { animation-play-state: paused; opacity: 0; }

/* brand wordmark */
.mt-rc-brand[b-ejuy3hhu02] {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: -0.35rem;
    padding: 0.25rem 0.75rem 0.25rem 0.4rem;
    border-radius: 999px;
    background: rgba(11, 42, 111, 0.06);
    direction: ltr;
}
.mt-rc-brand img[b-ejuy3hhu02] { width: 22px; height: 22px; border-radius: 6px; }
.mt-rc-brand-name[b-ejuy3hhu02] { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em; color: var(--rc-navy); }
.mt-rc-brand-name b[b-ejuy3hhu02] { color: #C48A12; font-weight: 700; }
.mt-rc-brand-ar[b-ejuy3hhu02] { font-size: 0.8rem; font-weight: 600; color: var(--rc-muted); border-inline-start: 1px solid rgba(14, 20, 16, 0.14); padding-inline-start: 0.45rem; }

/* status pill */
.mt-rc-status[b-ejuy3hhu02] {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: #EAF2EE;
    color: #0F4C3A;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.mt-rc-dot[b-ejuy3hhu02] { width: 8px; height: 8px; border-radius: 50%; background: #1B7A5C; box-shadow: 0 0 0 0 rgba(27, 122, 92, 0.6); animation: mt-rc-pulse-b-ejuy3hhu02 1.6s ease-out infinite; }
@keyframes mt-rc-pulse-b-ejuy3hhu02 { 0% { box-shadow: 0 0 0 0 rgba(27, 122, 92, 0.6); } 100% { box-shadow: 0 0 0 9px rgba(27, 122, 92, 0); } }
#components-reconnect-modal.components-reconnect-failed .mt-rc-status[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-resume-failed .mt-rc-status[b-ejuy3hhu02],
#components-reconnect-modal.is-offline .mt-rc-status[b-ejuy3hhu02] { background: #FBEAE6; color: #B8542C; }
#components-reconnect-modal.components-reconnect-failed .mt-rc-dot[b-ejuy3hhu02],
#components-reconnect-modal.components-reconnect-resume-failed .mt-rc-dot[b-ejuy3hhu02],
#components-reconnect-modal.is-offline .mt-rc-dot[b-ejuy3hhu02] { background: #E07556; animation: none; }
#components-reconnect-modal.components-reconnect-paused .mt-rc-status[b-ejuy3hhu02] { background: #FAF1DE; color: #9A6716; }
#components-reconnect-modal.components-reconnect-paused .mt-rc-dot[b-ejuy3hhu02] { background: #C9892C; animation: none; }

.mt-rc-title[b-ejuy3hhu02] { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.25; color: var(--rc-ink); }
.mt-rc-text[b-ejuy3hhu02] { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--rc-muted); max-width: 32ch; }
.mt-rc-text strong[b-ejuy3hhu02] { color: var(--rc-ink); font-variant-numeric: tabular-nums; }

/* indeterminate progress */
.mt-rc-progress[b-ejuy3hhu02] {
    width: 100%;
    height: 6px;
    margin-top: 0.25rem;
    border-radius: 999px;
    background: rgba(11, 42, 111, 0.1);
    overflow: hidden;
}
.mt-rc-progress i[b-ejuy3hhu02] {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rc-navy), #1B7A5C, var(--rc-gold));
    animation: mt-rc-slide-b-ejuy3hhu02 1.4s ease-in-out infinite;
}
@keyframes mt-rc-slide-b-ejuy3hhu02 { 0% { transform: translateX(-120%); } 100% { transform: translateX(300%); } }
[dir="rtl"] .mt-rc-progress i[b-ejuy3hhu02] { animation-name: mt-rc-slide-rtl-b-ejuy3hhu02; }
@keyframes mt-rc-slide-rtl-b-ejuy3hhu02 { 0% { transform: translateX(120%); } 100% { transform: translateX(-300%); } }

/* actions (selectors carry the id to beat MudBlazor's own #components-reconnect-modal button rules) */
.mt-rc-actions[b-ejuy3hhu02] { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.35rem; }
#components-reconnect-modal .mt-rc-actions .mt-rc-btn[b-ejuy3hhu02] {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    min-width: 0;
    padding: 0 1.2rem;
    border-radius: 999px;
}
#components-reconnect-modal .mt-rc-actions .mt-rc-btn-primary[b-ejuy3hhu02] { color: #fff; }
#components-reconnect-modal .mt-rc-actions .mt-rc-btn-ghost[b-ejuy3hhu02] { color: var(--rc-ink); }
.mt-rc-btn[b-ejuy3hhu02] {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0 1.2rem;
    border-radius: 999px;
    font: 600 0.92rem/1 inherit;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.mt-rc-btn svg[b-ejuy3hhu02] { width: 18px; height: 18px; fill: currentColor; }
[dir="rtl"] .mt-rc-btn svg[b-ejuy3hhu02] { transform: scaleX(-1); }
.mt-rc-btn-primary[b-ejuy3hhu02] { border: 0; background: var(--rc-navy); color: #fff; box-shadow: 0 12px 24px -12px rgba(11, 42, 111, 0.8); }
.mt-rc-btn-primary:hover[b-ejuy3hhu02] { transform: translateY(-1px); background: #0F3A8F; }
.mt-rc-btn-primary:active[b-ejuy3hhu02] { transform: translateY(0); }
.mt-rc-btn-primary[disabled][b-ejuy3hhu02] { opacity: 0.6; cursor: progress; transform: none; }
.mt-rc-btn-ghost[b-ejuy3hhu02] { background: #fff; color: var(--rc-ink); border: 1px solid rgba(14, 20, 16, 0.14); }
.mt-rc-btn-ghost:hover[b-ejuy3hhu02] { border-color: var(--rc-ink); }
.mt-rc-btn:focus-visible[b-ejuy3hhu02] { outline: 2px solid var(--rc-gold); outline-offset: 2px; }

.mt-rc-foot[b-ejuy3hhu02] { margin: 0.3rem 0 0; font-size: 0.74rem; color: #8A8A82; }

@media (prefers-reduced-motion: reduce) {
    #components-reconnect-modal[b-ejuy3hhu02], .mt-rc-ring[b-ejuy3hhu02], .mt-rc-dot[b-ejuy3hhu02], .mt-rc-progress i[b-ejuy3hhu02] { animation: none !important; transition: none !important; }
}
