/* Shared Tabler application component overrides.
 * Keep this stylesheet after tabler-theme.css and before command-palette.css.
 */

/* Global notifications use Tabler/Bootstrap toast components. */
.app-toast-container {
    z-index: 1090;
    max-width: calc(100vw - 1rem);
}

.app-toast-container .toast {
    max-width: calc(100vw - 2rem);
}

.app-toast-container .toast-body {
    overflow-wrap: anywhere;
}


/* JSON preview spacing; PrismJS supplies the syntax tokenization and theme colors. */
[data-json-format] {
    tab-size: 2;
}

[data-json-format] code[class*="language-json"] {
    font-family: var(--tblr-font-monospace);
    font-size: inherit;
    line-height: inherit;
    text-shadow: none;
}


/* Long-form Product documentation rendered from sanitized Markdown. */
.product-documentation {
    overflow-wrap: anywhere;
    line-height: 1.7;
}

.product-documentation > :first-child {
    margin-top: 0;
}

.product-documentation > :last-child {
    margin-bottom: 0;
}

.product-documentation pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 0.75rem;
    border-radius: var(--tblr-border-radius);
    background: var(--tblr-secondary-bg);
    color: var(--tblr-body-color);
}

.product-documentation img {
    max-width: 100%;
    height: auto;
}

.product-documentation > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}


/* Fixed environment ribbon shown in development and test only. */
.environment-ribbon {
    z-index: 1035;
    display: flex;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    line-height: 1.1;
    letter-spacing: 0.025em;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgb(0 0 0 / 18%);
}

body.has-environment-ribbon .page-wrapper {
    padding-top: 2rem;
}

body.has-environment-ribbon .navbar-vertical.navbar-expand-lg {
    top: 2rem;
}

body.has-environment-ribbon .app-toast-container {
    top: 2rem !important;
}

@media print {
    .environment-ribbon {
        display: none !important;
    }

    body.has-environment-ribbon .page-wrapper {
        padding-top: 0;
    }
}

.dashboard-chart {
    min-height: 18rem;
}

/* Consistent sidebar brand layout across desktop, folded and mobile navigation. */
.sidebar-header {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.navbar-vertical.navbar-expand-lg .sidebar-header .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    overflow: visible!important;
    text-decoration: none;
}

.sidebar-brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    max-width: initial;
}

.sidebar-brand-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    min-width: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-brand-name {
    width: auto;
    overflow: visible;
    opacity: 1;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.sidebar-brand-product {
    width: auto;
    overflow: visible;
    opacity: 1;
    color: var(--tblr-secondary-color) !important;
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .sidebar-header {
        padding: 0.5rem 0.75rem;
    }

    .navbar-vertical.navbar-expand-lg .sidebar-header .sidebar-brand {
        padding: 0;
    }
}

._hiper-api-nav-section-title-fix {
    display: none;
}
._hiper-api-nav-section-title-fix + .nav-section-title {
    margin-top: 0!important;
}

.card .table-responsive:not(:first-child) .card-table thead tr th:first-child,
.card .table-responsive:not(:first-child) .card-table thead tr th:last-child {
    --tblr-card-border-radius: 0;
}
.card .table-responsive .card-table.table-hover tbody:not(:first-child) tr td:first-child,
.card .table-responsive .card-table.table-hover tbody:not(:first-child) tr td:last-child {
    border-start-start-radius: 0;
    border-start-end-radius: 0;
}
.card .table-responsive:not(:last-child) .card-table.table-hover tbody tr td:first-child,
.card .table-responsive:not(:last-child) .card-table.table-hover tbody tr td:last-child {
    border-end-start-radius: 0;
    border-end-end-radius: 0;
}


.public-brand-logo {
    display: block;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}


/* Keep page headings visually balanced without changing their typography. */
.page-title {
    text-wrap: balance;
}
