/* Isolated Bootstrap compatibility for platform-owned TGX modals. */

.tgx-system-modal,
.tgx-system-modal * {
    box-sizing: border-box;
}

.tgx-system-modal {
    --tgx-modal-z: 2147482500;
    --tgx-modal-width: 500px;
    --tgx-modal-gutter: 1.75rem;
    position: fixed;
    inset: 0;
    z-index: var(--tgx-modal-z);
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    color: var(--brand-graphite, #2d3235);
    font-family: var(--font-family-ui, system-ui, sans-serif);
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
}

.tgx-system-modal.show {
    display: block;
}

.tgx-system-modal.tgx-modal-nonblocking {
    pointer-events: none;
}

.tgx-system-modal.tgx-modal-fade {
    transition: opacity .15s linear;
}

.tgx-system-modal.tgx-modal-fade:not(.show) {
    opacity: 0;
}

.tgx-system-modal .tgx-modal-dialog {
    position: relative;
    width: auto;
    max-width: var(--tgx-modal-width);
    margin: .5rem auto;
    pointer-events: none;
    transition: transform .2s ease-out, opacity .2s ease-out;
    transform: translateY(-.75rem) scale(.985);
    opacity: 0;
}

.tgx-system-modal.show .tgx-modal-dialog {
    transform: none;
    opacity: 1;
}

/* Edge-attached tool panels. Combine tgx-modal-aside with exactly one direction. */
.tgx-system-modal.tgx-modal-aside {
    --tgx-aside-inline-size: min(30rem, calc(100vw - 2rem));
    --tgx-aside-block-size: min(30rem, calc(100dvh - 2rem));
    overflow: hidden;
}

.tgx-system-modal.tgx-modal-aside .tgx-modal-dialog {
    position: absolute;
    display: flex;
    min-width: 0;
    min-height: 0;
    margin: 0;
    max-width: none;
    transition: transform .15s ease-out;
}

.tgx-system-modal.tgx-modal-aside .tgx-modal-dialog > * {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
    scrollbar-gutter: stable;
}

.tgx-system-modal.tgx-modal-aside-left .tgx-modal-dialog,
.tgx-system-modal.tgx-modal-aside-right .tgx-modal-dialog {
    top: 0;
    bottom: 0;
    width: var(--tgx-aside-inline-size);
    height: 100%;
}

.tgx-system-modal.tgx-modal-aside-left .tgx-modal-dialog {
    left: 0;
}

.tgx-system-modal.tgx-modal-aside-right .tgx-modal-dialog {
    right: 0;
}

.tgx-system-modal.tgx-modal-aside-top .tgx-modal-dialog,
.tgx-system-modal.tgx-modal-aside-bottom .tgx-modal-dialog {
    right: 0;
    left: 0;
    width: 100%;
    height: var(--tgx-aside-block-size);
}

.tgx-system-modal.tgx-modal-aside-top .tgx-modal-dialog {
    top: 0;
}

.tgx-system-modal.tgx-modal-aside-bottom .tgx-modal-dialog {
    bottom: 0;
}

.tgx-system-modal.tgx-modal-aside-left.tgx-modal-fade:not(.show) .tgx-modal-dialog {
    transform: translate3d(-100%, 0, 0);
}

.tgx-system-modal.tgx-modal-aside-right.tgx-modal-fade:not(.show) .tgx-modal-dialog {
    transform: translate3d(100%, 0, 0);
}

.tgx-system-modal.tgx-modal-aside-top.tgx-modal-fade:not(.show) .tgx-modal-dialog {
    transform: translate3d(0, -100%, 0);
}

.tgx-system-modal.tgx-modal-aside-bottom.tgx-modal-fade:not(.show) .tgx-modal-dialog {
    transform: translate3d(0, 100%, 0);
}

.tgx-system-modal .tgx-modal-dialog-centered {
    display: flex;
    min-height: calc(100% - 1rem);
    align-items: center;
}

.tgx-system-modal .tgx-modal-sm {
    --tgx-modal-width: 300px;
}

.tgx-system-modal .tgx-modal-lg,
.tgx-system-modal .tgx-modal-xl {
    --tgx-modal-width: 800px;
}

.tgx-system-modal .tgx-modal-dialog > * {
    max-width: 100%;
    pointer-events: auto;
}

/* Canonical Tagix modal surface shared by generated and static dialogs. */
.tgx-system-modal .tgx-modal-surface {
    position: relative;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--tgx-modal-border, rgba(45, 50, 53, .14));
    border-radius: var(--tgx-modal-radius, 1rem);
    color: var(--brand-graphite, #2d3235);
    background: var(--tgx-modal-surface, #fff);
    box-shadow: var(--tgx-modal-shadow, 0 1.5rem 4rem rgba(5, 24, 50, .24));
}

.tgx-system-modal.tgx-modal-aside .tgx-modal-surface {
    border-radius: 0;
}

.tgx-system-modal.tgx-modal-aside-left .tgx-modal-surface {
    border-block: 0;
    border-left: 0;
    box-shadow: var(--tgx-modal-shadow-aside-left, .9rem 0 2.75rem rgba(2, 29, 76, .2));
}

.tgx-system-modal.tgx-modal-aside-right .tgx-modal-surface {
    border-block: 0;
    border-right: 0;
    box-shadow: var(--tgx-modal-shadow-aside-right, -.9rem 0 2.75rem rgba(2, 29, 76, .2));
}

.tgx-system-modal.tgx-modal-aside-top .tgx-modal-surface {
    border-top: 0;
    border-inline: 0;
    box-shadow: var(--tgx-modal-shadow-aside-top, 0 .9rem 2.75rem rgba(2, 29, 76, .2));
}

.tgx-system-modal.tgx-modal-aside-bottom .tgx-modal-surface {
    border-bottom: 0;
    border-inline: 0;
    box-shadow: var(--tgx-modal-shadow-aside-bottom, 0 -.9rem 2.75rem rgba(2, 29, 76, .2));
}

.tgx-system-modal .tgx-modal-header,
.tgx-system-modal .tgx-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--brand-graphite, #2d3235);
    background: var(--tgx-modal-surface, #fff);
}

.tgx-system-modal .tgx-modal-title {
    margin: 0;
    color: var(--brand-graphite, #2d3235);
    font-family: var(--font-family-ui, system-ui, sans-serif);
    font-weight: 700;
    letter-spacing: -.015em;
}

.tgx-system-modal .tgx-modal-subtitle {
    margin: .25rem 0 0;
    color: #68727c;
    font-size: .875rem;
    line-height: 1.45;
}

.tgx-system-modal .tgx-modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

/* Retire the legacy glass card inside system modals while preserving it elsewhere. */
.tgx-system-modal .tgx-box-container-blur {
    border: 1px solid var(--tgx-modal-border, rgba(45, 50, 53, .14));
    border-radius: var(--tgx-modal-radius, 1rem);
    color: var(--brand-graphite, #2d3235);
    background: var(--tgx-modal-surface, #fff);
    box-shadow: var(--tgx-modal-shadow, 0 1.5rem 4rem rgba(5, 24, 50, .24));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.tgx-system-modal .tgx-box-container-blur a {
    color: var(--brand-primary, #386dec);
}

.tgx-system-modal .tgx-box-container-blur code {
    color: #4b5670;
}

/* Compact alert, confirmation, and prompt dialogs. */
.tgx-system-modal .tgx-modal-message-surface {
    gap: 0;
    max-width: 34rem;
}

.tgx-system-modal .tgx-modal-message-header {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding-right: 3rem;
}

.tgx-system-modal .tgx-modal-message-icon {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    margin: 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--brand-primary, #386dec);
}

.tgx-system-modal .tgx-modal-message-header:has(> .tgx-modal-message-icon.tgx-icon-exclamation-triangle) {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: .65rem;
}

.tgx-system-modal .tgx-modal-message-icon.tgx-icon-exclamation-triangle {
    width: 2.25rem;
    height: 2.25rem;
}

.tgx-system-modal .tgx-modal-message-title {
    min-width: 0;
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    line-height: 1.2;
    color: var(--brand-graphite, #2d3235);
}

.tgx-system-modal .tgx-modal-message-body {
    justify-content: flex-start;
    width: 100%;
    padding: 1rem 0 1.25rem;
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: left;
}

.tgx-system-modal .tgx-modal-message-body .form-label {
    color: var(--brand-graphite, #2d3235);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: none;
}

.tgx-system-modal .tgx-modal-message-footer {
    gap: .75rem;
    width: 100%;
}

.tgx-system-modal .tgx-modal-message-action {
    flex: 1 1 6.5rem;
    max-width: 9rem;
    min-width: 0;
    min-height: 2.75rem;
    padding: .65rem 1.1rem !important;
    border-radius: .7rem !important;
    line-height: 1.25 !important;
}

.tgx-system-modal .tgx-btn-light,
.tgx-system-modal .btn-light,
.tgx-system-modal .btn-outline-secondary,
.tgx-system-modal .panel-page-inspector-cancel {
    border: 1px solid var(--brand-primary, #386dec) !important;
    color: var(--brand-primary, #386dec) !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.tgx-system-modal .tgx-btn-light:not(:disabled):hover,
.tgx-system-modal .btn-light:not(:disabled):hover,
.tgx-system-modal .btn-outline-secondary:not(:disabled):hover,
.tgx-system-modal .panel-page-inspector-cancel:not(:disabled):hover {
    border-color: #285bd3 !important;
    color: #285bd3 !important;
    background: rgba(56, 109, 236, .08) !important;
}

.tgx-system-modal .tgx-btn-light:focus-visible,
.tgx-system-modal .btn-light:focus-visible,
.tgx-system-modal .btn-outline-secondary:focus-visible,
.tgx-system-modal .panel-page-inspector-cancel:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(56, 109, 236, .2) !important;
}

.tgx-system-modal .tgx-btn-light:disabled,
.tgx-system-modal .btn-light:disabled,
.tgx-system-modal .btn-outline-secondary:disabled,
.tgx-system-modal .panel-page-inspector-cancel:disabled {
    opacity: .55;
}

.tgx-system-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147482400;
    width: 100vw;
    height: 100vh;
    background: var(--tgx-modal-scrim, rgba(5, 24, 50, .38));
    -webkit-backdrop-filter: var(--tgx-modal-scrim-filter, blur(2px));
    backdrop-filter: var(--tgx-modal-scrim-filter, blur(2px));
    transition: opacity .16s linear;
}

.tgx-system-modal-backdrop.tgx-modal-fade {
    opacity: 0;
}

.tgx-system-modal-backdrop.show {
    opacity: 1;
}

.tgx-system-modal-backdrop.tgx-system-modal-backdrop-aside.show {
    opacity: .72;
}

.tgx-system-modal-backdrop.tgx-system-modal-backdrop-nonblocking {
    pointer-events: none;
}

/* Scoped utilities used by the canonical system modal templates. */
.tgx-system-modal .position-relative {
    position: relative !important;
}

.tgx-system-modal .position-absolute {
    position: absolute !important;
}

.tgx-system-modal .sticky-top {
    position: sticky !important;
    top: 0;
}

.tgx-system-modal .sticky-bottom {
    position: sticky !important;
    bottom: 0;
}

.tgx-system-modal .top-0 {
    top: 0 !important;
}

.tgx-system-modal .end-0 {
    right: 0 !important;
}

.tgx-system-modal .z-index-1 {
    z-index: 1 !important;
}

.tgx-system-modal .d-flex {
    display: flex !important;
}

.tgx-system-modal .d-inline-flex {
    display: inline-flex !important;
}

.tgx-system-modal .d-none {
    display: none !important;
}

.tgx-system-modal .flex-column {
    flex-direction: column !important;
}

.tgx-system-modal .flex-wrap {
    flex-wrap: wrap !important;
}

.tgx-system-modal .flex-grow-1 {
    flex-grow: 1 !important;
}

.tgx-system-modal .align-items-center {
    align-items: center !important;
}

.tgx-system-modal .justify-content-center {
    justify-content: center !important;
}

.tgx-system-modal .justify-content-end {
    justify-content: flex-end !important;
}

.tgx-system-modal .w-100 {
    width: 100% !important;
}

.tgx-system-modal .h-100 {
    height: 100% !important;
}

.tgx-system-modal .overflow-auto {
    overflow: auto !important;
}

.tgx-system-modal .text-end {
    text-align: right !important;
}

.tgx-system-modal .text-nowrap {
    white-space: nowrap !important;
}

.tgx-system-modal .text-truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tgx-system-modal .align-middle {
    vertical-align: middle !important;
}

.tgx-system-modal .bg-transparent {
    background: transparent !important;
}

.tgx-system-modal .bg-light {
    background: #f8f9fa !important;
}

.tgx-system-modal .text-white {
    color: #fff !important;
}

.tgx-system-modal .text-muted {
    color: #6c757d !important;
}

.tgx-system-modal .text-danger,
.tgx-system-modal .link-danger {
    color: #dc3545 !important;
}

.tgx-system-modal .link-primary {
    color: #0d6efd !important;
}

.tgx-system-modal .link-success {
    color: #198754 !important;
}

.tgx-system-modal .link-info {
    color: #0dcaf0 !important;
}

.tgx-system-modal .small {
    font-size: .875em !important;
}

.tgx-system-modal .lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.tgx-system-modal .rounded {
    border-radius: .375rem !important;
}

.tgx-system-modal .border {
    border: 1px solid #dee2e6 !important;
}

.tgx-system-modal .border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.tgx-system-modal .container-fluid {
    width: 100%;
    padding-inline: .75rem;
}

.tgx-system-modal .m-0 {
    margin: 0 !important;
}

.tgx-system-modal .m-3 {
    margin: 1rem !important;
}

.tgx-system-modal .mt-4 {
    margin-top: 1.5rem !important;
}

.tgx-system-modal .mb-4 {
    margin-bottom: 1.5rem !important;
}

.tgx-system-modal .my-2 {
    margin-block: .5rem !important;
}

.tgx-system-modal .my-3 {
    margin-block: 1rem !important;
}

.tgx-system-modal .ms-1 {
    margin-left: .25rem !important;
}

.tgx-system-modal .ms-2 {
    margin-left: .5rem !important;
}

.tgx-system-modal .ms-4 {
    margin-left: 1.5rem !important;
}

.tgx-system-modal .me-2 {
    margin-right: .5rem !important;
}

.tgx-system-modal .px-3 {
    padding-inline: 1rem !important;
}

.tgx-system-modal .pb-3 {
    padding-bottom: 1rem !important;
}

.tgx-system-modal .gap-1 {
    gap: .25rem !important;
}

.tgx-system-modal .gap-2 {
    gap: .5rem !important;
}

.tgx-system-modal .gap-3 {
    gap: 1rem !important;
}

.tgx-system-modal .gap-4 {
    gap: 1.5rem !important;
}

.tgx-system-modal h3 {
    margin-top: 0;
    font-size: calc(1.3rem + .6vw);
    line-height: 1.2;
}

.tgx-system-modal table {
    caption-side: bottom;
    border-collapse: collapse;
}

.tgx-system-modal button,
.tgx-system-modal input,
.tgx-system-modal select,
.tgx-system-modal textarea {
    margin: 0;
    font: inherit;
}

.tgx-system-modal button {
    cursor: pointer;
}

.tgx-system-modal .form-label {
    display: inline-block;
    margin-bottom: .5rem;
}

.tgx-system-modal .form-control,
.tgx-system-modal .form-select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: .375rem .75rem;
    color: var(--brand-graphite, #2d3235);
    background-color: #fff;
    border: 1px solid rgba(var(--brand-graphite-rgb, 45, 50, 53), .2);
    border-radius: .65rem;
    box-shadow: none;
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.tgx-system-modal .form-select {
    padding-right: 2.25rem;
    background-image: linear-gradient(45deg, transparent 50%, #6c757d 50%), linear-gradient(135deg, #6c757d 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.tgx-system-modal .form-control:focus,
.tgx-system-modal .form-select:focus {
    border-color: var(--brand-primary, #386dec);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(var(--brand-primary-rgb, 56, 109, 236), .14);
}

.tgx-system-modal textarea.form-control {
    min-height: calc(1.5em + .75rem + 2px);
}

.tgx-system-modal .collapse:not(.show) {
    display: none;
}

.tgx-system-modal .collapsing {
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}

/* Record and DOM editor forms use the same branded header/body/footer and semantic grid rows. */
.tgx-system-modal .tgx-modal-editor-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    color: var(--brand-graphite, #2d3235);
}

.tgx-system-modal .tgx-modal-editor-header {
    flex: 0 0 auto;
    padding: 1.5rem 4.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--tgx-modal-border, rgba(45, 50, 53, .14));
    background: var(--tgx-modal-surface, #fff);
}

.tgx-system-modal .tgx-modal-editor-header .tgx-modal-title {
    overflow: hidden;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.25;
    text-shadow: none;
}

.tgx-system-modal .tgx-modal-editor-body {
    min-width: 0;
    min-height: 0;
    padding: 1.25rem 1.5rem;
    background: var(--tgx-modal-surface, #fff);
    scrollbar-gutter: stable;
}

.tgx-system-modal .tgx-modal-editor-footer {
    flex: 0 0 auto;
    gap: .75rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--tgx-modal-border, rgba(45, 50, 53, .14));
    background: var(--tgx-modal-surface, #fff);
}

.tgx-system-modal .tgx-modal-editor-footer .tgx-btn-primary,
.tgx-system-modal .tgx-modal-editor-footer .tgx-btn-light {
    min-height: 2.65rem;
    border-radius: .75rem;
    box-shadow: none;
}

.tgx-system-modal .tgx-modal-record-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.tgx-system-modal .tgx-modal-record-layout,
.tgx-system-modal .tgx-modal-record-host,
.tgx-system-modal .tgx-modal-editor-content {
    min-height: 0;
}

.tgx-system-modal .tgx-modal-record-layout,
.tgx-system-modal .tgx-modal-editor-content {
    flex: 1 1 auto;
}

.tgx-system-modal .tgx-modal-record-scroll {
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.tgx-system-modal .tgx-modal-fields {
    display: grid;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.tgx-system-modal .tgx-modal-empty-fields {
    padding: 1rem;
    border: 1px solid var(--tgx-modal-border, rgba(45, 50, 53, .14));
    border-radius: .75rem;
    background: var(--tgx-modal-surface-soft, rgba(56, 109, 236, .1));
    color: var(--brand-graphite, #2d3235);
}

.tgx-system-modal .tgx-modal-empty-fields h4 {
    margin: 0 0 .75rem;
}

.tgx-system-modal .tgx-modal-empty-fields p {
    margin: .75rem 0;
}

.tgx-system-modal .tgx-modal-empty-fields code {
    overflow-wrap: anywhere;
    color: #4b5670;
}

.tgx-system-modal .tgx-modal-field {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.tgx-system-modal .tgx-modal-field-label {
    min-width: 0;
    justify-content: flex-end;
    padding-top: .5rem;
    color: var(--brand-graphite, #2d3235);
    background: none;
    background-clip: border-box;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
    text-align: right;
}

.tgx-system-modal .tgx-modal-field-label label,
.tgx-system-modal .tgx-modal-secondary-label {
    color: var(--brand-graphite, #2d3235) !important;
    background: none;
    background-clip: border-box;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
}

.tgx-system-modal .tgx-modal-field-control {
    width: 100%;
    min-width: 0;
}

.tgx-system-modal .tgx-modal-field-control .form-control,
.tgx-system-modal .tgx-modal-field-control .form-select,
.tgx-system-modal .tgx-modal-field-control textarea {
    width: 100%;
    box-shadow: none;
}

.tgx-system-modal .tgx-modal-field-control .CodeMirror {
    margin: 0;
    border: 1px solid rgba(var(--brand-graphite-rgb, 45, 50, 53), .16);
    border-radius: .75rem;
    box-shadow: none;
}

.tgx-system-modal .tgx-modal-field-control input[type="color"].form-control {
    min-height: 3rem;
    padding: .3rem;
    cursor: pointer;
}

.tgx-system-modal .tgx-modal-field-control input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.tgx-system-modal .tgx-modal-field-control input[type="color"]::-webkit-color-swatch,
.tgx-system-modal .tgx-modal-field-control input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: .3rem;
}

.tgx-system-modal .btn-toggle {
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: .25rem;
    border-radius: .25rem;
    background: #fff;
    box-shadow: 0 0 0 1px #dee2e6;
    transition: color .15s ease-in-out;
}
.tgx-system-modal .btn-toggle:hover {
    color: #212529;
}

.tgx-system-modal .tgx-modal-field.tgx-row-expanded {
    grid-template-columns: minmax(0, 1fr);
}

.tgx-system-modal .tgx-modal-field.tgx-row-expanded .tgx-modal-field-label {
    justify-content: flex-start;
    padding-top: 0;
    text-align: left;
}

.tgx-system-modal .tgx-modal-field .tgx-field-expanded {
    width: 100%;
}

.tgx-system-modal .tgx-modal-close,
.tgx-system-modal .tgx-modal-close-button {
    appearance: none;
    display: inline-grid;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 0;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(var(--brand-primary-rgb, 56, 109, 236), .3);
    border-radius: .65rem;
    color: var(--brand-primary, #386dec);
    background: var(--brand-white, #fff);
    box-shadow: none;
    cursor: pointer;
    opacity: 1;
    filter: none;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.tgx-system-modal .tgx-modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
}

.tgx-system-modal .tgx-modal-close-button::before,
.tgx-system-modal .tgx-modal-close-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 25%;
    width: 50%;
    height: 2px;
    background: currentColor;
}

.tgx-system-modal .tgx-modal-close-button::before {
    transform: rotate(45deg);
}

.tgx-system-modal .tgx-modal-close-button::after {
    transform: rotate(-45deg);
}

.tgx-system-modal .tgx-modal-close:hover,
.tgx-system-modal .tgx-modal-close:focus-visible,
.tgx-system-modal .tgx-modal-close-button:hover,
.tgx-system-modal .tgx-modal-close-button:focus-visible {
    border-color: var(--brand-primary, #386dec);
    color: var(--brand-white, #fff);
    background: var(--brand-primary, #386dec);
    outline: none;
}

@media (min-width: 576px) {
    .tgx-system-modal .tgx-modal-dialog {
        margin-block: var(--tgx-modal-gutter);
    }

    .tgx-system-modal .tgx-modal-dialog-centered {
        min-height: calc(100% - (var(--tgx-modal-gutter) * 2));
    }

    .tgx-system-modal .tgx-modal-fullscreen-sm-down {
        --tgx-modal-width: 800px;
    }
}

@media (min-width: 768px) {
    .tgx-system-modal .flex-md-row {
        flex-direction: row !important;
    }

    .tgx-system-modal .gap-md-3 {
        gap: 1rem !important;
    }

    .tgx-system-modal .tgx-modal-xl {
        --tgx-modal-width: 1140px;
    }
}

@media (max-width: 767.98px) {
    .tgx-system-modal .tgx-modal-field {
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
    }

    .tgx-system-modal .tgx-modal-field-label {
        justify-content: flex-start;
        padding-top: 0;
        text-align: left;
    }

    .tgx-system-modal .tgx-modal-record-dialog {
        margin: .25rem;
        min-height: calc(100% - .5rem);
    }

    .tgx-system-modal .tgx-modal-record-host {
        min-height: calc(100dvh - .5rem);
    }

    .tgx-system-modal .tgx-modal-editor-content {
        height: 100%;
        max-height: calc(100dvh - .5rem);
    }

    .tgx-system-modal .tgx-modal-editor-header {
        padding: 1.1rem 4rem .85rem 1rem;
    }

    .tgx-system-modal .tgx-modal-editor-body {
        padding: 1rem;
    }

    .tgx-system-modal .tgx-modal-editor-footer {
        align-items: stretch;
        padding: .85rem 1rem 1rem;
    }

    .tgx-system-modal .tgx-modal-editor-footer > div {
        justify-content: flex-end;
    }
}

@media (max-width: 575.98px) {
    .tgx-system-modal.tgx-modal-aside {
        --tgx-aside-inline-size: 100vw;
        --tgx-aside-block-size: min(85dvh, 42rem);
    }

    .tgx-system-modal .tgx-modal-fullscreen-sm-down {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tgx-system-modal.tgx-modal-fade,
    .tgx-system-modal .tgx-modal-dialog,
    .tgx-system-modal .form-control,
    .tgx-system-modal .form-select {
        transition: none;
    }
}
