/**
 * AGSS layout spacing — small uniform gaps between sections (tabs, actions, tables, filters).
 * Load LAST in app layouts (after buttons-mobile.css). Does not change sizes/colors/typography.
 */

:root {
    --ds-space-2xs: 6px;
    --ds-space-xs: 10px;
    --ds-space-sm: 12px;
    --ds-space-toolbar-x: 12px;
    --ds-space-toolbar-y: 8px;
}

/* -------------------------------------------------------------------------- */
/* Page title → filters / content                                              */
/* -------------------------------------------------------------------------- */
.pagetitle {
    margin-bottom: var(--ds-space-xs);
}

.filters {
    margin-bottom: var(--ds-space-sm);
}

/* -------------------------------------------------------------------------- */
/* Tab strips → next block (actions, cards, forms)                               */
/* -------------------------------------------------------------------------- */
.tabs + .buttons,
.tabs + .ds-action-row,
.tabs + .white-bg,
.tabs + .summary-bar,
.tabs + .tablestyle,
.tabs + [class*="form-"],
.tabbar + .buttons,
.tabbar + .white-bg,
.tabbar + [class*="form-"],
.tabs.tabs--center + [class*="form-"],
.tabs.tabs--wrap + .buttons,
.tabs.tabs--wrap + .white-bg,
.form-1200 > .tabs + *,
.form-1400 > .tabs + *,
.form-1600 > .tabs + *,
.form-1000 > .tabs + *,
[class*="form-"] > .tabs.tabs--wrap + .buttons,
[class*="form-"] > .tabs.tabs--wrap + .white-bg {
    margin-top: 0;
}

.tabs:not(.automotive-film-job-tabs):not(:last-child),
.tabbar:not(:last-child) {
    margin-bottom: var(--ds-space-sm);
}

/* Job header tabs sit in dedicated row — spacing from partial */
.job-summary-header-tabs-row .automotive-film-job-tabs.tabs {
    margin-bottom: var(--ds-space-xs);
}

/* -------------------------------------------------------------------------- */
/* Action rows → tables / cards / next section                                   */
/* -------------------------------------------------------------------------- */
.buttons + .white-bg,
.buttons + .tablestyle,
.buttons + iframe,
.ds-action-row + .white-bg,
.ds-action-row + .tablestyle,
.summary-bar + .white-bg,
.summary-bar + .tablestyle,
.summary-bar + .buttons,
.buttons + .summary-bar,
.center.white-bg > .p-10 + .button,
.center.white-bg > .p-10 + .buttons,
.white-bg .buttons + .tablestyle {
    margin-top: 0;
}

.buttons:not(.job-summary-header-actions):not(.job-summary-header-toolbar):not(.job-summary-header-editrow):not(.automotive-film-job-tabs):not(:last-child),
.ds-action-row:not(:last-child),
.inp-btn-flx:not(:last-child),
.group-btns:not(:last-child) {
    margin-bottom: var(--ds-space-sm);
}

/* Quote / job panels with padded action areas */
.center.white-bg > .p-10:has(.buttons),
.center.white-bg > .p-10:has(.ds-action-row) {
    padding-bottom: var(--ds-space-sm);
}

/* -------------------------------------------------------------------------- */
/* Section header toolbars (table/panel titles + actions)                          */
/* -------------------------------------------------------------------------- */
.sectionheader.position-relative,
.sectionheader.d-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    padding: 10px var(--ds-space-toolbar-x);
    text-align: left;
}

.sectionheader.position-relative > .d-inline-block,
.sectionheader.position-relative > [id][style*="position: absolute"],
.sectionheader.position-relative > div[style*="position: absolute"] {
    position: static !important;
    right: auto !important;
    margin: 0 !important;
    margin-right: 0 !important;
}

.sectionheader.position-relative .buttons,
.sectionheader.position-relative .ds-action-row,
.sectionheader.d-flex .buttons,
.sectionheader.d-flex .ds-action-row {
    margin: 0;
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-end;
}

.sectionheader .buttons,
.sectionheader .ds-action-row,
.sectionheader .button,
.sectionheader .gridbutton,
.sectionheader .filterbutton {
    margin: 0;
}

/* Legend / schedule panel header with inline button */
.status-colors-icons-card .sectionheader,
.schedule-legend-panel .sectionheader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    padding: 10px var(--ds-space-toolbar-x) 12px;
}

.status-colors-icons-card .sectionheader .button,
.status-colors-icons-card .sectionheader .gridbutton,
.schedule-legend-panel .sectionheader .button {
    margin: 0;
}

.schedule-legend-panel > .center:first-child,
.schedule-legend-mobile-wrap > .center:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    padding: var(--ds-space-toolbar-y) var(--ds-space-toolbar-x) 10px;
}

.schedule-legend-panel > .center:first-child .sectionheader,
.schedule-legend-mobile-wrap > .center:first-child .sectionheader {
    margin: 0;
    padding: 0;
    background: transparent;
}

.schedule-legend-panel > .center:first-child .button,
.schedule-legend-mobile-wrap > .center:first-child .button {
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Table cells — stacked action buttons                                          */
/* -------------------------------------------------------------------------- */
.tablestyle td .button + .button,
.tablestyle td .gridbutton + .gridbutton,
.tablestyle td .filterbutton + .filterbutton,
.tablestyle td .job-header-action-btn + .job-header-action-btn,
.tablestyle td .btn + .btn {
    margin-top: var(--ds-space-2xs);
}

.tablestyle td .buttons.ds-action-row--stack,
.tablestyle td .buttons.buttons--stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--ds-space-2xs);
    vertical-align: middle;
}

/* -------------------------------------------------------------------------- */
/* Stacked action rows (explicit utility)                                        */
/* -------------------------------------------------------------------------- */
.ds-action-row--stack,
.buttons.buttons--stack {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ds-space-2xs);
}

.ds-action-row--stack > *,
.buttons.buttons--stack > * {
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Filter row button groups (inside .filter cols)                                */
/* -------------------------------------------------------------------------- */
.filters .filterbutton + .filterbutton,
.filters .button + .button,
.filters .filter .filterbutton + .filterbutton {
    margin-left: 0;
}

.filters .col-xs-12.filter:has(.filterbutton),
.filters .col-xs-12.filter:has(.button),
.filters .filter:has(.filterbutton),
.filters .filter:has(.button),
.filters .ds-action-row,
.filters .ff-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
}

/* Filter toolbar buttons — flex gap only (no legacy margin/top offset) */
.filters .ds-action-row > .button,
.filters .ds-action-row > .filterbutton,
.filters .filter > .button,
.filters .filter > .filterbutton,
.filters .ff-filter-actions > .button,
.filters .ff-filter-actions > .filterbutton {
    position: static;
    top: auto;
    margin: 0;
}

/* Button column aligned with labeled filter fields (desktop) */
@media (min-width: 768px) {
    .filters .filter.filters__actions-align {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        align-content: flex-end;
        gap: var(--ds-btn-gap, 8px);
        padding-top: 1.35rem;
    }

    .filters .filter.filters__actions-align > .ds-action-row {
        padding-top: 0;
    }
}

/* -------------------------------------------------------------------------- */
/* White-bg / card internal breathing room (first/last children)                 */
/* -------------------------------------------------------------------------- */
.white-bg > .sectionheader:first-child + .tablestyle,
.white-bg > .sectionheader:first-child + .input-form {
    margin-top: 0;
}

.white-bg > .tablestyle {
    margin-top: 0;
}

/* -------------------------------------------------------------------------- */
/* Reusable action spacing utilities (aliases)                                   */
/* -------------------------------------------------------------------------- */
.ff-action-row,
.ff-button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-btn-row-gap, var(--ds-btn-gap, 8px));
}

.ff-panel-actions {
    padding: var(--ds-space-sm) var(--ds-space-toolbar-x) var(--ds-space-xs);
}

.ff-panel-actions > .button,
.ff-panel-actions > .gridbutton,
.ff-panel-actions > .filterbutton,
.ff-panel-actions > .job-header-action-btn {
    margin: 0;
}

/* In-panel section footers (VIN toolbar, Save Changes, quote actions) */
.ff-section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    margin-top: var(--ds-space-sm);
    margin-bottom: var(--ds-space-xs);
    padding: var(--ds-space-xs) var(--ds-space-toolbar-x) var(--ds-space-sm);
}

.ff-section-actions > .button,
.ff-section-actions > .gridbutton,
.ff-section-actions > .smallbutton,
.ff-section-actions > .filterbutton,
.ff-section-actions > .job-header-action-btn,
.ff-section-actions > a.job-header-action-btn,
.ff-section-actions > a.button {
    margin: 0;
}

.white-bg table + .ff-section-actions,
.white-bg .input-form table + .ff-section-actions,
.input-form table + .ff-section-actions,
table + .ff-section-actions {
    margin-top: var(--ds-space-sm);
}

.agreement-collect-signature-actions {
    margin-top: var(--ds-space-md);
    padding-left: 0;
    padding-right: 0;
    padding-bottom: var(--ds-space-sm);
}

.white-bg .input-form .agreement-signature-wrap {
    margin-top: var(--ds-space-md);
    padding-top: var(--ds-space-2xs);
}

.white-bg .input-form .agreement-terms-content + .agreement-signature-wrap {
    margin-top: var(--ds-space-md);
}

@media (max-width: 767.98px) {
    .agreement-collect-signature-actions,
    .white-bg .input-form .agreement-signature-wrap {
        margin-top: var(--ds-space-sm);
        padding-bottom: var(--ds-space-xs);
    }
}

.ff-section-actions + .quote-sent-audit-stamp,
.quote-sent-audit-stamp {
    padding-left: var(--ds-space-toolbar-x);
    padding-bottom: var(--ds-space-sm);
}

.ff-table-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    vertical-align: middle;
}

.ff-table-actions > .button,
.ff-table-actions > .gridbutton,
.ff-table-actions > .filterbutton {
    margin: 0;
}

/* Table action column — Edit + Remove/Delete on one row (desktop) */
.tablestyle th.buttoncolumn,
.tablestyle th.ff-action-cell,
.tablestyle td.ff-action-cell {
    width: 1%;
    min-width: var(--ds-table-action-col-min, 11.5rem);
    vertical-align: middle;
}

.tablestyle td.ff-action-cell {
    text-align: center;
}

/* ds-action-row defaults (width:100%, display:flex) misalign actions inside table cells */
.tablestyle td.ff-action-cell .ff-table-actions,
.tablestyle td.ff-action-cell .ds-action-row.ff-table-actions,
.tablestyle td.ff-action-cell .ff-row-actions {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100%;
    margin: 0;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
}

/* Center action buttons with row text (overrides .tablestyle td { vertical-align: top }) */
.tablestyle tr:has(> td.ff-action-cell) > td {
    vertical-align: middle;
}

.tablestyle td.mobileportrait-mobilewide .ff-table-actions,
.tablestyle td.mobileportrait-mobilewide .ff-row-actions {
    margin-top: var(--ds-space-sm);
}

.ff-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    vertical-align: middle;
}

.ff-row-actions > .button,
.ff-row-actions > .gridbutton,
.ff-row-actions > .filterbutton {
    margin: 0;
}

/* Legacy stacked-button margin must not apply inside horizontal action rows */
.tablestyle td .ff-table-actions > .gridbutton + .gridbutton,
.tablestyle td .ff-table-actions > .button + .button,
.tablestyle td .ff-table-actions > .filterbutton + .filterbutton,
.tablestyle td .ff-row-actions > .gridbutton + .gridbutton,
.tablestyle td .ff-row-actions > .button + .button,
.tablestyle td .ds-action-row:not(.ds-action-row--stack) > .gridbutton + .gridbutton,
.tablestyle td .ds-action-row:not(.ds-action-row--stack) > .button + .button,
.tablestyle td .ds-action-row:not(.ds-action-row--stack) > .filterbutton + .filterbutton {
    margin-top: 0;
    margin-left: 0;
}

@media (max-width: 576px) {
    .tablestyle td.ff-action-cell .ff-table-actions,
    .tablestyle td.ff-action-cell .ff-row-actions,
    .tablestyle td .ff-table-actions.ds-action-row--start {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.ff-modal-actions {
    padding: var(--ds-space-xs) var(--ds-space-toolbar-x) var(--ds-space-sm);
    gap: var(--ds-btn-gap, 8px);
}

/* After-table / footer actions inside panels */
.white-bg > .tablestyle + .center,
.white-bg > .tablestyle + .buttons,
.white-bg > .tablestyle + .ds-action-row,
.white-bg > .tablestyle + .ff-action-row,
.white-bg > .tablestyle + .input-form {
    margin-top: var(--ds-space-sm);
}

.white-bg > .center:has(> .button),
.white-bg > .center:has(> .gridbutton),
.white-bg > .tablestyle + .center,
.white-bg > .tablestyle + .buttons.buttons--center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    padding: var(--ds-space-sm) var(--ds-space-toolbar-x);
}

.white-bg > .center > .button,
.white-bg > .center > .gridbutton {
    margin: 0;
}

/* Top-of-panel action row (e.g. Export / Print inside card) */
.white-bg > .ff-panel-actions:first-child,
.white-bg > .ds-action-row.ff-panel-actions:first-child,
.white-bg.overflowscroll > .ff-panel-actions:first-child,
.white-bg.overflowscroll > .ds-action-row.ff-panel-actions:first-child {
    margin-top: 0;
}

.white-bg > .buttons.buttons--center:first-child,
.white-bg > .buttons.ff-panel-actions:first-child {
    padding: var(--ds-space-sm) var(--ds-space-toolbar-x);
}

/* In-panel form action rows */
.white-bg .input-form > .buttons,
.white-bg .input-form > .ds-action-row,
.white-bg .input-form > .ff-action-row {
    margin-top: var(--ds-space-sm);
    padding: var(--ds-space-xs) var(--ds-space-toolbar-x) var(--ds-space-sm);
}

.white-bg .input-form > .buttons > *,
.white-bg .input-form > .ds-action-row > * {
    margin: 0;
}

/* Job Summary — hidden AJAX triggers must not reserve action-row spacing */
#SummaryPage .input-form > .job-summary-form-triggers {
    margin: 0;
    padding: 0;
    min-height: 0;
}

#SummaryPage .input-form > .job-summary-form-triggers:empty {
    display: none;
}

/* VIN expanded — space between character boxes and action buttons */
.vin .vin-action-buttons {
    margin-top: var(--ds-space-sm, 8px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ds-btn-gap, 8px);
}

/* Section header → first action row below */
.white-bg > .sectionheader + .ff-panel-actions,
.white-bg > .sectionheader + .ds-action-row.ff-panel-actions {
    padding-top: var(--ds-space-xs);
}

/* -------------------------------------------------------------------------- */
/* Modal / popup toolbars                                                        */
/* -------------------------------------------------------------------------- */
.modal-body .buttons,
.modal-body .button-row,
.modal-body .ds-action-row {
    margin-top: var(--ds-space-sm);
}

.modal-footer {
    gap: var(--ds-btn-gap, 8px);
    padding: var(--ds-space-toolbar-y) var(--ds-space-toolbar-x);
}

/* -------------------------------------------------------------------------- */
/* Mobile — preserve compact spacing                                             */
/* -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .tabs:not(.automotive-film-job-tabs),
    .tabbar {
        margin-bottom: var(--ds-space-xs);
    }

    .buttons:not(:last-child),
    .ds-action-row:not(:last-child) {
        margin-bottom: var(--ds-space-xs);
    }

    .filters {
        margin-bottom: var(--ds-space-xs);
    }

    .sectionheader.position-relative,
    .sectionheader.d-flex {
        padding: 8px var(--ds-space-toolbar-x);
    }
}

/* -------------------------------------------------------------------------- */
/* Appointment calendar side panel                                               */
/* -------------------------------------------------------------------------- */
.appointment-side-panel {
    box-sizing: border-box;
    padding: var(--ds-space-sm) var(--ds-space-sm) var(--ds-space-sm);
}

.appointment-side-panel__job-header {
    margin-top: var(--ds-space-xs);
    margin-bottom: var(--ds-space-xs);
    padding-inline: var(--ds-space-2xs);
}

.appointment-side-panel__job-number {
    margin-top: var(--ds-space-2xs);
}

.appointment-side-panel > .white-bg + .white-bg,
.appointment-side-panel > .mt-0.mb-0 + .white-bg {
    margin-top: var(--ds-space-sm);
}

.appointment-side-panel .buttons,
.appointment-side-panel .ds-action-row,
.appointment-side-panel .ff-panel-actions,
.appointment-side-panel .ff-section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
}

@media screen and (min-width: 992px) {
    .appointment-side-panel :is(.button, .smallbutton, .gridbutton, .button-white, .filterbutton, a.button, a.smallbutton, a.gridbutton):not(.tab):not(.dropdown-item):not(.email-cta),
    .appointment-side-panel__header-actions :is(.button, .smallbutton, .gridbutton, .button-white, .filterbutton, a.button, a.smallbutton, a.gridbutton):not(.tab):not(.dropdown-item):not(.email-cta) {
        min-height: var(--ds-btn-min-height, 36px);
        padding: var(--ds-btn-padding-y, 8px) var(--ds-btn-padding-x, 16px);
        font-size: var(--ds-btn-font-size, 14px);
        line-height: 1.35;
    }

    .appointment-side-panel .btn-group > :is(.button, .smallbutton, .gridbutton).dropdown-toggle:not(.dropdown-item),
    .appointment-side-panel__header-actions .btn-group > :is(.button, .smallbutton, .gridbutton).dropdown-toggle:not(.dropdown-item) {
        min-height: var(--ds-btn-min-height, 36px);
        padding: var(--ds-btn-padding-y, 8px) calc(var(--ds-btn-padding-x, 16px) + 4px) var(--ds-btn-padding-y, 8px) var(--ds-btn-padding-x, 16px);
        font-size: var(--ds-btn-font-size, 14px);
        line-height: 1.35;
    }
}

.appointment-side-panel__header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: var(--ds-btn-gap, 8px);
    row-gap: var(--ds-space-2xs);
    margin-bottom: var(--ds-space-xs);
    padding-inline: var(--ds-space-2xs);
    width: 100%;
    box-sizing: border-box;
}

.appointment-side-panel__header-actions.ds-action-row {
    justify-content: center;
    align-content: center;
}

.appointment-side-panel__header-actions > .button,
.appointment-side-panel__header-actions > button.button,
.appointment-side-panel__header-actions > a.button,
.appointment-side-panel__header-actions > .btn-group {
    margin: 0 !important;
    flex: 0 0 auto;
    align-self: center;
}

.appointment-side-panel__header-actions > .btn-group {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.appointment-side-panel__header-actions > .btn-group > .button.dropdown-toggle {
    margin: 0 !important;
    align-self: center;
}

.scrollable-Job > .mt-0.mb-0 > .appointment-side-panel__header-actions {
    padding-inline: 0;
}

.scrollable-Job .appointment-side-panel__job-header {
    margin-top: var(--ds-space-xs);
    margin-bottom: var(--ds-space-sm);
    padding-inline: var(--ds-space-2xs);
}

.scrollable-Job .appointment-side-panel__job-header .appointment-side-panel__job-number {
    margin-top: var(--ds-space-2xs);
    font-size: 14px;
    line-height: 1.35;
}

/* Appointment creation popup — scroll inside modal; footer pinned; selects unclipped */
.appointment-creation-modal__dialog {
    width: calc(100% - 2rem);
    max-width: min(1200px, calc(100vw - 2rem));
    margin: 1rem auto;
}

.appointment-creation-modal__content.modal-content.form-1200 {
    width: 100% !important;
    max-width: 1200px;
    left: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.appointment-creation-modal__body.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--ds-space-sm);
}

.appointment-creation-modal__body .white-bg,
.appointment-creation-modal__body .input-form,
.appointment-creation-modal__body table,
.appointment-creation-modal__body td,
.appointment-creation-modal__body tr {
    overflow: visible;
}

/* Company Location dropdown must stay fully visible/readable (long "Name - Address" text)
   without being clipped. Scoped to this select only so the compact Appointment Information
   time/duration dropdowns keep their original sizing. */
.appointment-creation-modal__body select#AutomativeFilm_LocationId {
    max-width: 100%;
    min-width: 200px;
}

.appointment-creation-modal .appointment-creation-modal__footer.modal-footer.buttons,
.appointment-creation-modal .appointment-creation-modal__footer.modal-footer.buttons--center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: var(--ds-btn-gap, 8px);
    flex-shrink: 0;
    width: 100%;
    margin-top: 0;
    padding: var(--ds-space-sm) var(--ds-space-toolbar-x);
    padding-bottom: max(var(--ds-space-sm), env(safe-area-inset-bottom, 0px));
}

.appointment-creation-modal .appointment-creation-modal__footer.modal-footer > .button,
.appointment-creation-modal .appointment-creation-modal__footer.modal-footer > button.button {
    margin: 0 !important;
    flex: 0 0 auto;
}

.appointment-creation-modal .appointment-creation-modal__footer.modal-footer > :not(:first-child),
.appointment-creation-modal .appointment-creation-modal__footer.modal-footer > :not(:last-child) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 992px) {
    .appointment-creation-modal .appointment-creation-modal__footer.modal-footer.buttons {
        flex-wrap: nowrap;
    }
}

@media (max-width: 991.98px) {
    .appointment-creation-modal__dialog {
        width: calc(100% - 1rem);
        max-width: calc(100vw - 1rem);
        margin: 0.5rem auto;
    }

    .appointment-creation-modal__content.modal-content.form-1200 {
        max-height: calc(100vh - 1rem);
    }

    .appointment-creation-modal .appointment-creation-modal__footer.modal-footer.buttons {
        justify-content: center;
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    }

    .appointment-creation-modal .appointment-creation-modal__footer.modal-footer .button {
        flex: 0 1 auto;
        min-width: min(100%, 10rem);
    }
}

body.modal-open:has(.appointment-creation-modal.show) {
    overflow: hidden !important;
    padding-right: 0 !important;
}

.job-category-save-indicator {
    display: none;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

.job-category-save-indicator.is-saving {
    color: var(--content-panel-text-muted, #6b7280);
}

.job-category-save-indicator.is-saved {
    color: #15803d;
}

.job-category-save-indicator.is-error {
    color: #b91c1c;
}
