/* /Components/Dialogs/ChatBot/ChatBotDialog.razor.rz.scp.css */
.chat-messages[b-wznufv01cp] {
    scroll-behavior: smooth;
}
/* /Components/Dialogs/ChatBot/ChatMessage.razor.rz.scp.css */
/* .chat-message-user and .chat-message-assistant relocated to wwwroot/app.css (classes on <MudPaper>; scoped rules never applied). */
/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* NOTE: the AppBar light-mode text fix lives in the GLOBAL app.css, not here.
   A scoped ::deep rule can't anchor over the AppBar's DOM because MainLayout's
   markup root is the <MudLayout> component (no scoped HTML element to attach
   [b-xxx] to). See app.css "AppBar is always dark" block.

   .mud-main-content padding-top rule DELETED — redundant with <MudMainContent Class="pt-16"> on line 81.
   #blazor-error-ui block DELETED — element is not rendered in this app (App.razor body is <Routes/> + <ReconnectModal/> only).
   .mud-drawer and .mud-drawer-content rules RELOCATED to wwwroot/app.css (classes on Mud components; scoped ::deep rules never applied). */
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* NOTE: these scoped ::deep rules never applied — NavMenu's markup root is the
   <MudNavMenu> component, so the [b-xxx] scope can't anchor over the rendered
   nav-link DOM. (They were also latently buggy: --cwe-text-secondary is dark in
   light mode, which would be dark-on-dark on the always-dark drawer.) The hover/
   active styling now lives in the GLOBAL app.css (.mud-drawer .mud-nav-link…),
   and resting nav text comes from MudBlazor's mode-invariant drawer-text palette. */
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-fgv6qcikzx],
.components-reconnect-repeated-attempt-visible[b-fgv6qcikzx],
.components-reconnect-failed-visible[b-fgv6qcikzx],
.components-pause-visible[b-fgv6qcikzx],
.components-resume-failed-visible[b-fgv6qcikzx],
.components-rejoining-animation[b-fgv6qcikzx] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-retrying[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-failed[b-fgv6qcikzx],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-fgv6qcikzx] {
    display: block;
}


#components-reconnect-modal[b-fgv6qcikzx] {
    background-color: var(--cwe-bg-surface);
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    color: var(--cwe-text-primary);
    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-fgv6qcikzx 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-fgv6qcikzx 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-fgv6qcikzx 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-fgv6qcikzx]::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    animation: components-reconnect-modal-fadeInOpacity-b-fgv6qcikzx 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-fgv6qcikzx {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-fgv6qcikzx {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-fgv6qcikzx {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-fgv6qcikzx] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-fgv6qcikzx] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-fgv6qcikzx] {
    border: 0;
    background-color: var(--cwe-accent);
    color: var(--cwe-bg-primary);
    padding: 4px 24px;
    border-radius: var(--radius-sm);
}

    #components-reconnect-modal button:hover[b-fgv6qcikzx] {
        background-color: var(--cwe-accent-bright);
    }

    #components-reconnect-modal button:active[b-fgv6qcikzx] {
        background-color: var(--cwe-accent-dim);
    }

.components-rejoining-animation[b-fgv6qcikzx] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-fgv6qcikzx] {
        position: absolute;
        border: 3px solid var(--cwe-accent);
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-fgv6qcikzx 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-fgv6qcikzx] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-fgv6qcikzx {
    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/ModelBuilder/HullDigitiser/HullDigitiser.razor.rz.scp.css */
/* ===================================================================
   Hull Digitiser — Step Indicator
   ================================================================ */

.hull-stepper[b-6ctvgi6036] {
    display: flex;
    align-items: flex-start;
    max-width: 420px;
}

.hull-step[b-6ctvgi6036] {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hull-step-line[b-6ctvgi6036] {
    flex: 1;
    height: 2px;
    background: var(--mud-palette-lines-default);
    margin-top: 13px; /* vertically centre on the 28px circle */
    align-self: stretch;
    min-width: 32px;
    transition: background 0.25s ease;
}

.hull-step-line.completed[b-6ctvgi6036] {
    background: var(--mud-palette-success);
}

.hull-step-circle[b-6ctvgi6036] {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-disabled);
    background: var(--mud-palette-surface);
    transition: all 0.25s ease;
}

.hull-step.active .hull-step-circle[b-6ctvgi6036] {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(229, 114, 0, 0.15);
}

.hull-step.completed .hull-step-circle[b-6ctvgi6036] {
    border-color: var(--mud-palette-success);
    background: var(--mud-palette-success);
    color: #fff;
}

.hull-step-label[b-6ctvgi6036] {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-disabled);
    text-align: center;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.hull-step.active .hull-step-label[b-6ctvgi6036] {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

.hull-step.completed .hull-step-label[b-6ctvgi6036] {
    color: var(--mud-palette-text-secondary);
}
/* /Components/ModelBuilder/HullDigitiser/Steps/UploadImageStep.razor.rz.scp.css */
.upload-dropzone[b-7ypznq5ge3] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 8px;
    cursor: pointer;
    min-height: 180px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-dropzone:hover[b-7ypznq5ge3] {
    border-color: var(--mud-palette-primary);
    background: rgba(229, 114, 0, 0.04);
}
/* /Components/ModelBuilder/ModelValidationEditor.razor.rz.scp.css */
/* ===================================================================
   ModelValidationEditor — Scoped Styles
   All rules except .validation-unit relocated to wwwroot/app.css
   (classes sat on Mud components; scoped rules never applied).
   ================================================================ */

/* --- Unit Suffix — on plain <span>, scoped rule works --- */
.validation-unit[b-x1x01m8yug] {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
    margin-left: 2px;
}
/* /Components/Pages/Analysis.razor.rz.scp.css */
/* === Analysis Entry Page Scoped Styles === */
/* .analysis-card rules relocated to wwwroot/app.css (class on <MudCard>; scoped rules never applied). */
/* ::deep .model-picker-container rule deleted (target class does not exist in markup). */

/* .analysis-type-icon is on a plain <div> — scoped rule works fine, kept here. */
.analysis-type-icon[b-cl2zhjjt5u] {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--mud-palette-surface);
    border-radius: var(--radius-md);
    padding: var(--nephos-space-md);
    height: 220px;
    transition: background-color var(--transition-med);
}

.analysis-type-icon img[b-cl2zhjjt5u] {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
/* /Components/Pages/Analysis/Code.razor.rz.scp.css */
/* All .code-option-card rules relocated to wwwroot/app.css (class sits on <MudPaper>; scoped rules never applied). */
/* /Components/Pages/History.razor.rz.scp.css */
[b-a4wysy3rp2] .history-table .mud-table-row {
    transition: background-color 0.15s ease-in-out;
}

[b-a4wysy3rp2] .history-table .mud-table-row.selected-row {
    background-color: var(--cwe-accent-glow) !important;
    border-left: 3px solid var(--mud-palette-primary);
}

[b-a4wysy3rp2] .history-table .mud-table-row.selected-row:hover {
    background-color: var(--cwe-accent-glow-strong) !important;
}

[b-a4wysy3rp2] .history-table .mud-table-row:hover:not(.selected-row) {
    background-color: var(--cwe-accent-glow) !important;
}

/* Desktop: shrink the Analysis ID column to its content (#524). `width: 1%` is the
   auto-layout idiom for "minimise this column" — the freed space flows to the wider
   Location/Project columns. Targets the data-label so it survives GroupBy header rows
   and the conditional admin Domain column, and is skipped under the mobile card layout. */
@media (min-width: 601px) {
    [b-a4wysy3rp2] .history-table td[data-label="Analysis ID"] {
        width: 1%;
        white-space: nowrap;
    }
}

/* Mobile: card-style table rows */
@media (max-width: 600px) {
    [b-a4wysy3rp2] .history-table .mud-table-head {
        display: none;
    }

    [b-a4wysy3rp2] .history-table .mud-table-body .mud-table-row {
        display: flex;
        flex-wrap: wrap;
        padding: 12px;
        border-bottom: 1px solid var(--cwe-border-subtle);
    }

    [b-a4wysy3rp2] .history-table .mud-table-body .mud-table-cell {
        border: none;
        padding: 2px 4px;
    }

    [b-a4wysy3rp2] .history-table .mud-table-body .mud-table-cell::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        opacity: 0.7;
        display: block;
    }
}

/* Simplify pagination on mobile */
@media (max-width: 600px) {
    [b-a4wysy3rp2] .history-table .mud-table-pagination .mud-select {
        display: none;
    }
}
/* /Components/Pages/ModelBuilder.razor.rz.scp.css */
/* ===================================================================
   ModelBuilder Scoped Styles
   ================================================================ */

/* --- Empty State --- */
.mb-empty-state[b-dujd0139mv] {
    text-align: center;
    padding: 64px 24px;
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    animation: pageEnter var(--transition-med) both;
}

.mb-empty-icon-badge[b-dujd0139mv] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--cwe-accent-glow);
}

/* --- Responsive --- */

/* Mobile: stacked layout */
@media (max-width: 600px) {
    .mb-empty-state[b-dujd0139mv] {
        padding: 32px 16px;
    }

    .mb-empty-icon-badge[b-dujd0139mv] {
        width: 72px;
        height: 72px;
    }
}
/* /Components/Shared/ActionBar.razor.rz.scp.css */
.action-bar--fixed[b-5qfecnt78p] {
    position: fixed;
    bottom: 0;
    /* Offset past the open nav drawer on desktop. 260px matches the drawer's effective width
       (verified visually). This is the original, proven-good desktop value — the offset below
       only releases it once the drawer collapses. */
    left: 260px;
    right: 0;
    z-index: 100;
    padding: 2px 16px;
    background: var(--mud-palette-background);
    border-top: 1px solid var(--cwe-border-subtle);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Drawer manually toggled closed on a wide screen → content is full-width → so is the bar. */
:global(.mud-drawer--closed) ~ .mud-main-content .action-bar--fixed[b-5qfecnt78p] {
    left: 0;
}

.action-bar-spacer[b-5qfecnt78p] {
    height: 52px;
}

/* #549: MudBlazor's Responsive drawer is HIDDEN below its Md breakpoint (960px); at that point the
   content's left margin drops to 0 but the drawer is still "open" (so the sibling rule above never
   fires). The original code only released the offset below 600px, leaving a 600–960px band where
   the bar kept its 260px offset over now-full-width content. Match the real breakpoint instead. */
@media (max-width: 959.98px) {
    .action-bar--fixed[b-5qfecnt78p] {
        left: 0;
    }
}

/* Phone ergonomics — unchanged from the original (≤600px only). */
@media (max-width: 600px) {
    .action-bar--fixed[b-5qfecnt78p] {
        padding: 2px 8px;
    }

    .action-bar--fixed :deep(.mud-button-root)[b-5qfecnt78p] {
        min-height: 44px;
    }
}
/* /Components/Shared/AnalysisStepIndicator.razor.rz.scp.css */
/* Query container wrapper — must be an ancestor so @container queries can target descendants */
.step-indicator-container[b-gsohwmlsme] {
    container-type: inline-size;
    width: 100%;
}

/* Step Indicator Nav */
.step-indicator[b-gsohwmlsme] {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
    background: var(--mud-palette-surface);
    border-radius: var(--cwe-radius-md);
    overflow-x: hidden;
}

/* Step Track */
.step-track[b-gsohwmlsme] {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Step Item */
.step-item[b-gsohwmlsme] {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Step Dot */
.step-dot[b-gsohwmlsme] {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all var(--transition-med);
    cursor: pointer;
    flex-shrink: 0;
}

/* Completed State */
.step-item.completed .step-dot[b-gsohwmlsme] {
    background: var(--cwe-accent);
    color: var(--cwe-bg-primary);
}

.step-item.completed .step-dot:hover[b-gsohwmlsme] {
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--cwe-accent-glow-strong);
}

/* Current State */
.step-item.current .step-dot[b-gsohwmlsme] {
    background: var(--cwe-accent);
    color: var(--cwe-bg-primary);
    animation: stepPulse-b-gsohwmlsme 2s ease-in-out infinite;
}

/* Upcoming State */
.step-item.upcoming .step-dot[b-gsohwmlsme] {
    background: var(--mud-palette-surface);
    border: 2px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

/* Visited State (WS-8 honest stepper): a step the user has opened but which is not asserted complete.
   Neutral accent-tinted dot showing the step number (NOT a green tick), distinct from "completed". */
.step-item.visited .step-dot[b-gsohwmlsme] {
    background: var(--cwe-accent-glow);
    border: 2px solid var(--cwe-accent);
    color: var(--cwe-accent);
}

.step-item.visited .step-dot:hover[b-gsohwmlsme] {
    transform: scale(1.1);
}

.step-item.visited .step-label[b-gsohwmlsme] {
    color: var(--mud-palette-text-primary);
}

.step-connector.visited .connector-fill[b-gsohwmlsme] {
    width: 100%;
    background: var(--cwe-accent-glow-strong);
}

/* Connector */
.step-connector[b-gsohwmlsme] {
    flex: 1;
    min-width: 32px;
    height: 3px;
    background: var(--mud-palette-lines-default);
    position: relative;
    margin: 0 4px;
    list-style: none;
}

.step-connector .connector-fill[b-gsohwmlsme] {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--cwe-accent), var(--cwe-accent-bright));
    transition: width var(--transition-slow);
    border-radius: 2px;
}

.step-connector.completed .connector-fill[b-gsohwmlsme] {
    width: 100%;
}

.step-connector.current .connector-fill[b-gsohwmlsme] {
    width: 50%;
    background: linear-gradient(90deg, var(--cwe-accent), transparent);
}

/* Labels */
.step-label[b-gsohwmlsme] {
    font-size: 0.7rem;
    margin-top: 6px;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.step-item.completed .step-label[b-gsohwmlsme] {
    color: var(--mud-palette-text-secondary);
}

.step-item.current .step-label[b-gsohwmlsme] {
    color: var(--cwe-accent);
    font-weight: 600;
}

.step-item.upcoming .step-label[b-gsohwmlsme] {
    color: var(--mud-palette-text-secondary);
}

/* Step Counter */
.step-counter[b-gsohwmlsme] {
    text-align: center;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Error/Warning Dots */
.step-error-dot[b-gsohwmlsme] {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mud-palette-error);
    border: 2px solid var(--mud-palette-background);
}

.step-warning-dot[b-gsohwmlsme] {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mud-palette-warning);
    border: 2px solid var(--mud-palette-background);
}

/* Pulse Animation */
@keyframes stepPulse-b-gsohwmlsme {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--cwe-accent-glow-strong);
    }
    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

/* Responsive - Compact single-line stepper.
   Threshold: 920px container width — sized so a 10-step stepper collapses before it overflows.
   Tune this value if step count or dot size changes. */
@container (max-width: 920px) {

    /* Flip indicator to row so track + counter sit side by side */
    .step-indicator[b-gsohwmlsme] {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    /* Hide all step items except the current one */
    .step-item:not(.current)[b-gsohwmlsme] {
        display: none;
    }

    /* Hide all connectors */
    .step-connector[b-gsohwmlsme] {
        display: none;
    }

    /* Lay out the current step as a row: dot then label */
    .step-item.current[b-gsohwmlsme] {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    /* Shrink dot slightly */
    .step-dot[b-gsohwmlsme] {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    /* Show the current label inline; remove vertical margin */
    .step-item.current .step-label[b-gsohwmlsme] {
        display: inline;
        margin-top: 0;
        max-width: none;
        white-space: nowrap;
        font-size: 0.75rem;
    }

    /* Counter sits inline after the label, preceded by a separator */
    .step-counter[b-gsohwmlsme] {
        margin-top: 0;
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.75rem;
    }

    .step-counter[b-gsohwmlsme]::before {
        content: "·";
        margin-right: 0.4rem;
    }
}
