/* /Components/Layout/MainLayout.razor.rz.scp.css */
#blazor-error-ui[b-08anmxwcx8] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-08anmxwcx8] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-nwlyf0ntvz],
.components-reconnect-repeated-attempt-visible[b-nwlyf0ntvz],
.components-reconnect-failed-visible[b-nwlyf0ntvz],
.components-pause-visible[b-nwlyf0ntvz],
.components-resume-failed-visible[b-nwlyf0ntvz],
.components-rejoining-animation[b-nwlyf0ntvz] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-retrying[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-failed[b-nwlyf0ntvz],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-nwlyf0ntvz] {
    display: block;
}


#components-reconnect-modal[b-nwlyf0ntvz] {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-nwlyf0ntvz 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-nwlyf0ntvz 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-nwlyf0ntvz 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-nwlyf0ntvz]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-nwlyf0ntvz 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-nwlyf0ntvz {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-nwlyf0ntvz {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-nwlyf0ntvz {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-nwlyf0ntvz] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-nwlyf0ntvz] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-nwlyf0ntvz] {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover[b-nwlyf0ntvz] {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active[b-nwlyf0ntvz] {
        background-color: #6b9ed2;
    }

.components-rejoining-animation[b-nwlyf0ntvz] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-nwlyf0ntvz] {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-nwlyf0ntvz 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-nwlyf0ntvz] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-nwlyf0ntvz {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
/* /Components/Pages/GaebViewer.razor.rz.scp.css */
/* Container */
.gaeb-viewer[b-jukcz6dooh] {
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.5;
    color: var(--mud-palette-text-primary);
    position: relative;
}

/* Header */
.gaeb-header[b-jukcz6dooh] {
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1100;
    padding-bottom: 8px;
}

.header-controls[b-jukcz6dooh] {
    display: flex;
    gap: 16px;
    align-items: center;
}


.view-controls[b-jukcz6dooh] {
    display: none;
    gap: 2px;
}

.view-btn[b-jukcz6dooh] {
    padding: 6px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 75px;
    transition: all 0.2s ease;
}

.view-btn:hover[b-jukcz6dooh] {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
}

.view-btn.active[b-jukcz6dooh] {
    background: var(--mud-palette-primary);
    color: white;
    border-color: var(--mud-palette-primary);
}

.view-btn.active:hover[b-jukcz6dooh] {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
}

.header-actions[b-jukcz6dooh] {
    display: flex;
    gap: 4px;
}

.action-btn[b-jukcz6dooh] {
    padding: 6px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.action-btn:hover[b-jukcz6dooh] {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
}

.action-icon[b-jukcz6dooh] {
    font-size: 16px;
    line-height: 1;
}

.action-text[b-jukcz6dooh] {
    font-weight: 500;
}

.icon-btn[b-jukcz6dooh] {
    width: 32px;
    height: 32px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.icon-btn:hover[b-jukcz6dooh] {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
}

.breadcrumb[b-jukcz6dooh] {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    margin-top: 4px;
}

/* Loading */
.loading-container[b-jukcz6dooh] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    gap: 16px;
}

/* Document */
.gaeb-document[b-jukcz6dooh] {
    flex: 1;
    overflow-y: auto;
    margin: auto;
    width: 100%;
}

/* Group Headers */
.group-header[b-jukcz6dooh] {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 16px;
    margin: 8px 0 8px 0;
    padding: 8px 8px;
    border-bottom: 2px solid var(--mud-palette-primary);
    font-weight: 600;
    font-size: 17px;
    align-items: baseline;
}

.group-number[b-jukcz6dooh] {
    color: var(--mud-palette-primary);
    text-align: left;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
}

.group-title[b-jukcz6dooh] {
    color: var(--mud-palette-text-primary);
}

.group-info[b-jukcz6dooh] {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    font-weight: normal;
    text-align: right;
}

/* Title Rows */
.title-row[b-jukcz6dooh] {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 16px;
    margin: 16px 0 8px 0;
    padding: 4px 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-weight: 500;
    font-size: 15px;
    align-items: baseline;
}

.title-number[b-jukcz6dooh] {
    color: var(--mud-palette-text-secondary);
    text-align: left;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.title-text[b-jukcz6dooh] {
    color: var(--mud-palette-text-primary);
}

/* Positions Block */
.positions-block[b-jukcz6dooh] {
    margin-bottom: 16px;
}

/* Position Row */
.position-row[b-jukcz6dooh] {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.position-row:hover[b-jukcz6dooh] {
    background: var(--mud-palette-action-default-hover);
}


/* Main Position Grid */
.pos-main[b-jukcz6dooh] {
    display: grid;
    grid-template-columns: 120px 1fr 80px 60px;
    gap: 16px;
    padding: 6px 8px;
    align-items: baseline;
    cursor: default;
}

.pos-main:has(.expand-indicator)[b-jukcz6dooh] {
    cursor: pointer;
}

/* Position number - consistent formatting */
.pos-nr[b-jukcz6dooh] {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--mud-palette-text-secondary);
    text-align: left;
}

/* Quantity wrapper for desktop */
.pos-quantity-wrapper[b-jukcz6dooh] {
    display: contents;
}

.pos-quantity-wrapper .pos-qty[b-jukcz6dooh] {
    text-align: right;
}

.pos-quantity-wrapper .pos-unit[b-jukcz6dooh] {
    text-align: left;
    font-size: 15px;
    color: var(--mud-palette-text-secondary);
}

/* With prices */
.gaeb-viewer.show-prices .pos-main[b-jukcz6dooh] {
    grid-template-columns: 120px 1fr 80px 60px 80px 100px;
}


.pos-text[b-jukcz6dooh] {
    position: relative;
    padding-right: 20px;
    color: var(--mud-palette-text-primary);
    font-size: 15px;
}

.expand-indicator[b-jukcz6dooh] {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    transition: transform 0.2s ease;
}

.expand-indicator.expanded[b-jukcz6dooh] {
    transform: rotate(90deg);
}

.pos-qty[b-jukcz6dooh] {
    text-align: right;
    font-weight: 500;
    font-size: 15px;
    color: var(--mud-palette-text-primary);
}

.pos-unit[b-jukcz6dooh] {
    color: var(--mud-palette-text-secondary);
}

.pos-price[b-jukcz6dooh],
.pos-total[b-jukcz6dooh] {
    text-align: right;
}

.pos-total[b-jukcz6dooh] {
    font-weight: 500;
    display: flex;
}

/* Long Text */
.pos-long[b-jukcz6dooh] {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 80%;
}

.pos-long.expanded[b-jukcz6dooh] {
    max-height: 2000px; /* Increased for longer texts */
}

.long-text-content[b-jukcz6dooh] {
    padding: 8px 8px 8px 144px; /* Align with position text column (120px + gap) */
    color: var(--mud-palette-text-primary);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* TOC Overlay */
.toc-overlay[b-jukcz6dooh] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.toc-panel[b-jukcz6dooh] {
    background: var(--mud-palette-surface);
    width: 400px;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.toc-header[b-jukcz6dooh] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-weight: 500;
}

.close-btn[b-jukcz6dooh] {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-list[b-jukcz6dooh] {
    overflow-y: auto;
    padding: 8px;
}

.toc-item[b-jukcz6dooh] {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    border-radius: 3px;
}

.toc-item:hover[b-jukcz6dooh] {
    background: var(--mud-palette-action-default-hover);
}

.toc-number[b-jukcz6dooh] {
    color: var(--mud-palette-primary);
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.toc-count[b-jukcz6dooh] {
    color: var(--mud-palette-text-secondary);
    font-size: 13px;
}


/* Scrollbar */
.gaeb-document[b-jukcz6dooh]::-webkit-scrollbar {
    width: 8px;
}

.gaeb-document[b-jukcz6dooh]::-webkit-scrollbar-track {
    background: var(--mud-palette-background-grey);
}

.gaeb-document[b-jukcz6dooh]::-webkit-scrollbar-thumb {
    background: var(--mud-palette-divider);
    border-radius: 4px;
}

.gaeb-document[b-jukcz6dooh]::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-text-disabled);
}

/* Responsive */
@media (max-width: 768px) {
    /* Switch to vertical layout */
    .pos-main[b-jukcz6dooh] {
        display: block;
        position: relative;
        padding: 12px;
        min-height: 80px;
    }
    
    /* Position number at top */
    .pos-nr[b-jukcz6dooh] {
        display: block;
        margin-bottom: 6px;
    }
    
    /* Main text in the middle */
    .pos-text[b-jukcz6dooh] {
        display: block;
        margin-bottom: 8px;
        padding-right: 20px; /* Space for expand indicator */
    }
    
    /* Quantity wrapper at bottom */
    .pos-quantity-wrapper[b-jukcz6dooh] {
        display: block;
        position: absolute;
        bottom: 12px;
        right: 12px;
        text-align: right;
        font-size: 13px;
    }
    
    .pos-quantity-wrapper .pos-qty[b-jukcz6dooh] {
        min-width: auto;
        font-weight: 600;
        margin-right: 4px;
    }
    
    .pos-quantity-wrapper .pos-unit[b-jukcz6dooh] {
        min-width: auto;
        color: var(--mud-palette-text-secondary);
    }
    
    /* Adjust long text */
    .pos-long[b-jukcz6dooh] {
        margin-top: 8px;
    }
    
    .long-text-content[b-jukcz6dooh] {
        padding: 8px 12px; /* Consistent padding on mobile */
    }
    
    /* Smaller gaps between items */
    .position-row[b-jukcz6dooh] {
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }
    
    /* Adjust header for mobile */
    .header-controls[b-jukcz6dooh] {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .view-controls[b-jukcz6dooh] {
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .view-btn[b-jukcz6dooh] {
        flex: 1;
        min-width: auto;
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .header-actions[b-jukcz6dooh] {
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .action-btn[b-jukcz6dooh] {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .action-text[b-jukcz6dooh] {
        display: none;
    }
    
    .action-icon[b-jukcz6dooh] {
        font-size: 18px;
    }
    
    /* Adjust group and title headers */
    .group-header[b-jukcz6dooh] {
        font-size: 14px;
        margin: 16px 0 8px 0;
        grid-template-columns: 60px 1fr;
        gap: 8px;
    }
    
    .group-info[b-jukcz6dooh] {
        display: none; /* Hide on mobile */
    }
    
    .title-row[b-jukcz6dooh] {
        font-size: 13px;
        margin: 12px 0 6px 0;
        grid-template-columns: 60px 1fr;
        gap: 8px;
    }
    
    
    /* TOC adjustments */
    .toc-panel[b-jukcz6dooh] {
        width: 90%;
        max-width: 350px;
    }
}

/* Print */
@media print {
    .gaeb-header[b-jukcz6dooh] {
        display: none;
    }
    
    .position-row[b-jukcz6dooh] {
        break-inside: avoid;
    }
    
    .pos-long[b-jukcz6dooh] {
        max-height: none !important;
    }
}
/* /Components/Pages/GaebViewerComponent.razor.rz.scp.css */
/* Container */
.gaeb-viewer[b-rhjwh2h2l2] {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.5;
    color: var(--mud-palette-text-primary);
    position: relative;
}

/* Ensure highlights work inside deep components */
[b-rhjwh2h2l2] .search-highlight,
.gaeb-viewer .search-highlight[b-rhjwh2h2l2] {
    background-color: #ffd700 !important;
    color: #000 !important;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 500;
    display: inline-block;
    line-height: 1;
}

[b-rhjwh2h2l2] .search-highlight.current,
.gaeb-viewer .search-highlight.current[b-rhjwh2h2l2] {
    background-color: #ff8c00 !important;
    color: #000 !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    outline: 1px solid #d35400;
}

/* Header */
.gaeb-header[b-rhjwh2h2l2] {
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    padding-bottom: 8px;
}

.header-controls[b-rhjwh2h2l2] {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
    padding: 0;
}

.search-container[b-rhjwh2h2l2] {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: 300px;
    /* Fixed width for the container */
    position: relative;
}

.search-field[b-rhjwh2h2l2] {
    margin: 0 !important;
    width: 100%;
}

[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button {
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: auto;
}

[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button:hover,
[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button:focus,
[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button:active {
    background: transparent !important;
    box-shadow: none !important;
}

[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button .mud-ripple,
[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button .mud-ripple-container {
    display: none !important;
}

[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button::before,
[b-rhjwh2h2l2] .search-field .mud-input-adornment-start button::after {
    display: none !important;
}

/* Ensure text doesn't flow under the navigation icons */
[b-rhjwh2h2l2] .search-field .mud-input-slot {
    padding-right: 110px !important;
}

/* Ensure clear button doesn't overlap excessively */
[b-rhjwh2h2l2] .search-field .mud-input-adornment-end {
    margin-left: 0;
}

.search-navigation[b-rhjwh2h2l2] {
    position: absolute;
    right: 36px;
    /* Space for the clear button */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 90px;
    /* Adjusted fixed width */
    height: 100%;
    z-index: 20;
    /* Ensure it's above the input field */
}

.search-count[b-rhjwh2h2l2] {
    font-weight: 600;
    min-width: 45px;
    text-align: center;
}

.search-nav-btn[b-rhjwh2h2l2] {
    padding: 4px !important;
    transition: background-color 0.2s, transform 0.1s !important;
}

/* Use ::deep to target the internal MudBlazor button structure if needed */
[b-rhjwh2h2l2] .search-nav-btn:hover:not(:disabled) {
    background-color: var(--mud-palette-action-default-hover) !important;
    color: var(--mud-palette-primary) !important;
}

[b-rhjwh2h2l2] .search-nav-btn:active:not(:disabled) {
    transform: scale(0.92);
}


.view-controls[b-rhjwh2h2l2] {
    display: none;
    gap: 2px;
}

.view-btn[b-rhjwh2h2l2] {
    padding: 6px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 75px;
    transition: all 0.2s ease;
}

.view-btn:hover[b-rhjwh2h2l2] {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
}

.view-btn.active[b-rhjwh2h2l2] {
    background: var(--mud-palette-primary);
    color: white;
    border-color: var(--mud-palette-primary);
}

.view-btn.active:hover[b-rhjwh2h2l2] {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
}

.header-actions[b-rhjwh2h2l2] {
    display: flex;
    gap: 4px;
}

.action-btn[b-rhjwh2h2l2] {
    padding: 6px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.action-btn:hover[b-rhjwh2h2l2] {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
}

.action-icon[b-rhjwh2h2l2] {
    font-size: 16px;
    line-height: 1;
}

.action-text[b-rhjwh2h2l2] {
    font-weight: 500;
}

.icon-btn[b-rhjwh2h2l2] {
    width: 35px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.icon-btn:hover[b-rhjwh2h2l2] {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
}

.breadcrumb[b-rhjwh2h2l2] {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    margin-top: 4px;
}

/* Loading */
.loading-container[b-rhjwh2h2l2] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    gap: 16px;
}

/* Document */
.gaeb-document[b-rhjwh2h2l2] {
    flex: 1;
    overflow-y: auto;
    margin: auto;
    width: 100%;
}

/* Project Header (D84 files) */
.project-header[b-rhjwh2h2l2] {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--mud-palette-background-grey);
    font-size: 18px;
    font-weight: 600;
    padding: 8px;
}

.project-title[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-primary);
}

.project-location[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-secondary);
    font-size: 16px;
    font-weight: 400;
}

.project-date[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-secondary);
    font-size: 14px;
    font-weight: 400;
}

.project-total-sum[b-rhjwh2h2l2] {
    margin-left: auto;
}

/* Group Headers */
.group-header[b-rhjwh2h2l2] {
    margin: 8px 0 8px 0;
    padding: 8px 8px;
    border-bottom: 2px solid var(--mud-palette-primary);
    font-weight: 600;
    font-size: 17px;
}

.group-number[b-rhjwh2h2l2] {
    color: var(--mud-palette-primary);
    text-align: left;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
}

.group-title[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-primary);
}

.group-price[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-primary);
    text-align: right;
}

.group-info[b-rhjwh2h2l2] {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    font-weight: normal;
    text-align: right;
}

/* Title Rows */
.title-row[b-rhjwh2h2l2] {
    margin: 16px 0 8px 0;
    padding: 4px 8px;
    border-bottom: 2px solid var(--mud-palette-lines-default);
    font-weight: 500;
    font-size: 15px;
    align-items: baseline;
}

.title-number[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-secondary);
    text-align: left;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.title-text[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-primary);
}

/* D84 format: Use grid to align price and currency in titles */
.title-text-d84[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 6px;
}

.title-price[b-rhjwh2h2l2] {
    text-align: right;
}

.title-currency[b-rhjwh2h2l2] {
    text-align: left;
    min-width: 35px;
}

/* Subtitle Rows (3rd Level) */
.subtitle-row[b-rhjwh2h2l2] {
    margin: 12px 0 6px 0;
    padding: 4px 8px;
    font-weight: 500;
    font-size: 14px;
    align-items: baseline;
    background: var(--mud-palette-background-grey);
}

.subtitle-number[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-secondary);
    text-align: left;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.subtitle-text[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-primary);
}

/* Positions Block */
.positions-block[b-rhjwh2h2l2] {
    margin-bottom: 16px;
}

/* Position Row */
.position-row[b-rhjwh2h2l2] {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.position-row:hover[b-rhjwh2h2l2] {
    background: var(--mud-palette-action-default-hover);
}


/* Main Position Grid */
/* Main Position Grid (Default for D84, X84, P83, etc.) */
.pos-main[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 120px 1fr 80px 60px;
    gap: 16px;
    padding: 6px 8px;
    align-items: baseline;
    cursor: default;
}

.gaeb-viewer.show-prices .pos-main[b-rhjwh2h2l2] {
    grid-template-columns: 120px 1fr 80px 60px 80px 100px;
}

/* X81 Specific Layout - User Request */
.gaeb-viewer.format-x81 .pos-main[b-rhjwh2h2l2],
.gaeb-viewer.format-x81 .subtitle-row[b-rhjwh2h2l2],
.gaeb-viewer.format-x81 .title-row[b-rhjwh2h2l2],
.gaeb-viewer.format-x81 .group-header[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 120px 1fr 150px 100px;
    gap: 16px;
    padding: 6px 8px;
    align-items: baseline;
    cursor: default;
}

.gaeb-viewer.format-x81.show-prices .pos-main[b-rhjwh2h2l2],
.gaeb-viewer.format-x81.show-prices .subtitle-row[b-rhjwh2h2l2],
.gaeb-viewer.format-x81.show-prices .title-row[b-rhjwh2h2l2],
.gaeb-viewer.format-x81.show-prices .group-header[b-rhjwh2h2l2] {
    grid-template-columns: 120px 1fr 150px 80px 100px;
}

/* Restoring old Title/Subtitle/Group styles */
.group-header[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 16px;
    margin: 8px 0 8px 0;
    padding: 8px 8px;
    border-bottom: 2px solid var(--mud-palette-primary);
    font-weight: 600;
    font-size: 17px;
    align-items: baseline;
}

.title-row[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 120px 1fr 200px 60px;
    gap: 16px;
    margin: 16px 0 8px 0;
    padding: 4px 8px;
    border-bottom: 2px solid var(--mud-palette-lines-default);
    font-weight: 500;
    font-size: 15px;
    align-items: baseline;
}

.subtitle-row[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 16px;
    margin: 12px 0 6px 0;
    padding: 4px 8px;
    font-weight: 500;
    font-size: 14px;
    align-items: baseline;
    background: var(--mud-palette-background-grey);
}

.pos-main:has(.expand-indicator)[b-rhjwh2h2l2] {
    cursor: pointer;
}

/* Position number - consistent formatting */
.pos-nr[b-rhjwh2h2l2],
.subtitle-number[b-rhjwh2h2l2],
.title-number[b-rhjwh2h2l2] {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--mud-palette-text-secondary);
    text-align: left;
}

/* New Combined Column for Qty+Unit or Category Totals */
.pos-qty-unit[b-rhjwh2h2l2] {
    text-align: right;
    font-weight: 500;
    font-size: 15px;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
}

.pos-qty-unit .unit-label[b-rhjwh2h2l2],
.pos-total .unit-label[b-rhjwh2h2l2] {
    margin-left: 4px;
    color: var(--mud-palette-text-secondary);
    font-weight: normal;
}


.pos-text[b-rhjwh2h2l2] {
    position: relative;
    padding-right: 20px;
    color: var(--mud-palette-text-primary);
    font-size: 15px;
}

/* Structured format: Use grid to align price and currency */
.pos-text-tabular[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 6px;
}

.pos-price-value[b-rhjwh2h2l2] {
    text-align: right;
}

.pos-currency[b-rhjwh2h2l2] {
    text-align: left;
    min-width: 35px;
}

.expand-indicator[b-rhjwh2h2l2] {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    transition: transform 0.2s ease;
}

.expand-indicator.expanded[b-rhjwh2h2l2] {
    transform: rotate(90deg);
}

.pos-qty[b-rhjwh2h2l2] {
    text-align: right;
    font-weight: 500;
    font-size: 15px;
    color: var(--mud-palette-text-primary);
}

.pos-unit[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-secondary);
}

.pos-price[b-rhjwh2h2l2] {
    text-align: right;
}

.pos-total[b-rhjwh2h2l2] {
    display: flex;
    text-align: right;
    font-weight: 500;
    font-size: 15px;
    color: var(--mud-palette-text-primary);
}

/* Long Text */
.pos-long[b-rhjwh2h2l2] {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 80%;
}

.pos-long.expanded[b-rhjwh2h2l2] {
    max-height: 2000px;
    /* Increased for longer texts */
}

.long-text-content[b-rhjwh2h2l2] {
    padding: 8px 8px 8px 144px;
    /* Align with position text column (120px + gap) */
    color: var(--mud-palette-text-primary);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* TOC Overlay */
.toc-overlay[b-rhjwh2h2l2] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.toc-panel[b-rhjwh2h2l2] {
    background: var(--mud-palette-surface);
    width: 400px;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.toc-header[b-rhjwh2h2l2] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-weight: 500;
}

.close-btn[b-rhjwh2h2l2] {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-list[b-rhjwh2h2l2] {
    overflow-y: auto;
    padding: 8px;
}

.toc-item[b-rhjwh2h2l2] {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    border-radius: 3px;
}

.toc-item:hover[b-rhjwh2h2l2] {
    background: var(--mud-palette-action-default-hover);
}

.toc-number[b-rhjwh2h2l2] {
    color: var(--mud-palette-primary);
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.toc-count[b-rhjwh2h2l2] {
    color: var(--mud-palette-text-secondary);
    font-size: 13px;
}


/* Scrollbar */
.gaeb-document[b-rhjwh2h2l2]::-webkit-scrollbar {
    width: 8px;
}

.gaeb-document[b-rhjwh2h2l2]::-webkit-scrollbar-track {
    background: var(--mud-palette-background-grey);
}

.gaeb-document[b-rhjwh2h2l2]::-webkit-scrollbar-thumb {
    background: var(--mud-palette-divider);
    border-radius: 4px;
}

.gaeb-document[b-rhjwh2h2l2]::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-text-disabled);
}

/* Responsive */
@media (max-width: 768px) {

    /* Switch to vertical layout */
    .pos-main[b-rhjwh2h2l2] {
        display: block;
        position: relative;
        padding: 12px;
        min-height: 80px;
    }

    /* X81 format: Override grid to use same mobile layout as X83/X84 */
    .gaeb-viewer.format-x81 .pos-main[b-rhjwh2h2l2] {
        display: block;
        position: relative;
        padding: 12px;
        min-height: 80px;
    }

    .gaeb-viewer.format-x81 .group-header[b-rhjwh2h2l2],
    .gaeb-viewer.format-x81 .title-row[b-rhjwh2h2l2],
    .gaeb-viewer.format-x81 .subtitle-row[b-rhjwh2h2l2] {
        display: grid;
        grid-template-columns: 60px 1fr auto;
        gap: 8px;
        padding: 4px 8px;
    }

    /* Position number at top */
    .pos-nr[b-rhjwh2h2l2] {
        display: block;
        margin-bottom: 6px;
    }

    /* Main text in the middle */
    .pos-text[b-rhjwh2h2l2] {
        display: block;
        margin-bottom: 8px;
        padding-right: 20px;
        /* Space for expand indicator */
    }

    /* Quantity wrapper at bottom */
    .pos-quantity-wrapper[b-rhjwh2h2l2] {
        display: block;
        position: absolute;
        bottom: 12px;
        right: 12px;
        text-align: right;
        font-size: 13px;
    }

    .pos-quantity-wrapper .pos-qty[b-rhjwh2h2l2] {
        min-width: auto;
        font-weight: 600;
        margin-right: 4px;
    }

    .pos-quantity-wrapper .pos-unit[b-rhjwh2h2l2] {
        min-width: auto;
        color: var(--mud-palette-text-secondary);
    }

    /* Adjust long text */
    .pos-long[b-rhjwh2h2l2] {
        margin-top: 8px;
    }

    .long-text-content[b-rhjwh2h2l2] {
        padding: 8px 12px;
        /* Consistent padding on mobile */
    }

    /* Smaller gaps between items */
    .position-row[b-rhjwh2h2l2] {
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    /* Adjust header for mobile */
    .header-controls[b-rhjwh2h2l2] {
        flex-wrap: wrap;
        gap: 8px;
    }

    .view-controls[b-rhjwh2h2l2] {
        flex: 1 1 100%;
        justify-content: center;
    }

    .view-btn[b-rhjwh2h2l2] {
        flex: 1;
        min-width: auto;
        font-size: 12px;
        padding: 6px 8px;
    }

    .header-actions[b-rhjwh2h2l2] {
        flex: 1 1 auto;
        justify-content: flex-start;
        margin-top: 4px;
    }

    .search-container[b-rhjwh2h2l2] {
        flex: 1 1 100%;
        margin-left: 0;
        margin-top: 8px;
    }

    .search-field[b-rhjwh2h2l2] {
        width: 100%;
    }

    .action-btn[b-rhjwh2h2l2] {
        font-size: 12px;
        padding: 4px 8px;
    }

    .action-text[b-rhjwh2h2l2] {
        display: none;
    }

    .action-icon[b-rhjwh2h2l2] {
        font-size: 18px;
    }

    /* Adjust group and title headers */
    .group-header[b-rhjwh2h2l2],
    .title-row[b-rhjwh2h2l2],
    .subtitle-row[b-rhjwh2h2l2] {
        font-size: 13px;
        margin: 12px 0 6px 0;
        grid-template-columns: 60px 1fr auto;
        gap: 8px;
        padding: 4px 8px;
    }

    .subtitle-row[b-rhjwh2h2l2] {
        font-size: 12px;
    }

    /* D84/X84/P84: Use flexbox to keep title-price and unit-label together */
    .gaeb-viewer.format-d84 .title-row[b-rhjwh2h2l2],
    .gaeb-viewer.format-x84 .title-row[b-rhjwh2h2l2],
    .gaeb-viewer.format-p84 .title-row[b-rhjwh2h2l2] {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .gaeb-viewer.format-d84 .title-row .title-number[b-rhjwh2h2l2],
    .gaeb-viewer.format-x84 .title-row .title-number[b-rhjwh2h2l2],
    .gaeb-viewer.format-p84 .title-row .title-number[b-rhjwh2h2l2] {
        width: 60px;
        flex-shrink: 0;
    }

    .gaeb-viewer.format-d84 .title-row .title-text[b-rhjwh2h2l2],
    .gaeb-viewer.format-x84 .title-row .title-text[b-rhjwh2h2l2],
    .gaeb-viewer.format-p84 .title-row .title-text[b-rhjwh2h2l2] {
        flex: 1;
        min-width: 0;
    }

    .gaeb-viewer.format-d84 .title-row .title-price[b-rhjwh2h2l2],
    .gaeb-viewer.format-x84 .title-row .title-price[b-rhjwh2h2l2],
    .gaeb-viewer.format-p84 .title-row .title-price[b-rhjwh2h2l2] {
        white-space: nowrap;
        margin-left: auto;
    }

    .gaeb-viewer.format-d84 .title-row .unit-label[b-rhjwh2h2l2],
    .gaeb-viewer.format-x84 .title-row .unit-label[b-rhjwh2h2l2],
    .gaeb-viewer.format-p84 .title-row .unit-label[b-rhjwh2h2l2] {
        white-space: nowrap;
    }


    /* TOC adjustments */
    .toc-panel[b-rhjwh2h2l2] {
        width: 90%;
        max-width: 350px;
    }
}

/* Print */
@media print {
    .gaeb-header[b-rhjwh2h2l2] {
        display: none;
    }

    .position-row[b-rhjwh2h2l2] {
        break-inside: avoid;
    }

    .pos-long[b-rhjwh2h2l2] {
        max-height: none !important;
    }
}

/* Search Highlighting */
.search-highlight[b-rhjwh2h2l2] {
    background-color: #ffd700 !important;
    color: #000 !important;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 500;
    display: inline-block;
    line-height: 1;
}

.search-highlight.current[b-rhjwh2h2l2] {
    background-color: #ff8c00 !important;
    color: #000 !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    outline: 1px solid #d35400;
}
