/* The printed station sheet: ur20PrintSheet shown, everything else on the page hidden. */
@page {
    size: letter portrait;
    margin: 0.5in;
}

/* Store chrome, then the interactive page; never the #nav_content wrappers, which contain the sheet. */
#nav_topHeader,
#nav_footer,
#footerSlideContainer,
#footerSlideButton,
#footerSlideContent,
#notification,
#watermark,
#adcSideBar,
#banner,
#store-messages-active,
#adcTabBarContainer,
#termsfeed-com---nb,
.termsfeed-com---pc-overlay,
.adc-back-to-top,
.selector-wrapper > .container-fluid {
    display: none !important;
}

/* Everything not on the sheet's branch; without :has() the id list above is the fallback. */
body *:not(:has(.ur20-print-sheet)):not(.ur20-print-sheet):not(.ur20-print-sheet *) {
    display: none !important;
}

/* Nothing after the sheet; the template's trailing <br>s would start an empty page. */
.ur20-print-sheet ~ *,
body > br,
#nav-outer-div ~ br {
    display: none !important;
}

/* Margins belong to @page. */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* The template's bordered wrappers, which would print as rules down both sides. */
.tabbed-content,
.boxed-content,
.nav_outer_div,
.selector-wrapper {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
}

.ur20-print-sheet {
    display: block !important;
    font: 9pt Arial, Helvetica, sans-serif;
    color: #000;
}

/* ── Masthead ─────────────────────────────────────────────────── */
.ur20-print-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--adc-blue, #0d72c2);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.ur20-print-brand {
    font: bold 17pt Arial, Helvetica, sans-serif;
    color: var(--adc-blue, #0d72c2);
    /* Printers drop background and colour by default; these are brand marks, not decoration. */
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.ur20-print-brand span {
    display: block;
    color: #58585A;
    font-weight: normal;
    font-size: 9pt;
}

.ur20-print-meta {
    text-align: right;
    font-size: 8pt;
    color: #555;
}

.ur20-print-title {
    font-size: 13pt;
    margin: 0 0 2px;
}

.ur20-print-notes {
    color: #555;
    font-size: 8.5pt;
    margin: 0 0 8px;
}

/* ── Rack strip and mounting ──────────────────────────────────── */
.ur20-print-rack {
    background: var(--ur20-rack-bg);
    border: 1px solid #ccc;
    border-radius: 4px;
    /* The right padding is room for the last lane to run out past the end plate. */
    padding: 8px 64px 8px 10px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.ur20-print-strip {
    display: flex;
    align-items: flex-start;
}

/* A third of the on-screen size: the graphic shows shape and order only. */
.ur20-print-sheet img.mod {
    width: 24px;
    height: 259px;
    display: block;
}

.ur20-print-sheet img.coup {
    width: 106px;
    height: 259px;
    display: block;
}

/* The station's ends at 24 px per module: bracket 17 px, the right end one module wide. */
.ur20-print-sheet img.brk,
.ur20-print-labels .brk {
    width: 17px;
    flex: 0 0 auto;
}

.ur20-print-sheet img.brk,
.ur20-print-sheet img.end {
    height: 259px;
    display: block;
}

.ur20-print-sheet img.end {
    width: 24px;
}

/* Full part numbers on leaders: down from each module, then 45 degrees to the right. */
.ur20-print-labels {
    height: 80px;
}

.ur20-print-labels .lbl {
    width: 24px;
    height: 80px;
    position: relative;
}

.ur20-print-labels .lbl.coup {
    width: 106px;
}

/* The vertical drop, on the column's left edge so the label sits in its own column. */
.ur20-print-labels .lbl::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0.75px;
    height: 9px;
    background: #8a949d;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

/* The 45 degree run, pivoting where the drop ends, with the part number on top. */
.ur20-print-labels .lbl span {
    position: absolute;
    left: 0;
    bottom: 71px;
    transform-origin: 0 100%;
    transform: rotate(45deg);
    border-bottom: 0.75px solid #8a949d;
    font-size: 6pt;
    white-space: nowrap;
    display: block;
    padding: 3px 10px 2px 6px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

/* ── Facts strip ──────────────────────────────────────────────── */
/* Wraps rather than letting flex shrink the labels. */
.ur20-print-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: 8.5pt;
    margin: 5px 0 0;
    padding: 5px 0;
    border-top: 1px solid #e3e3e3;
    border-bottom: 1px solid #e3e3e3;
}

.ur20-print-facts strong {
    font-size: 10pt;
}

.ur20-print-sheet h2 {
    /* A heading must not strand at the foot of a page with its table overleaf. */
    break-after: avoid;
    font-size: 9.5pt;
    margin: 9px 0 3px;
    padding-bottom: 2px;
    border-bottom: 1px solid #bbb;
}

/* ── Tables ───────────────────────────────────────────────────── */
.ur20-print-sheet table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
}

/* Column headers repeat at the top of each page the table runs onto. */
.ur20-print-sheet thead {
    display: table-header-group;
}

/* Once, at the end: a table-footer-group repeats on every page. */
.ur20-print-sheet tfoot {
    display: table-row-group;
}

.ur20-print-sheet tr {
    break-inside: avoid;
}

.ur20-print-sheet th {
    text-align: left;
    border-bottom: 1.5px solid #666;
    padding: 3px 4px;
    font-size: 7.5pt;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #444;
}

.ur20-print-sheet td {
    padding: 2.5px 4px;
    border-bottom: 1px solid #e3e3e3;
    vertical-align: top;
}

/* Bold: paper has no link colour. */
.ur20-print-sheet .ur20-bom-part {
    font-weight: bold;
}

/* One closing rule for the Total row's th and td. */
.ur20-print-sheet tfoot th,
.ur20-print-sheet tfoot td {
    border-bottom: 1.5px solid #666;
    padding-top: 5px;
}

.ur20-print-foot {
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px solid #bbb;
    font-size: 7.5pt;
    color: #555;
}
