.ar-page {
    margin-top: 0 !important;
    background: white;
    min-width: 625px !important;
}

.xbrl-elem-name {
    max-width: 220px;
    overflow: auto;
}

.grid-item,
.item-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure it fills the grid cell */
    overflow: hidden;
    /* Prevent double scrollbars */
}

/* .grid-item-work reserved for future tweaks */

.item-header {
    flex: 0 0 auto;
    /* ...existing code... */
}

.item-body {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    /* Important for flex children to allow shrinking */
}

.item-body {
    flex: 1 1 auto;
    overflow: auto;
    max-height: 90vh;
    /* Limit height to viewport */
    min-height: 0;
    /* Important for flex children to allow shrinking */
}

#main-navbar {
    padding: 0;
}

#logo {
    height: 26px;
}

#logo-container {
    width: 26px;
    overflow: hidden;
    padding-top: 4px;
}

#audit-dev-tools {
    left: 1rem;
    right: auto;
    bottom: -.7rem;
    z-index: 2;
    position: absolute;
    background: white;
    border-radius: 1rem;
    outline: 1px solid rgba(0, 0, 0, 0.1);
    padding: .2rem;
    font-size: 0.7rem;
}

#audit-workspace {
    height: 98vh;
    display: grid;
    grid-template-columns: min-content minmax(680px, 1fr) minmax(400px, 1fr);
    grid-gap: .8rem;
    padding: .8rem;
    background: #edf1f2;
}

.ixbrl-report .ar-page {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.offcanvas {
    display: none;
}

.offcanvas.show {
    display: flex;
}

/* Loading document effect for iXBRL container */
.report-loading {
    position: relative;
    display: grid;
    place-items: top;
    overflow: hidden;
    border-radius: .5rem;
    min-height: 100vh;
}

.item-body:has(.report-loading) {
    overflow: hidden;
}

/* Shimmer sweep */
.report-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.75) 45%,
            rgba(255, 255, 255, 0) 90%);
    transform: translateX(-100%);
    animation: report-loading-shimmer 1.25s linear infinite;
    pointer-events: none;
}

.report-loading svg,
.report-loading img {
    display: block;
    max-width: 100%;
    height: auto;
    opacity: .8;
    filter: grayscale(0.2) contrast(0.95) brightness(1.02);
}

@keyframes report-loading-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .report-loading::after {
        animation: none;
    }
}

/* Fade-in effect when iXBRL report is added to the audit view */
.ix-report-body > .ixbrl-report-wrapper {
    opacity: 0;
    animation: ixbrl-fade-in 220ms ease-out forwards;
}

@keyframes ixbrl-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .ix-report-body > .ixbrl-report-wrapper {
        animation: none;
        opacity: 1;
    }
}