/* SW layout & spacing utilities (Bootstrap-independent). Load after inter.css + bootstrap-reboot; pairs with site.css. */

:root {
    --sw-u-spacer-0: 0;
    --sw-u-spacer-1: 0.25rem;
    --sw-u-spacer-2: 0.5rem;
    --sw-u-spacer-3: 1rem;
    --sw-u-spacer-4: 1.5rem;
    --sw-u-spacer-5: 3rem;
}

/* ——— Display & flex ——— */
.sw-none { display: none !important; }
.sw-block { display: block !important; }
.sw-inline { display: inline !important; }
.sw-inline-block { display: inline-block !important; }
.sw-flex { display: flex !important; }
.sw-inline-flex { display: inline-flex !important; }

.sw-flex-row { flex-direction: row !important; }
.sw-flex-column { flex-direction: column !important; }
.sw-flex-wrap { flex-wrap: wrap !important; }
.sw-flex-nowrap { flex-wrap: nowrap !important; }
.sw-grow-1 { flex-grow: 1 !important; }
.sw-shrink-0 { flex-shrink: 0 !important; }

.sw-items-start { align-items: flex-start !important; }
.sw-items-center { align-items: center !important; }
.sw-items-end { align-items: flex-end !important; }
.sw-items-stretch { align-items: stretch !important; }

.sw-justify-start { justify-content: flex-start !important; }
.sw-justify-center { justify-content: center !important; }
.sw-justify-end { justify-content: flex-end !important; }
.sw-justify-between { justify-content: space-between !important; }
.sw-justify-around { justify-content: space-around !important; }

@media (min-width: 576px) {
    .sw-justify-sm-start { justify-content: flex-start !important; }
}

.sw-gap-0 { gap: var(--sw-u-spacer-0) !important; }
.sw-gap-1 { gap: var(--sw-u-spacer-1) !important; }
.sw-gap-2 { gap: var(--sw-u-spacer-2) !important; }
.sw-gap-3 { gap: var(--sw-u-spacer-3) !important; }
.sw-gap-4 { gap: var(--sw-u-spacer-4) !important; }
.sw-gap-5 { gap: var(--sw-u-spacer-5) !important; }

/* ——— Sizing & text ——— */
.sw-w-full { width: 100% !important; }
.sw-w-fit { width: fit-content !important; }
.sw-h-full { height: 100% !important; }
.sw-text-center { text-align: center !important; }
.sw-text-end { text-align: end !important; }
.sw-text-start { text-align: start !important; }

/* ——— Margin ——— */
.sw-m-0 { margin: 0 !important; }
.sw-m-1 { margin: var(--sw-u-spacer-1) !important; }
.sw-m-2 { margin: var(--sw-u-spacer-2) !important; }
.sw-m-3 { margin: var(--sw-u-spacer-3) !important; }
.sw-m-4 { margin: var(--sw-u-spacer-4) !important; }
.sw-m-5 { margin: var(--sw-u-spacer-5) !important; }

.sw-mt-0 { margin-top: 0 !important; }
.sw-mt-1 { margin-top: var(--sw-u-spacer-1) !important; }
.sw-mt-2 { margin-top: var(--sw-u-spacer-2) !important; }
.sw-mt-3 { margin-top: var(--sw-u-spacer-3) !important; }
.sw-mt-4 { margin-top: var(--sw-u-spacer-4) !important; }
.sw-mt-5 { margin-top: var(--sw-u-spacer-5) !important; }

.sw-mb-0 { margin-bottom: 0 !important; }
.sw-mb-1 { margin-bottom: var(--sw-u-spacer-1) !important; }
.sw-mb-2 { margin-bottom: var(--sw-u-spacer-2) !important; }
.sw-mb-3 { margin-bottom: var(--sw-u-spacer-3) !important; }
.sw-mb-4 { margin-bottom: var(--sw-u-spacer-4) !important; }
.sw-mb-5 { margin-bottom: var(--sw-u-spacer-5) !important; }

.sw-ms-0 { margin-inline-start: 0 !important; }
.sw-ms-1 { margin-inline-start: var(--sw-u-spacer-1) !important; }
.sw-ms-2 { margin-inline-start: var(--sw-u-spacer-2) !important; }
.sw-ms-3 { margin-inline-start: var(--sw-u-spacer-3) !important; }

.sw-me-0 { margin-inline-end: 0 !important; }
.sw-me-1 { margin-inline-end: var(--sw-u-spacer-1) !important; }
.sw-me-2 { margin-inline-end: var(--sw-u-spacer-2) !important; }
.sw-me-3 { margin-inline-end: var(--sw-u-spacer-3) !important; }

.sw-mx-auto { margin-left: auto !important; margin-right: auto !important; }
.sw-ms-auto { margin-inline-start: auto !important; }
.sw-me-auto { margin-inline-end: auto !important; }

.sw-mb-sm { margin-bottom: var(--sw-u-spacer-2) !important; }

/* ——— Padding ——— */
.sw-p-0 { padding: 0 !important; }
.sw-p-1 { padding: var(--sw-u-spacer-1) !important; }
.sw-p-2 { padding: var(--sw-u-spacer-2) !important; }
.sw-p-3 { padding: var(--sw-u-spacer-3) !important; }
.sw-p-4 { padding: var(--sw-u-spacer-4) !important; }
.sw-p-5 { padding: var(--sw-u-spacer-5) !important; }

.sw-pt-0 { padding-top: 0 !important; }
.sw-pt-1 { padding-top: var(--sw-u-spacer-1) !important; }
.sw-pt-2 { padding-top: var(--sw-u-spacer-2) !important; }
.sw-pt-3 { padding-top: var(--sw-u-spacer-3) !important; }
.sw-pt-4 { padding-top: var(--sw-u-spacer-4) !important; }

.sw-pb-0 { padding-bottom: 0 !important; }
.sw-pb-1 { padding-bottom: var(--sw-u-spacer-1) !important; }
.sw-pb-2 { padding-bottom: var(--sw-u-spacer-2) !important; }
.sw-pb-3 { padding-bottom: var(--sw-u-spacer-3) !important; }
.sw-pb-4 { padding-bottom: var(--sw-u-spacer-4) !important; }

.sw-ps-0 { padding-inline-start: 0 !important; }
.sw-ps-1 { padding-inline-start: var(--sw-u-spacer-1) !important; }
.sw-ps-2 { padding-inline-start: var(--sw-u-spacer-2) !important; }
.sw-ps-3 { padding-inline-start: var(--sw-u-spacer-3) !important; }
.sw-ps-4 { padding-inline-start: var(--sw-u-spacer-4) !important; }

.sw-pe-0 { padding-inline-end: 0 !important; }
.sw-pe-1 { padding-inline-end: var(--sw-u-spacer-1) !important; }
.sw-pe-2 { padding-inline-end: var(--sw-u-spacer-2) !important; }

.sw-px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.sw-px-1 { padding-left: var(--sw-u-spacer-1) !important; padding-right: var(--sw-u-spacer-1) !important; }
.sw-px-2 { padding-left: var(--sw-u-spacer-2) !important; padding-right: var(--sw-u-spacer-2) !important; }
.sw-px-3 { padding-left: var(--sw-u-spacer-3) !important; padding-right: var(--sw-u-spacer-3) !important; }

.sw-py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.sw-py-1 { padding-top: var(--sw-u-spacer-1) !important; padding-bottom: var(--sw-u-spacer-1) !important; }
.sw-py-2 { padding-top: var(--sw-u-spacer-2) !important; padding-bottom: var(--sw-u-spacer-2) !important; }
.sw-py-3 { padding-top: var(--sw-u-spacer-3) !important; padding-bottom: var(--sw-u-spacer-3) !important; }
.sw-py-4 { padding-top: var(--sw-u-spacer-4) !important; padding-bottom: var(--sw-u-spacer-4) !important; }

.sw-my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.sw-my-1 { margin-top: var(--sw-u-spacer-1) !important; margin-bottom: var(--sw-u-spacer-1) !important; }
.sw-my-2 { margin-top: var(--sw-u-spacer-2) !important; margin-bottom: var(--sw-u-spacer-2) !important; }
.sw-my-3 { margin-top: var(--sw-u-spacer-3) !important; margin-bottom: var(--sw-u-spacer-3) !important; }
.sw-my-4 { margin-top: var(--sw-u-spacer-4) !important; margin-bottom: var(--sw-u-spacer-4) !important; }
.sw-my-5 { margin-top: var(--sw-u-spacer-5) !important; margin-bottom: var(--sw-u-spacer-5) !important; }

.sw-mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.sw-mx-1 { margin-left: var(--sw-u-spacer-1) !important; margin-right: var(--sw-u-spacer-1) !important; }
.sw-mx-2 { margin-left: var(--sw-u-spacer-2) !important; margin-right: var(--sw-u-spacer-2) !important; }
.sw-mx-3 { margin-left: var(--sw-u-spacer-3) !important; margin-right: var(--sw-u-spacer-3) !important; }

.sw-ms-4 { margin-inline-start: var(--sw-u-spacer-4) !important; }
.sw-me-4 { margin-inline-end: var(--sw-u-spacer-4) !important; }

.sw-overflow-auto { overflow: auto !important; }
.sw-overflow-hidden { overflow: hidden !important; }

/* ——— Minimal grid (Bootstrap row/col replacement) ——— */
.sw-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--sw-u-spacer-2) * -1);
    margin-right: calc(var(--sw-u-spacer-2) * -1);
}
.sw-row > * {
    padding-left: var(--sw-u-spacer-2);
    padding-right: var(--sw-u-spacer-2);
}
.sw-row-cols-auto > * {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}
.sw-g-3 {
    --sw-row-gutter: var(--sw-u-spacer-3);
    margin-left: calc(var(--sw-row-gutter) * -0.5);
    margin-right: calc(var(--sw-row-gutter) * -0.5);
}
.sw-g-3 > * {
    padding-left: calc(var(--sw-row-gutter) * 0.5);
    padding-right: calc(var(--sw-row-gutter) * 0.5);
}
.sw-g-2 {
    --sw-row-gutter: var(--sw-u-spacer-2);
    margin-left: calc(var(--sw-row-gutter) * -0.5);
    margin-right: calc(var(--sw-row-gutter) * -0.5);
}
.sw-g-2 > * {
    padding-left: calc(var(--sw-row-gutter) * 0.5);
    padding-right: calc(var(--sw-row-gutter) * 0.5);
}
.sw-g-4 {
    --sw-row-gutter: var(--sw-u-spacer-4);
    margin-left: calc(var(--sw-row-gutter) * -0.5);
    margin-right: calc(var(--sw-row-gutter) * -0.5);
}
.sw-g-4 > * {
    padding-left: calc(var(--sw-row-gutter) * 0.5);
    padding-right: calc(var(--sw-row-gutter) * 0.5);
}
.sw-col { flex: 1 0 0%; }
.sw-col-auto { flex: 0 0 auto; width: auto; }
.sw-col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.sw-col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.sw-col-3 { flex: 0 0 25%; max-width: 25%; }
.sw-col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.sw-col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.sw-col-6 { flex: 0 0 50%; max-width: 50%; }
.sw-col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.sw-col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.sw-col-9 { flex: 0 0 75%; max-width: 75%; }
.sw-col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.sw-col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.sw-col-12 { flex: 0 0 100%; max-width: 100%; }

/* Horizontal form label (Bootstrap col-form-label + sw- migration) */
.sw-col-form-label,
.col-form-label {
    padding-top: calc(0.375rem + 1px);
    padding-bottom: calc(0.375rem + 1px);
    margin-bottom: 0;
    font-size: inherit;
    line-height: 1.5;
}
@media (min-width: 576px) {
    .sw-col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .sw-col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .sw-col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 768px) {
    .sw-col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .sw-col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .sw-col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .sw-col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .sw-col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .sw-col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .sw-col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .sw-col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .sw-col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .sw-col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .sw-col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .sw-col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 992px) {
    .sw-col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .sw-col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .sw-col-lg-6 { flex: 0 0 50%; max-width: 50%; }
}

/* ——— Legacy Bootstrap-named helpers (until markup migrated) ——— */
.text-muted { color: var(--sw-gray-500, #6b7280) !important; }

.w-100 { width: 100% !important; }
.align-self-center { align-self: center !important; }
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.small { font-size: 0.875em !important; }
.fw-bold { font-weight: 600 !important; }
.font-weight-bold { font-weight: 600 !important; }

.card {
    background: #fff;
    border: 1px solid var(--sw-gray-200, #e5e7eb);
    border-radius: 0.375rem;
    box-sizing: border-box;
}
.card-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--sw-gray-200, #e5e7eb);
    background: var(--sw-gray-50, #f9fafb);
    box-sizing: border-box;
}
.card-body { padding: 1rem; box-sizing: border-box; }
.card-title { margin: 0; font-size: 1.125rem; }

.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: 0.375rem;
    list-style: none;
}
.list-group-item {
    position: relative;
    padding: 0.75rem 1rem;
    border: 1px solid var(--sw-gray-200, #e5e7eb);
    border-bottom-width: 0;
    background: #fff;
    box-sizing: border-box;
}
.list-group-item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.list-group-item:last-child { border-bottom-width: 1px; border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

.border { border: 1px solid var(--sw-gray-200, #e5e7eb) !important; }
.rounded { border-radius: 0.375rem !important; }

.min-width-zero { min-width: 0 !important; }
.font-size-14px { font-size: 14px !important; }

/* ——— Modal / misc (Blazored + legacy markup) ——— */
.modal-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}