/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* AppBar branding (UX/UI spec §6: wordmark + optional env chip) */
.ktb-brand[b-sxcvcp0vcw] {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.ktb-brand-badge[b-sxcvcp0vcw] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
}

.ktb-brand-wordmark[b-sxcvcp0vcw] {
    font-size: 1.125rem;
    font-weight: 500;
    color: #fff;
}

.ktb-env-chip[b-sxcvcp0vcw] {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    background: #F2A900;
    color: #1A2733;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* Main content canvas is themed via body background (--mud-palette-background) */

#blazor-error-ui[b-sxcvcp0vcw] {
    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-sxcvcp0vcw] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-8h617p7s3k],
.components-reconnect-repeated-attempt-visible[b-8h617p7s3k],
.components-reconnect-failed-visible[b-8h617p7s3k],
.components-pause-visible[b-8h617p7s3k],
.components-resume-failed-visible[b-8h617p7s3k],
.components-rejoining-animation[b-8h617p7s3k] {
    display: none;
}

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


#components-reconnect-modal[b-8h617p7s3k] {
    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-8h617p7s3k 0.5s both;
    &[open]

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

}

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

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

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

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

    100% {
        opacity: 1;
    }
}

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

    100% {
        opacity: 0;
    }
}

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

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

#components-reconnect-modal button[b-8h617p7s3k] {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover[b-8h617p7s3k] {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active[b-8h617p7s3k] {
        background-color: #6b9ed2;
    }

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

    .components-rejoining-animation div[b-8h617p7s3k] {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-8h617p7s3k 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

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

@keyframes components-rejoining-animation-b-8h617p7s3k {
    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/Pages/Home.razor.rz.scp.css */
/* Page shell — spec §5: 8px grid, constrained readable column on wide screens */
.ktb-page[b-lwpnjfx45c] {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.ktb-page__header[b-lwpnjfx45c] {
    margin-bottom: 1.5rem;
}

.ktb-page__header[b-lwpnjfx45c]  .mud-typography-h5 {
    margin-bottom: 0.25rem;
}

.ktb-page__header[b-lwpnjfx45c]  .mud-typography-caption {
    color: var(--mud-palette-text-secondary);
}

/* Card grouping for the two workflow phases (upload / results).
   ::deep is required: the classes live on MudPaper/MudText components, which
   never receive the CSS-isolation scope attribute themselves. */
.ktb-page[b-lwpnjfx45c]  .ktb-card {
    padding: 1.5rem;
    border: 1px solid var(--mud-palette-lines-default, #D9DEE4);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.ktb-page[b-lwpnjfx45c]  .ktb-card__title {
    margin-bottom: 0.125rem;
}

.ktb-page[b-lwpnjfx45c]  .ktb-card__hint {
    color: var(--mud-palette-text-secondary, #5B6B7A);
    margin-bottom: 1rem;
}

.ktb-card__toolbar[b-lwpnjfx45c] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ktb-card__footer[b-lwpnjfx45c] {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Upload slots — vertical stack (vertical-layout spec §2.1).
   One column at every breakpoint: each tile always gets the card's full
   content width, so filename truncation math is computed against one
   predictable width instead of three grid columns. The max-height scroll
   rule (§5.1) is a no-op at today's 3 tiles and activates automatically
   if the slot count ever grows past ~6. */
.ktb-upload-list[b-lwpnjfx45c] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    max-height: 24rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Submit / Reset action row */
.ktb-actions[b-lwpnjfx45c] {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.ktb-actions[b-lwpnjfx45c]  .ktb-actions__submit {
    min-width: 10rem;
}

.ktb-actions[b-lwpnjfx45c]  .ktb-actions__spinner {
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.375rem;
    align-self: center;
}

/* Results count chip */
.ktb-count-chip[b-lwpnjfx45c] {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    background: var(--mud-palette-primary-lighten, #E8EEF9);
    color: var(--mud-palette-primary, #0B3D91);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Async status region (loading / error / empty) */
.ktb-status__loading[b-lwpnjfx45c] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    padding: 2.5rem 0;
    color: var(--mud-palette-text-secondary, #5B6B7A);
}

.ktb-status__error-body[b-lwpnjfx45c] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.ktb-status__error-body[b-lwpnjfx45c]  .mud-typography {
    margin: 0;
}

/* Empty state — spec §7.4 */
.ktb-empty[b-lwpnjfx45c] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    padding: 3rem 1rem;
}

.ktb-empty[b-lwpnjfx45c]  .ktb-empty__icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--mud-palette-text-secondary, #5B6B7A);
}

.ktb-empty[b-lwpnjfx45c]  .mud-typography-caption {
    color: var(--mud-palette-text-secondary, #5B6B7A);
    max-width: 32rem;
}

/* Expandable row details — spec §7.3.
   The tr/td/div below are authored in Home.razor so they are scoped normally. */
.ktb-detail-row > td[b-lwpnjfx45c] {
    padding: 0 !important;
    border-bottom: 1px solid var(--mud-palette-lines-default, #D9DEE4);
}

.ktb-detail[b-lwpnjfx45c] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding: 0.75rem 1rem;
    background: var(--mud-palette-primary-lighten, #E8EEF9);
}

.ktb-detail__item[b-lwpnjfx45c] {
    display: flex;
    flex-direction: column;
    min-width: 8rem;
}

.ktb-detail__label[b-lwpnjfx45c] {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary, #5B6B7A);
}

/* Slim expand column (classes sit on MudTh/MudTd components) */
.ktb-page[b-lwpnjfx45c]  .ktb-table__expand-col {
    width: 3rem;
}
/* /Components/Widgets/UploadTile.razor.rz.scp.css */
/* Neutralize MudFileUpload's form-control wrapper inside the tile.
   ::deep is required: the target is rendered by MudBlazor components. */
.ktb-upload-tile[b-vohhcxmb9n]  .mud-input-control {
    margin-bottom: 0;
}

/* Outlined tile row in the vertical upload list — spec §2.2.
   Fixed min-height per row keeps the stack's rhythm predictable (§3.1). */
.ktb-upload-tile[b-vohhcxmb9n] {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 3.5rem;
    border: 1px solid var(--mud-palette-lines-default, #D9DEE4);
    border-radius: 8px;
    background: var(--mud-palette-surface, #FFFFFF);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ktb-upload-tile:hover[b-vohhcxmb9n] {
    border-color: var(--mud-palette-primary, #0B3D91);
}

.ktb-upload-tile__main[b-vohhcxmb9n] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.ktb-upload-tile__main:focus-visible[b-vohhcxmb9n] {
    outline: 2px solid var(--mud-palette-primary, #0B3D91);
    outline-offset: 2px;
}

/* Attached state: filled with the primary lighten tint, check icon */
.ktb-upload-tile--attached[b-vohhcxmb9n] {
    border-color: var(--mud-palette-primary, #0B3D91);
    background: var(--mud-palette-primary-lighten, #E8EEF9);
}

/* Error state (spec §4.1): red outline + error icon color comes from markup */
.ktb-upload-tile--error[b-vohhcxmb9n] {
    border-color: var(--mud-palette-error, #B3261E);
    background: var(--mud-palette-error-lighten, #FCEEEE);
}

.ktb-upload-tile[b-vohhcxmb9n]  .ktb-upload-tile__icon {
    flex: 0 0 auto;
    font-size: 1.75rem;
}

/* The only flexible element — min-width:0 is REQUIRED (spec §2.2): a flex
   child defaults to min-width:auto, which lets long unbroken filenames win
   over the parent constraint and overflow the row. */
.ktb-upload-tile__body[b-vohhcxmb9n] {
    flex: 1 1 auto;
    min-width: 0;
}

.ktb-upload-tile__label[b-vohhcxmb9n] {
    font-weight: 600;
    line-height: 1.3;
    color: var(--mud-palette-text-primary, #1A2733);
}

.ktb-upload-tile--attached .ktb-upload-tile__label[b-vohhcxmb9n] {
    color: var(--mud-palette-primary, #0B3D91);
}

/* Filename line: single-line, middle-truncated by TruncateMiddle; this CSS
   stays as a safety net for unusually wide glyphs (spec §3.2/§3.4). */
.ktb-upload-tile__file[b-vohhcxmb9n] {
    display: block;
    max-width: 100%;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary, #5B6B7A);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Inline validation error (spec §4.1) — the one state allowed to grow the
   row to two lines. */
.ktb-upload-tile__error[b-vohhcxmb9n] {
    color: var(--mud-palette-error, #B3261E);
    font-size: 0.6875rem;
}

/* Fixed-width right-hand rail (spec §4.2): status dot + action button slots
   are always reserved so their presence/absence never shifts the filename's
   available width. Rendered by MudIconButton components → ::deep. */
.ktb-upload-tile__rail[b-vohhcxmb9n] {
    flex: 0 0 5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    padding-right: 0.5rem;
}

.ktb-upload-tile__rail[b-vohhcxmb9n]  .ktb-upload-tile__clear,
.ktb-upload-tile__rail[b-vohhcxmb9n]  .ktb-upload-tile__retry {
    margin: 0;
}
