/* ============================================================
   TestView page styles — extracted from TestView.razor
   ============================================================ */

.back-link-section {
    background-color: #F9FAFB;
    padding: 12px 0;
}

.back-link-container {
    margin: 0 32px;
}

.back-link-button.k-button {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    color: #4D7F71;
    padding: 0;
    gap: 6px;
}

.back-link-button.k-button:hover {
    color: #3a5f57;
    background: none;
}

.summary-shell {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f9fafb;
    padding-bottom: 16px;
}

.test-info-section {
    background-color: #4d7f71;
    border-radius: 6px;
    padding: 24px;
    color: #FFFFFF;
    margin-bottom: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.test-info-title {
    font-family: "Roboto", sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: #FFFFFF;
    margin: 0 0 16px 0;
}

.summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.summary-chip strong {
    font-weight: 700;
}

.alert-banner {
    background-color: #FFF4B9;
    border: 1px solid #E5C94A;
    border-radius: 8px;
    padding: 14px 16px;
    color: #4A3B00;
    font-family: "Roboto", sans-serif;
    margin-bottom: 16px;
}

.alert-banner-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.alert-banner-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
}

.order-alert-box {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
}

.order-alert-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

/* Filled yellow triangle icon with green exclamation */
.alert-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    position: relative;
    display: inline-block;
}

.alert-icon::before,
.alert-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask: url('Assets/triangle-exclamation.svg') no-repeat center / contain;
    mask: url('Assets/triangle-exclamation.svg') no-repeat center / contain;
}

/* background triangle */
.alert-icon::before {
    background-color: #FFE100;
}

/* inner exclamation mark - slightly inset to appear as the glyph */
.alert-icon::after {
    background-color: #4D7F71;
    transform: scale(0.45);
    transform-origin: center;
}

.alert-title {
    font-family: "Roboto", sans-serif;
    font-size: 20px;
    line-height: 30px;
    font-weight: 500;
    color: #FFFFFF;
}

.alert-warning {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: #FFF4B9;
    margin-bottom: 10px;
}

.alert-warning.important {
    color: #FFE100;
}

.alert-information {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #FFFFFF;
    margin: 0;
    white-space: pre-line;
}

.test-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    align-items: baseline;
}

.test-detail-label {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    min-width: unset;
}

.test-detail-value {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
}

.content-container {
    margin: 0 32px;
}

.main-content-section {
    background-color: #f9fafb;
    padding: 3px 0 0 0;
}

.tabstrip-host {
    padding-top: 16px;
    padding-bottom: 40px;
}

.test-tabstrip {
    margin-top: 8px;
}

/* -- Tab button styling ------------------------------------------- */
.test-tabstrip .k-tabstrip-items-wrapper {
    border-bottom: 2px solid #4d7f71;
}

.test-tabstrip .k-tabstrip-items .k-item {
    background-color: rgba(77, 127, 113, 0.10);
    border: 1px solid #c5c79b;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    color: #4d7f71;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.test-tabstrip .k-tabstrip-items .k-item:hover:not(.k-active) {
    background-color: rgba(197, 199, 155, 0.35);
    color: #4d7f71;
}

.test-tabstrip .k-tabstrip-items .k-item.k-active,
.test-tabstrip .k-tabstrip-items .k-item.k-active:focus,
.test-tabstrip .k-tabstrip-items .k-item.k-selected {
    background-color: #4d7f71 !important;
    border-color: #4d7f71 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: none !important;
}

.test-tabstrip .k-tabstrip-items .k-item.k-active .k-link,
.test-tabstrip .k-tabstrip-items .k-item.k-selected .k-link {
    color: #ffffff !important;
}

.test-tabstrip .k-tabstrip-items .k-item .k-link {
    color: inherit;
    padding: 8px 16px;
}

.test-tabstrip .k-tabstrip-items .k-item .k-link > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-content {
    padding-top: 16px;
}

.section-box {
    border-radius: 6px;
    padding: 24px;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.section-collection { background-color: #4d7f71; }
.section-process    { background-color: #c5c79b; }
.section-shipping   { background-color: #898f65; }
.section-references { background-color: #00adbb; }
.section-external   { background-color: #00adbb; }

.section-box-title {
    font-family: "Roboto", sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #FFFFFF;
    margin: 0 0 20px 0;
}

.section-box-subheading {
    font-family: "Roboto", sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 20px 0 8px 0;
}

.section-box-subheading:first-of-type {
    margin-top: 0;
}

.section-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    align-items: start;
    padding: 8px 0;
}

.section-row:last-child {
    border-bottom: none;
}

.section-process,
.section-shipping,
.section-references,
.section-external {
    color: #24323A;
}

.section-process .section-box-title,
.section-process .section-box-subheading,
.section-process .section-row-label,
.section-process .section-row-value,
.section-process .section-badge-text,
.section-process .section-empty,
.section-process .section-link,
.section-shipping .section-box-title,
.section-shipping .section-box-subheading,
.section-shipping .section-row-label,
.section-shipping .section-row-value,
.section-shipping .section-badge-text,
.section-shipping .section-empty,
.section-shipping .section-link,
.section-references .section-box-title,
.section-references .section-box-subheading,
.section-references .section-row-label,
.section-references .section-row-value,
.section-references .section-badge-text,
.section-references .section-empty,
.section-references .section-link,
.section-external .section-box-title,
.section-external .section-box-subheading,
.section-external .section-row-label,
.section-external .section-row-value,
.section-external .section-badge-text,
.section-external .section-empty,
.section-external .section-link {
    color: #24323A;
}

.section-process .section-row,
.section-shipping .section-row,
.section-references .section-row,
.section-external .section-row {
    border-bottom-color: rgba(36, 50, 58, 0.18);
}

.section-process .section-badge,
.section-shipping .section-badge,
.section-references .section-badge,
.section-external .section-badge {
    background-color: rgba(255, 255, 255, 0.35);
}

.section-row-label {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.section-row-value {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    white-space: pre-line;
}

.section-row-full {
    grid-column: 1 / -1;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    margin-bottom: 4px;
}

.section-badge-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

.section-badge-text {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
}

.container-entry + .container-entry {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.section-badge-icon-primary {
    background-color: #1565C0;
}

.section-badge-icon-alternate {
    background-color: #FFD700;
}

.section-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}

.section-link:hover {
    color: #0F3D44;
    text-decoration: none;
}

.alert-banner .section-link,
.alert-banner a {
    color: #1a56b0;
}

.alert-banner .section-link:hover,
.alert-banner a:hover {
    color: #0d3c7a;
}

.section-empty {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

@media (max-width: 768px) {
    .back-link-container,
    .content-container {
        margin: 0 16px;
    }

    .test-info-section,
    .section-box {
        padding: 20px 16px;
    }

    .test-info-title {
        font-size: 26px;
        line-height: 1.2;
    }

    .summary-meta {
        flex-direction: column;
    }

    .test-detail-row,
    .section-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .tabstrip-host {
        padding-top: 12px;
        padding-bottom: 24px;
    }

    .section-box-title {
        font-size: 22px;
    }
}

/* -- Reference Interval detail table -------------------------------- */
.ref-interval-table {
    border-collapse: collapse;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    color: #24323A;
    margin: 0;
}

.ref-interval-table th,
.ref-interval-table td {
    padding: 4px 16px 4px 0;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.ref-interval-table th {
    font-weight: 600;
    border-bottom: 1px solid rgba(36, 50, 58, 0.25);
    padding-bottom: 6px;
}

.ref-interval-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(36, 50, 58, 0.1);
}

/* -- Utility classes ------------------------------------------------ */
.test-details-header {
    margin-bottom: 16px;
}

.summary-chip-inline {
    margin-left: 8px;
}

.alert-link {
    color: #4A3B00;
}

.error-box {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 16px 24px;
    font-family: "Roboto", sans-serif;
    color: #991b1b;
}

.status-section {
    padding: 40px 0;
}

.status-message {
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    color: #5C6670;
}

.error-return {
    margin-top: 16px;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    color: #5C6670;
}

.print-button.k-button {
    font-size: 14px;
    color: #4D7F71;
    gap: 6px;
}

.print-button.k-button:hover {
    color: #3a5f57;
    background: none;
}

@media print {
    .back-link-section,
    .test-tabstrip .k-tabstrip-items-wrapper,
    .print-button {
        display: none !important;
    }

    .summary-shell {
        position: static !important;
    }

    .test-info-section {
        background-color: #4d7f71 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        box-shadow: none;
    }

    .alert-banner {
        border: 1px solid #E5C94A;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .section-box {
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Show all tab panels when printing */
    .k-tabstrip-content {
        display: block !important;
    }

    .tab-content {
        break-inside: avoid;
        margin-bottom: 16px;
    }
}
