/* FILE: css/case_report.css */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #ececec;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

.report-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 14px;
    background: #333;
    color: #fff;
}

.toolbar-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.toolbar-link:hover {
    text-decoration: underline;
}

.print-button {
    border: 1px solid #fff;
    border-radius: 3px;
    background: #fff;
    color: #222;
    padding: 7px 12px;
    cursor: pointer;
    font-weight: bold;
}

.print-button:hover {
    background: #f2f2f2;
}

.report-page {
    width: 10in;
    max-width: calc(100% - 30px);
    margin: 18px auto 35px;
    padding: 0.5in 0.55in;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.report-header {
    text-align: center;
    margin-bottom: 22px;
}

.report-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.block-m {
    color: #ffcb05;
    font-family: Georgia, serif;
    font-size: 52px;
    font-weight: bold;
    line-height: 1;
}

.organization-name {
    color: #5c6670;
    font-size: 27px;
    font-weight: 500;
    letter-spacing: -0.6px;
}

.university-name {
    color: #5c6670;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.2px;
    text-align: left;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.35;
}

.contact-email {
    margin-top: 5px;
    color: #276a94;
    text-decoration: underline;
}

.report-section {
    margin: 0 0 22px;
}

.major-section {
    margin-top: 15px;
}

.section-title,
.subsection-title,
.major-title {
    color: #111;
    font-weight: bold;
}

.section-title {
    display: inline-block;
    margin: 0;
    padding: 0 4px 1px;
    font-size: 19px;
    line-height: 1.1;
    border-bottom: 2px solid #111;
}

.uppercase-title {
    text-transform: uppercase;
}

.major-title {
    display: inline-block;
    margin: 0 0 25px;
    font-size: 24px;
    text-transform: uppercase;
    border-bottom: 2px solid #111;
}

.subsection-title {
    display: inline-block;
    margin: 24px 0 0;
    font-size: 18px;
    border-bottom: 2px solid #111;
}

.additional-procedures-title {
    margin-top: 17px;
}

.morphologic-title {
    margin-top: 26px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #111;
    table-layout: fixed;
}

.report-table th,
.report-table td {
    border: 1px solid #111;
    padding: 3px 5px;
    text-align: left;
    vertical-align: top;
    font-weight: normal;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.report-table thead th {
    vertical-align: bottom;
}

.case-information-table th:nth-child(1),
.case-information-table th:nth-child(3) {
    width: 19%;
}

.case-information-table td:nth-child(2) {
    width: 23%;
}

.case-information-table td:nth-child(4) {
    width: 24%;
}

.animal-table th:nth-child(1) {
    width: 18%;
}

.animal-table th:nth-child(2) {
    width: 22%;
}

.animal-table th:nth-child(3) {
    width: 12%;
}

.animal-table th:nth-child(4) {
    width: 12%;
}

.animal-table th:nth-child(5) {
    width: 24%;
}

.animal-table th:nth-child(6) {
    width: 12%;
}

.bordered-text {
    border: 2px solid #111;
    min-height: 38px;
    padding: 5px;
    line-height: 1.35;
}

.final-comments {
    min-height: 100px;
}

.analysis-comment + .analysis-comment {
    margin-top: 12px;
}

.diagnosis-table th:nth-child(1) {
    width: 19%;
}

.diagnosis-table th:nth-child(2) {
    width: 22%;
}

.diagnosis-table th:nth-child(3) {
    width: 59%;
}

.pathologist-section {
    margin-top: 30px;
}

.pathologist-title {
    font-size: 17px;
    text-transform: none;
}

.plain-info-table {
    border-collapse: collapse;
    margin-top: 4px;
}

.plain-info-table th,
.plain-info-table td {
    padding: 2px 10px 2px 0;
    text-align: left;
    vertical-align: top;
}

.plain-info-table th {
    min-width: 180px;
    font-weight: normal;
}

.yellow-divider {
    height: 16px;
    margin: 25px 0 18px;
    background: #ffe49a;
}

.gross-summary-table {
    border-collapse: collapse;
    margin: -18px 0 30px;
    min-width: 520px;
}

.gross-summary-table th,
.gross-summary-table td {
    padding: 2px 26px 2px 0;
    text-align: left;
    font-weight: normal;
}

.gross-summary-table th:first-child {
    min-width: 180px;
}

.gross-summary-single {
    margin: -18px 0 30px;
}

.gross-lesions-table th:nth-child(1) {
    width: 19%;
}

.gross-lesions-table th:nth-child(2) {
    width: 22%;
}

.gross-lesions-table th:nth-child(3) {
    width: 24%;
}

.gross-lesions-table th:nth-child(4) {
    width: 35%;
}

.procedure-table td:nth-child(1) {
    width: 19%;
}

.procedure-table td:nth-child(2) {
    width: 81%;
}

.microscopic-table th:nth-child(1) {
    width: 19%;
}

.microscopic-table th:nth-child(2) {
    width: 22%;
}

.microscopic-table th:nth-child(3) {
    width: 59%;
}

.pdf-download-button {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #ffcb05;
    border-radius: 3px;
    background: #ffcb05;
    color: #00274c;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.pdf-download-button:hover,
.pdf-download-button:focus {
    background: #f2c000;
    border-color: #f2c000;
    color: #00274c;
}

.pdf-download-button:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.report-footer {
    margin-top: 28px;
    color: #777;
    font-size: 11px;
    text-align: right;
}

@media screen and (max-width: 850px) {
    .report-page {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 18px;
        box-shadow: none;
    }

    .organization-name {
        font-size: 21px;
    }

    .contact-grid {
        gap: 15px;
    }

    .report-table {
        font-size: 12px;
    }
}

@page {
    size: letter landscape;
    margin: 0.35in;
}

@media print {
    html,
    body {
        display: block !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .no-print,
    .report-toolbar {
        display: none !important;
    }

    .report-page {
        display: block !important;
        position: static !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .report-header {
        margin-bottom: 16px;
    }

    .block-m {
        font-size: 38px;
    }

    .organization-name {
        font-size: 21px;
    }

    .contact-grid {
        max-width: 560px;
        font-size: 9pt;
    }

    .report-section {
        display: block !important;
        overflow: visible !important;
        margin-bottom: 15px;
    }

    .report-table {
        width: 100% !important;
        table-layout: fixed;
        border-collapse: collapse;
        font-size: 8.5pt;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table tbody {
        display: table-row-group;
    }

    .report-table tr {
        break-inside: auto;
        page-break-inside: auto;
    }

    .report-table th,
    .report-table td {
        padding: 2px 4px;
        overflow: visible !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .section-title {
        font-size: 14pt;
    }

    .major-title {
        margin-bottom: 15px;
        font-size: 17pt;
    }

    .subsection-title {
        font-size: 14pt;
    }

    .section-title,
    .major-title,
    .subsection-title {
        break-after: avoid;
        page-break-after: avoid;
    }

    .bordered-text,
    .final-comments,
    .pathologist-section {
        overflow: visible !important;
        break-inside: auto;
        page-break-inside: auto;
    }

    .yellow-divider {
        height: 11px;
        margin: 18px 0 13px;
        background: #ffe49a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .report-footer {
        display: none !important;
    }
}