/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * FailproofStepper - MDB-inspired multi-step wizard (stable layout, gated heads)
 *
 * Shell: header (heads) + main (content card) + footer (actions) - attached,
 * but visually separate regions.
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

.fp-stepper
{
    --fp-stepper-active-bg: #1266f1;
    --fp-stepper-active-color: #fff;
    --fp-stepper-completed-bg: #00b74a;
    --fp-stepper-completed-color: #fff;
    --fp-stepper-muted-bg: #9e9e9e;
    --fp-stepper-muted-color: #fff;
    --fp-stepper-disabled-bg: #e6e6e6;
    --fp-stepper-disabled-color: #fff;
    --fp-stepper-label-color: #757575;
    --fp-stepper-label-active-color: #212529;
    --fp-stepper-connector: rgba(0, 0, 0, 0.12);
    --fp-stepper-head-hover: rgba(0, 0, 0, 0.04);
    --fp-stepper-surface: #fff;
    --fp-stepper-chrome: #f1f3f5;
    --fp-stepper-footer: var(--fp-stepper-chrome);
    --fp-stepper-border: rgba(0, 0, 0, 0.1);

    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* allow shrink when a child table is wider than the viewport */
    min-height: 0;
    flex: 1 1 0; /* match .fp-stepper-shell > .fp-stepper - same fill as skeleton */
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

/* - - - - header (step heads - outside content card) - - - - */

.fp-stepper-header
{
    flex: 0 0 auto;
    width: 100%;
    padding: 0.2rem 1rem 0.35rem;
    background: var(--fp-stepper-chrome);
    border: 1px solid var(--fp-stepper-border);
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    /* Hosts the overlay busy bar (absolute) so show/hide does not shift layout */
    position: relative;
}

.fp-stepper-nav
{
    width: 100%;
    margin: 0;
    padding: 0;
}

.fp-stepper-nav-list
{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    width: 100%;
}

/*
 * Equal-width columns (MDB-style). Connector lines live INSIDE each full-width
 * head button as flex:1 ::before/::after segments, so the gap between steps
 * stays even regardless of label length. Short labels no longer leave a huge
 * leftover line inside that column.
 */
.fp-stepper-nav-item
{
    display: flex;
    align-items: stretch;
    flex: 1 1 0;
    min-width: 0;
}

.fp-stepper-nav-btn
{
    display: flex;
    align-items: center;
    /* gap separates lines from icon/label; no horizontal padding - that left a
       visible seam where neighboring column connectors met */
    gap: 0.5rem;
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 1.15rem 0;
    margin: 0;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    min-width: 0;
    border-radius: 0.25rem;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
}

/* Connector segments - share leftover space evenly on both sides of icon+label */
.fp-stepper-nav-item:not(:first-child) .fp-stepper-nav-btn::before,
.fp-stepper-nav-item:not(:last-child) .fp-stepper-nav-btn::after
{
    content: "";
    flex: 1 1 0;
    height: 1px;
    min-width: 0.5rem;
    background-color: var(--fp-stepper-connector);
    align-self: center;
}

.fp-stepper-nav-item:first-child .fp-stepper-nav-btn
{
    padding-left: 0.35rem;
}

.fp-stepper-nav-item:last-child .fp-stepper-nav-btn
{
    padding-right: 0.35rem;
}

/* MDB .ripple-surface forces inline-block - keep flex layout for heads/arrows */
.fp-stepper-nav-btn.ripple-surface
{
    display: flex;
}

.fp-stepper-mobile-arrow.ripple-surface
{
    display: inline-flex;
}

.fp-stepper-nav-btn:hover
{
    background-color: var(--fp-stepper-head-hover);
}

.fp-stepper-nav-btn:focus
{
    outline: none;
}

.fp-stepper-nav-btn:focus-visible
{
    outline: 2px solid var(--fp-stepper-active-bg);
    outline-offset: 2px;
}

.fp-stepper-nav-icon
{
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.938rem;
    height: 1.938rem;
    border-radius: 50%;
    background-color: var(--fp-stepper-muted-bg);
    color: var(--fp-stepper-muted-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.fp-stepper-nav-label
{
    flex: 0 1 auto;
    min-width: 0;
    color: var(--fp-stepper-label-color);
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-stepper-nav-item.is-active .fp-stepper-nav-icon
{
    background-color: var(--fp-stepper-active-bg);
    color: var(--fp-stepper-active-color);
}

.fp-stepper-nav-item.is-active .fp-stepper-nav-label
{
    font-weight: 500;
    color: var(--fp-stepper-label-active-color);
}

.fp-stepper-nav-item.is-completed .fp-stepper-nav-icon
{
    background-color: var(--fp-stepper-completed-bg);
    color: var(--fp-stepper-completed-color);
}

.fp-stepper-nav-item.is-disabled .fp-stepper-nav-btn
{
    cursor: not-allowed;
}

.fp-stepper-nav-item.is-disabled .fp-stepper-nav-btn:hover
{
    background-color: transparent;
}

.fp-stepper-nav-item.is-disabled .fp-stepper-nav-icon
{
    background-color: var(--fp-stepper-disabled-bg);
    color: var(--fp-stepper-disabled-color);
}

.fp-stepper.is-locked .fp-stepper-nav-btn
{
    cursor: not-allowed;
    pointer-events: none;
}

/* - - - - mobile compact header (current step + arrows) - - - - */

.fp-stepper-nav-mobile
{
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0;
}

.fp-stepper-mobile-arrow
{
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #495057;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
}

.fp-stepper-mobile-arrow:hover:not(:disabled)
{
    background: var(--fp-stepper-head-hover);
    color: var(--fp-stepper-active-bg);
}

.fp-stepper-mobile-arrow:disabled
{
    opacity: 0.35;
    cursor: not-allowed;
}

.fp-stepper-mobile-current
{
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-align: left;
}

.fp-stepper-mobile-current .fp-stepper-nav-icon
{
    background-color: var(--fp-stepper-active-bg);
    color: var(--fp-stepper-active-color);
}

.fp-stepper-mobile-text
{
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.fp-stepper-mobile-label
{
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fp-stepper-label-active-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-stepper-mobile-meta
{
    font-size: 0.75rem;
    color: var(--fp-stepper-label-color);
}

.fp-stepper.is-locked .fp-stepper-mobile-arrow
{
    pointer-events: none;
}

/* .fp-stepper-compact is toggled by JS at options.mobileBreakpoint */
.fp-stepper.fp-stepper-compact .fp-stepper-nav-desktop
{
    display: none;
}

.fp-stepper.fp-stepper-compact .fp-stepper-nav-mobile
{
    display: flex;
}

/* - - - - main content card (panels only) - - - - */

.fp-stepper-main
{
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
    background: var(--fp-stepper-surface);
    border-left: 1px solid var(--fp-stepper-border);
    border-right: 1px solid var(--fp-stepper-border);
    box-shadow: none;
    transition: none !important;
    transform: none !important;
    overflow: hidden;
}

.fp-stepper-panels
{
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
    /*
     * Scroll the padded panels host (not .fp-step-scroll) so tall form steps
     * can scroll while MDB radio/checkbox rings still paint into this padding.
     * Table steps keep their own scroll on .fp-table-root.
     */
    overflow: auto;
    padding: 1rem 1rem 0.5rem;
}

.fp-stepper-panel
{
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    font-size: inherit;
    text-align: inherit;
    text-transform: none;
}

.fp-stepper-panel.is-active
{
    display: flex;
}

.fp-stepper-panel-body
{
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    /*
     * Must stay overflow: visible - setting overflow-y: auto makes the other
     * axis compute to auto as well, which clips MDB focus rings / checkbox
     * halos. Table steps opt into clipping via .fp-stepper-fill.
     */
    overflow: visible;
}

/*
 * Table/fill steps: flex column so a child can own scrolling. Keep overflow
 * visible here so MDB outline labels / focus rings are not clipped - put
 * overflow:hidden on the scroll host (e.g. .fp-table-root) instead.
 */
.fp-stepper-panel-body.fp-stepper-fill
{
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/*
 * Inner scroll host for tall non-table step content (chip pickers, long forms).
 * Keep this OFF .fp-stepper-panel-body - overflow there clips MDB checkbox /
 * outline focus rings. Pair with .fp-stepper-fill on the panel-body.
 *
 * overflow: visible so MDB radio/checkbox ::before rings can paint into the
 * parent .fp-stepper-panels padding (do not pad/inset the controls). Tall
 * table steps skip this wrapper and scroll inside .fp-table-root instead.
 * When a form step itself must scroll, prefer overflow:visible here and let
 * a higher shell scroll - overflow-y:auto on this box re-clips the rings.
 */
.fp-step-scroll
{
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    overflow: visible;
}

/*
 * Default Bootstrap/MDB gutters on step rows so col-* spacing works.
 * Flush layouts (tables / master-detail) opt out via .fp-fill-col.row.
 */
.fp-stepper-panel-body .row
{
    max-width: 100%;
}

.fp-stepper-panel-body h5
{
    text-align: left;
    text-transform: none;
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0 0 0.75rem;
}

/*
 * Busy bar - overlays the bottom edge of the header (out of flow) so toggling
 * is-active never shifts main/footer. Markup/animation: progress.css.
 */
.fp-stepper-header > .fp-stepper-busy-progress.fp-progress
{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    width: 100%;
    margin: 0;
    border-radius: 0;
    --fp-progress-color: var(--fp-stepper-active-bg, #1266f1);
}

/* - - - - footer (actions - outside content card) - - - - */

.fp-stepper-footer
{
    flex: 0 0 auto;
    width: 100%;
    /* Match header chrome so actions read as their own band */
    background: var(--fp-stepper-footer);
    border: 1px solid var(--fp-stepper-border);
    border-top: 1px solid var(--fp-stepper-border);
    border-radius: 0 0 0.5rem 0.5rem;
    /* Room below buttons so MDB btn box-shadows are not clipped */
    padding: 0.85rem 1rem 1.25rem;
    overflow: visible;
    z-index: 6;
}

.fp-stepper-actions
{
    display: none;
    width: 100%;
}

.fp-stepper-actions.is-active
{
    display: block;
}

.fp-stepper-actions .btn + .btn
{
    margin-left: 0.5rem;
}

/* - - - - step change animations - - - - */

.fp-stepper-panel.fp-stepper-anim-in
{
    animation-duration: var(--fp-stepper-anim-ms, 380ms);
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
    will-change: transform, opacity;
}

.fp-stepper[data-fp-animation="fade"] .fp-stepper-panel.fp-stepper-anim-in
{
    animation-name: fp-stepper-fade-in;
}

.fp-stepper[data-fp-animation="slide"][data-fp-anim-dir="forward"] .fp-stepper-panel.fp-stepper-anim-in,
.fp-stepper[data-fp-animation="slide-fade"][data-fp-anim-dir="forward"] .fp-stepper-panel.fp-stepper-anim-in
{
    animation-name: fp-stepper-slide-in-forward;
}

.fp-stepper[data-fp-animation="slide"][data-fp-anim-dir="back"] .fp-stepper-panel.fp-stepper-anim-in,
.fp-stepper[data-fp-animation="slide-fade"][data-fp-anim-dir="back"] .fp-stepper-panel.fp-stepper-anim-in
{
    animation-name: fp-stepper-slide-in-back;
}

.fp-stepper[data-fp-animation="slide-up"] .fp-stepper-panel.fp-stepper-anim-in
{
    animation-name: fp-stepper-slide-up-in;
}

@keyframes fp-stepper-fade-in
{
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fp-stepper-slide-in-forward
{
    from { opacity: 0; transform: translateX(36px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fp-stepper-slide-in-back
{
    from { opacity: 0; transform: translateX(-36px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fp-stepper-slide-up-in
{
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header change animations */
.fp-stepper-nav-icon.fp-stepper-head-anim-pop,
.fp-stepper-mobile-current.fp-stepper-head-anim-pop
{
    animation: fp-stepper-head-pop 280ms ease;
}

.fp-stepper-nav-icon.fp-stepper-head-anim-fade,
.fp-stepper-mobile-current.fp-stepper-head-anim-fade
{
    animation: fp-stepper-head-fade 280ms ease;
}

.fp-stepper-mobile-current.fp-stepper-head-anim-forward
{
    animation: fp-stepper-head-slide-forward 280ms ease;
}

.fp-stepper-mobile-current.fp-stepper-head-anim-back
{
    animation: fp-stepper-head-slide-back 280ms ease;
}

@keyframes fp-stepper-head-pop
{
    0% { transform: scale(0.85); }
    55% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes fp-stepper-head-fade
{
    from { opacity: 0.25; }
    to { opacity: 1; }
}

@keyframes fp-stepper-head-slide-forward
{
    from { opacity: 0.2; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fp-stepper-head-slide-back
{
    from { opacity: 0.2; transform: translateX(-14px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce)
{
    .fp-stepper-panel.fp-stepper-anim-in,
    .fp-stepper-nav-icon.fp-stepper-head-anim-pop,
    .fp-stepper-nav-icon.fp-stepper-head-anim-fade,
    .fp-stepper-mobile-current.fp-stepper-head-anim-pop,
    .fp-stepper-mobile-current.fp-stepper-head-anim-fade,
    .fp-stepper-mobile-current.fp-stepper-head-anim-forward,
    .fp-stepper-mobile-current.fp-stepper-head-anim-back
    {
        animation: none !important;
    }
}

/* - - - - page shell helpers - - - - */

/*
 * Tall viewports: fill the window and scroll inside the stepper/table.
 * Short viewports (see max-height query): document scrolls; page has a
 * min-height so Continue sits at the bottom of content, not the viewport.
 */
body.fp-page-fit-body
{
    --fp-page-min-height: 640px;
    --fp-nav-height: 56px;
}

.fp-page-fit
{
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: calc(100vh - var(--fp-nav-height, 56px));
    overflow: hidden;
}

.fp-page-fit > .container
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding-bottom: 0.75rem;
}

.fp-page-chrome
{
    flex: 0 0 auto;
}

.fp-stepper-shell
{
    /*
     * flex-basis: 0 (not auto) so the shell fills the remaining viewport and
     * cannot grow taller than the page-fit slot - keeps skeleton and live
     * stepper the same height. position:relative hosts absolute layers so
     * swapping skeleton ↔ live never changes the card box.
     */
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/*
 * Skeleton / live views that share one .fp-stepper-shell. Absolute fill so
 * content intrinsic height cannot stretch or shrink the card.
 */
.fp-stepper-shell-layer
{
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

/*
 * Legacy swipeclock.css sets #stepper-form { padding-bottom: 20px } for old
 * MDB steppers. That shrinks the live body vs the skeleton - clear it here.
 */
#stepper-form.fp-stepper-shell,
#stepper-form.fp-stepper-shell-layer
{
    padding-bottom: 0;
}

.fp-stepper-shell > .fp-stepper,
.fp-stepper-shell-layer > .fp-stepper
{
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Legacy alias */
.fp-stepper-card
{
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    transition: none !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.fp-stepper-card > .card-body
{
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media screen and (max-width: 768px)
{
    .fp-stepper-nav-label
    {
        font-size: 0.8rem;
    }

    .fp-stepper-nav-btn
    {
        padding: 0.85rem 0;
        gap: 0.35rem;
    }
}

@media screen and (max-width: 520px)
{
    .fp-stepper-nav-item:not(:first-child) .fp-stepper-nav-btn::before,
    .fp-stepper-nav-item:not(:last-child) .fp-stepper-nav-btn::after
    {
        min-width: 0.25rem;
    }

    .fp-stepper-nav-label
    {
        font-size: 0.72rem;
    }

    .fp-stepper-actions.is-active
    {
        text-align: center;
    }

    .fp-stepper-actions .btn + .btn
    {
        margin-left: 0.35rem;
    }
}

/*
 * Short viewport - document can scroll (page min-height). Shell layers become
 * in-flow so content can define height. Keep overflow-x contained (never
 * visible) so wide tables scroll inside .fp-table-scroll instead of blowing
 * out of the card. Footer stays in normal flow under the content.
 */
@media screen and (max-height: 640px)
{
    body.fp-page-fit-body.vh-100
    {
        height: auto !important;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .fp-page-fit
    {
        height: auto;
        min-height: var(--fp-page-min-height, 640px);
        overflow-x: hidden;
        overflow-y: visible;
        max-width: 100%;
    }

    .fp-page-fit > .container
    {
        height: auto;
        min-height: 0;
        min-width: 0;
        max-width: 100%;
        flex: 1 1 auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .fp-stepper-shell
    {
        flex: 1 1 auto;
        min-height: 28rem;
        min-width: 0;
        max-width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .fp-stepper-shell-layer
    {
        position: relative;
        inset: auto;
        flex: 1 1 auto;
        min-height: 28rem;
        min-width: 0;
        max-width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .fp-stepper-shell > .fp-stepper,
    .fp-stepper-shell-layer > .fp-stepper
    {
        flex: 1 1 auto;
        min-height: 28rem;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .fp-stepper-main,
    .fp-stepper-panels,
    .fp-stepper-panel.is-active
    {
        flex: 1 1 auto;
        min-height: 12rem;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
    }

    .fp-stepper-panel-body.fp-stepper-fill
    {
        flex: 1 1 auto;
        min-height: 12rem;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
    }

    .fp-stepper-footer
    {
        position: relative;
        bottom: auto;
    }
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Shared page chrome + fill helpers (used by impersonator / nm2 / repair, …)
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

.fp-page-chrome-compact
{
    flex: 0 0 auto;
}

.fp-page-title
{
    font-size: 2rem;
    line-height: 1.25;
}

@media screen and (max-width: 768px), screen and (max-height: 640px)
{
    .fp-page-title
    {
        font-size: 1.35rem;
    }
}

.fp-page-lede
{
    font-size: 0.95rem;
    margin-bottom: 0;
}

.fp-step-loading
{
    flex: 0 0 auto;
    width: 100%;
    padding: 0.35rem 0 0.75rem;
}

.fp-step-lede
{
    flex: 0 0 auto;
    width: 100%;
}

.fp-stepper-panel-body .md-form
{
    margin-bottom: 20px;
}

.fp-stepper-panel-body .row .md-form .row
{
    margin-top: 20px;
}

.fp-stepper-panel-body .note
{
    margin-bottom: 1rem;
}

/*
 * Flex column that grows under step chrome so a child (table host, master-
 * detail, …) owns the remaining height.
 */
.fp-fill-col
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.fp-fill-col.row
{
    margin-left: 0;
    margin-right: 0;
    --mdb-gutter-x: 0;
    --bs-gutter-x: 0;
}

/* Materialize tabs inside a fill step */
.fp-step-tabs
{
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fp-step-tabs .tab
{
    min-width: 0;
}

.fp-step-tabs .tab a
{
    padding-left: 1rem;
    padding-right: 1rem;
}

.fp-tab-panel
{
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

/* !important beats Materialize tabs inline display:block so flex fill works */
.fp-tab-panel.active
{
    display: flex !important;
}

.fp-table-host
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.fp-table-host > .fp-step-toolbar
{
    flex: 0 0 auto;
}

/* Table mount point (.fp-table-root is added by FailproofTable) */
.fp-table-host > .fp-table-root,
.fp-fill-col > .fp-table-root,
.fp-tab-panel > .fp-table-root
{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.fp-stepper-fill .fp-table-root
{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.fp-stepper-fill .fp-table-scroll
{
    flex: 1 1 auto;
    max-height: none !important;
    min-height: 180px;
}

@media screen and (max-height: 640px)
{
    .fp-stepper-fill .fp-table-scroll
    {
        flex: 0 1 auto;
        min-height: 12rem;
        max-height: min(50vh, 22rem) !important;
        overflow: auto;
    }
}

/* - - - - Step toolbar + collapsible search - - - - */

.fp-step-toolbar
{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    width: 100%;
    min-width: 0;
}

.fp-stepper-panel-body h5.fp-step-toolbar-title
{
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.35;
    color: #495057;
}

.fp-search-toggle
{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    min-width: 0;
}

.fp-search-toggle-btn
{
    flex: 0 0 auto;
    order: 2;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
}

.fp-search-toggle-panel
{
    display: none;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    width: 100%;
    order: 1;
}

.fp-search-toggle.is-open
{
    flex: 1 1 16rem;
    max-width: 24rem;
}

.fp-search-toggle.is-open .fp-search-toggle-panel
{
    display: flex;
}

.fp-search-toggle.is-open .form-outline
{
    margin: 0;
}

.fp-search-toggle.is-filtered:not(.is-open) .fp-search-toggle-btn
{
    color: #1266f1;
    border-color: #1266f1;
    background-color: rgba(18, 102, 241, 0.06);
}

@media screen and (max-width: 576px)
{
    .fp-step-toolbar
    {
        display: block;
        padding-right: 2.75rem;
    }

    .fp-stepper-panel-body h5.fp-step-toolbar-title
    {
        display: block;
        width: 100%;
    }

    .fp-step-toolbar:has(.fp-search-toggle.is-open) .fp-step-toolbar-title
    {
        visibility: hidden;
    }

    .fp-search-toggle
    {
        position: absolute;
        inset: 0;
        flex: none;
        max-width: none;
        margin: 0;
        pointer-events: none;
    }

    .fp-search-toggle-btn
    {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        z-index: 3;
        pointer-events: auto;
    }

    .fp-search-toggle-panel
    {
        position: absolute;
        left: 0;
        right: 2.75rem;
        top: 0;
        bottom: 0;
        width: auto;
        align-items: center;
        background: var(--fp-stepper-surface, #fff);
        z-index: 2;
        pointer-events: auto;
    }

    .fp-search-toggle.is-open
    {
        flex: none;
        max-width: none;
        margin: 0;
    }
}
