/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* ============================================================
   Phase 22h.93 (2026-05-17) — Clients Portal shell CSS.
   ------------------------------------------------------------
   Replaces the Phase 15 / 22c blue-gradient top bar with the
   design's webapp layout: a max-width 540px content column
   centered on a soft gradient backdrop (desktop) and a fixed
   bottom-nav row at the page bottom on every viewport.

   The per-screen .tb (sticky white top bar) comes from
   InnerPageShell.razor — there is no global top bar anymore.
   ============================================================ */

html[b-vfmkpbgglk], body[b-vfmkpbgglk] {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: linear-gradient(180deg, #eef4f9 0%, #d8e6f1 100%);
}

.archer-clients-shell[b-vfmkpbgglk] {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* The 540px content column — design's "Keep the same layout for
   Webapp" rule. On mobile (< 600px) the column goes full-width
   with no surrounding gradient. */
.archer-page-column[b-vfmkpbgglk] {
    width: 100%;
    max-width: 540px;
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 24px rgba(15,23,42,0.08);
}

@media (max-width: 600px) {
    html[b-vfmkpbgglk], body[b-vfmkpbgglk] { background: var(--bg); }
    .archer-page-column[b-vfmkpbgglk] { box-shadow: none; }
}

.archer-page-content[b-vfmkpbgglk] {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--bg);
    /* Padding-bottom so content doesn't slip under the fixed bottom
       nav. The .bn itself is ~64px tall — 80 leaves a safe margin. */
    padding-bottom: 8px;
}

/* The .bn rules live in archer-tokens.css; here we only fix the
   bottom-nav to the column bottom so it scrolls with the column
   rather than the viewport (since the column is the scroll root). */
.archer-page-column > .bn[b-vfmkpbgglk] {
    position: sticky;
    bottom: 0;
    z-index: 50;
    background: var(--surface);
}

/* ────────── Inner-page shell helpers ───────────────────────── */
/* These provide the visual envelope around InnerPageShell pages
   so they render exactly like the design's per-screen layouts. */
[b-vfmkpbgglk] .archer-inner-shell {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
[b-vfmkpbgglk] .archer-inner-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}
[b-vfmkpbgglk] .archer-inner-back {
    background: transparent;
    border: 0;
    padding: 6px;
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
[b-vfmkpbgglk] .archer-inner-back:hover { background: var(--surface-2); }
[b-vfmkpbgglk] .archer-inner-title {
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
}
[b-vfmkpbgglk] .archer-inner-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
[b-vfmkpbgglk] .archer-inner-body {
    flex: 1;
    min-height: 0;
}

/* ────────── Blazor error UI (unchanged from legacy) ──────── */
#blazor-error-ui[b-vfmkpbgglk] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss[b-vfmkpbgglk] {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-dwzdbdwk0n],
.components-reconnect-repeated-attempt-visible[b-dwzdbdwk0n],
.components-reconnect-failed-visible[b-dwzdbdwk0n],
.components-pause-visible[b-dwzdbdwk0n],
.components-resume-failed-visible[b-dwzdbdwk0n],
.components-rejoining-animation[b-dwzdbdwk0n] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-retrying[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-failed[b-dwzdbdwk0n],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-dwzdbdwk0n] {
    display: block;
}


#components-reconnect-modal[b-dwzdbdwk0n] {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-dwzdbdwk0n 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-dwzdbdwk0n 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-dwzdbdwk0n 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-dwzdbdwk0n]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-dwzdbdwk0n 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-dwzdbdwk0n {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-dwzdbdwk0n {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-dwzdbdwk0n {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-dwzdbdwk0n] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-dwzdbdwk0n] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-dwzdbdwk0n] {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover[b-dwzdbdwk0n] {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active[b-dwzdbdwk0n] {
        background-color: #6b9ed2;
    }

.components-rejoining-animation[b-dwzdbdwk0n] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-dwzdbdwk0n] {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-dwzdbdwk0n 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-dwzdbdwk0n] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-dwzdbdwk0n {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
/* /Components/Shared/CascadingMenu.razor.rz.scp.css */
/* Phase 22h.79 (2026-05-16) — centered modal version of the cascade
   menu. Replaces the failed position:fixed flyout that kept getting
   crushed by parent containing-block constraints in the Comms
   composer / column-header context.

   The modal is anchored to the viewport via fixed positioning at
   top-left and a transform-based centering. Items are stacked
   vertically; sub-menus reveal on hover via the rules in
   CascadingMenuNode.razor.css. */

.archer-cascading-backdrop[b-luum3w1grv] {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1060;
}

.archer-cascading-modal[b-luum3w1grv] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, 92vw);
    max-height: 78vh;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    z-index: 1061;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.archer-cascading-modal-header[b-luum3w1grv] {
    padding: 0.6rem 0.85rem;
    background: #f4f6f9;
    border-bottom: 2px solid #20c0a0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.archer-cascading-modal-body[b-luum3w1grv] {
    padding: 0.4rem 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
}
/* /Components/Shared/CascadingMenuNode.razor.rz.scp.css */
/* Phase 22h.79 (2026-05-16) — node-level styling for the modal-form
   cascade. Items render as full-width rows; children of a branch
   item appear indented immediately below the parent on hover, and
   collapse when the cursor leaves the parent + its children area.

   Phase 22h.79b — visual hierarchy: each nesting level gets:
     * its own subtle gradient background
     * a colored left-border accent (matches the legacy app
       where each tier had a distinct hue)
     * progressively deeper indent
   so staff can tell at a glance where they are in the tree. */

.archer-cascading-item[b-suvb2i6wnw] {
    user-select: none;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #2c3e50;
    font-size: 0.92rem;
    border-left: 4px solid transparent;
    transition: background-color 0.12s ease, padding-left 0.12s ease;
}
.archer-cascading-item.has-children[b-suvb2i6wnw] {
    font-weight: 600;
    cursor: default;
}
.archer-cascading-item:hover[b-suvb2i6wnw] {
    background-color: #d8f3ee;
}
.archer-cascading-label[b-suvb2i6wnw] {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}
.archer-cascading-arrow[b-suvb2i6wnw] {
    color: #20c0a0;
    margin-left: 12px;
    font-size: 0.78rem;
    flex: 0 0 auto;
    transition: transform 0.12s ease;
}
.archer-cascading-item.has-children:hover .archer-cascading-arrow[b-suvb2i6wnw] {
    transform: rotate(180deg);
}

/* Children block: hidden until parent (or itself) is hovered. */
.archer-cascading-item.has-children + .archer-cascading-children[b-suvb2i6wnw] {
    display: none;
}
.archer-cascading-item.has-children:hover + .archer-cascading-children[b-suvb2i6wnw],
.archer-cascading-item.has-children + .archer-cascading-children:hover[b-suvb2i6wnw] {
    display: block;
}

/* ─── Level palette ────────────────────────────────────────────
   Level 0 = root (Email / Message / Letter / etc.) — teal accent.
   Level 1 = stage (Onboarding / Preparing / etc.)   — blue accent.
   Level 2 = leaf title (specific template)          — green accent.
   Level 3+ = deeper nesting (rare)                  — amber accent.
   Each level also gets a subtle gradient that gets slightly
   greyer as we go deeper. */

.archer-cascading-item[data-level="0"][b-suvb2i6wnw] {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
    border-left-color: #20c0a0;        /* teal */
    color: #16725f;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.archer-cascading-item[data-level="1"][b-suvb2i6wnw] {
    background: linear-gradient(180deg, #f4f8fc 0%, #e9eff6 100%);
    border-left-color: #1a73e8;        /* blue */
    color: #144b8a;
    padding-left: 32px;
    font-weight: 600;
}

.archer-cascading-item[data-level="2"][b-suvb2i6wnw] {
    background: linear-gradient(180deg, #eef7f0 0%, #e2f0e6 100%);
    border-left-color: #5cb85c;        /* green */
    color: #2c3e50;
    padding-left: 56px;
    font-weight: 500;
}

.archer-cascading-item[data-level="3"][b-suvb2i6wnw] {
    background: linear-gradient(180deg, #fdf6e3 0%, #f7eccb 100%);
    border-left-color: #f0ad4e;        /* amber */
    color: #2c3e50;
    padding-left: 80px;
}

.archer-cascading-item[data-level="4"][b-suvb2i6wnw] {
    background: linear-gradient(180deg, #fbeaea 0%, #f4d8d8 100%);
    border-left-color: #d9534f;        /* red */
    color: #2c3e50;
    padding-left: 104px;
}

/* Hover override per level — slightly stronger highlight. */
.archer-cascading-item[data-level="0"]:hover[b-suvb2i6wnw] { background: linear-gradient(180deg, #d8f3ee 0%, #b9e6db 100%); }
.archer-cascading-item[data-level="1"]:hover[b-suvb2i6wnw] { background: linear-gradient(180deg, #d4e6f7 0%, #b8d4ec 100%); }
.archer-cascading-item[data-level="2"]:hover[b-suvb2i6wnw] { background: linear-gradient(180deg, #d4ebd8 0%, #b6dcbe 100%); }
.archer-cascading-item[data-level="3"]:hover[b-suvb2i6wnw] { background: linear-gradient(180deg, #fbedb6 0%, #f3dd8a 100%); }
.archer-cascading-item[data-level="4"]:hover[b-suvb2i6wnw] { background: linear-gradient(180deg, #f3c5c5 0%, #e9a4a4 100%); }
