/* A4 Paper Wrapper */
.invoice-paper-wrapper,
.xml-wrapper {
    background-color: #f8f9fa;
}

/* A4 Paper styling - realistic invoice */
.invoice-paper,
#xml-view {
    background: white;
    width: 100%;
    aspect-ratio: 210 / 297;
    padding: 2rem 2rem 2.5rem 2rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
}

#xml-view {
    background: #212529;
}

/* Invoice Typography */
.invoice-document {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 9pt;
    line-height: 1.4;
    color: #1a1a1a;
}

/* Clickable elements */
.clickable {
    border-radius: 2px;
    padding: 1px 0;
    transition: background-color 0.15s;
    cursor: pointer;
}

.clickable:hover {
    background-color: #fff3cd !important;
}

/* Prevent parent highlight when hovering nested clickable */
.clickable .clickable:hover {
    background-color: #fff3cd !important;
}

.clickable:has(.clickable:hover) {
    background-color: transparent !important;
}

/* Preserve table structure for clickable rows */
tr.clickable {
    display: table-row;
}

/* XML Code */
#xml-view {
    overflow-x: auto;
}

#xml-view pre {
    background: transparent !important;
    margin: 0;
    padding: 0 !important;
    border: 0;
}

#xml-code {
    font-size: 0.85rem;
    line-height: 1.5;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre;
}

.xml-highlight {
    background-color: #fff3cd;
    padding: 2px 0;
    border-radius: 3px;
    display: inline;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .invoice-paper {
        aspect-ratio: auto;
        min-height: 600px;
        padding: 2rem 1.5rem;
    }

    .invoice-totals {
        width: 100%;
    }
}
