﻿.app-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 0 1.25rem 0;
    padding: 14px 0 16px 0;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 2px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
}

.app-review-header-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.app-review-header-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6c757d;
    margin: 0 0 2px 0;
}

.app-review-header-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin: 0;
    line-height: 1.25;
    word-break: break-word;
}

.app-review-header-filename {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #495057;
    margin: 2px 0 0 0;
    word-break: break-all;
}

.app-review-header-filename-icon {
    width: 14px;
    height: 14px;
    color: #6c757d;
    flex-shrink: 0;
}

.app-review-header-subtitle {
    font-size: 13px;
    color: #6c757d;
    margin: 2px 0 0 0;
}

.app-review-round-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-review-round-accordion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.app-review-round-label {
    font-size: 13px;
    font-weight: 500;
}

.app-review-round-date {
    font-size: 12px;
    color: #6c757d;
}

.app-review-round-request-count {
    font-size: 12px;
    color: #6c757d;
}

.app-review-round-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-review-round-section-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin: 0 0 4px;
}

.app-review-round-submission-note {
    font-size: 13px;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px 12px;
    line-height: 1.5;
}

.app-review-round-submission-textarea {
    width: 100%;
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    resize: vertical;
    line-height: 1.5;
    color: #212529;
    background: #fff;
    box-sizing: border-box;
}

    .app-review-round-submission-textarea:focus {
        outline: none;
        border-color: #85b7eb;
    }

.app-review-round-doc-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.app-review-round-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #0c447c;
    padding: 6px 12px;
    border: 1px solid #85b7eb;
    border-radius: 6px;
    text-decoration: none;
}

    .app-review-round-doc-link:hover {
        background: #e6f1fb;
    }

.app-review-round-requests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-review-round-request-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
}

.app-review-round-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 99px;
    background: #e6f1fb;
    color: #0c447c;
    border: 1px solid #85b7eb;
    margin-bottom: 4px;
}

.app-review-round-request-body {
    font-size: 13px;
    line-height: 1.5;
    margin: 4px 0 0;
}

.app-review-round-reviewer-note {
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 12px;
    background: #f8f9fa;
    border-left: 2px solid #dee2e6;
}

.app-review-round-empty-requests {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

.app-review-round-empty-state {
    font-size: 13px;
    color: #6c757d;
    padding: 24px;
    text-align: center;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
}

/* card replacement */
.app-review-round-card {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: hidden;
}

.app-review-round-card-active {
    border-color: #85b7eb;
}

.app-review-round-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

    .app-review-round-card-header:hover {
        background: #f8f9fa;
    }

.app-review-round-card-header-active {
    background: #e6f1fb;
    cursor: default;
}

    .app-review-round-card-header-active:hover {
        background: #e6f1fb;
    }

.app-review-round-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.app-review-round-card-chevron {
    width: 16px;
    height: 16px;
    color: #6c757d;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.app-review-round-card-chevron-open {
    transform: rotate(90deg);
}

.app-review-round-card-body {
    border-top: 1px solid #dee2e6;
    display: none;
}

.app-review-round-card-body-open {
    display: block;
}

.app-review-round-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-review-round-card-actions {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-review-round-action-label {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.app-review-round-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.app-review-round-terminal-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.app-review-round-terminal-message {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* button replacement */
.app-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #212529;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

    .app-review-btn:hover {
        background: #f8f9fa;
    }

    .app-review-btn:active {
        transform: scale(0.98);
    }

.app-review-btn-primary {
    background: #e6f1fb;
    color: #0c447c;
    border-color: #85b7eb;
}

    .app-review-btn-primary:hover {
        background: #b5d4f4;
    }

.app-review-btn-success {
    background: #eaf3de;
    color: #27500a;
    border-color: #97c459;
}

    .app-review-btn-success:hover {
        background: #c0dd97;
    }

.app-review-btn-danger {
    background: #fcebeb;
    color: #791f1f;
    border-color: #f09595;
}

    .app-review-btn-danger:hover {
        background: #f7c1c1;
    }

.app-review-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 99px;
    border: 1px solid;
    white-space: nowrap;
}

.app-review-status-active {
    background: #e6f1fb;
    color: #0c447c;
    border-color: #85b7eb;
}

.app-review-status-draft {
    background: #f1efe8;
    color: #444441;
    border-color: #b4b2a9;
}

.app-review-status-none {
    background: #f1efe8;
    color: #444441;
    border-color: #b4b2a9;
}

.app-review-status-unverified {
    background: #f1efe8;
    color: #444441;
    border-color: #b4b2a9;
}

.app-review-status-pending {
    background: #e6f1fb;
    color: #0c447c;
    border-color: #85b7eb;
}

.app-review-status-reviewdeclined {
    background: #faeeda;
    color: #633806;
    border-color: #ef9f27;
}

.app-review-status-reviewaccepted {
    background: #eaf3de;
    color: #27500a;
    border-color: #97c459;
}

.app-review-status-pendingresubmission {
    background: #faeeda;
    color: #633806;
    border-color: #ef9f27;
}

.app-review-status-informationrequestadded {
    background: #e6f1fb;
    color: #0c447c;
    border-color: #85b7eb;
}

.app-review-status-informationrequestwithdrawn {
    background: #f1efe8;
    color: #444441;
    border-color: #b4b2a9;
}

.app-review-status-changesrequested {
    background: #faeeda;
    color: #633806;
    border-color: #ef9f27;
}

.app-review-status-approved {
    background: #eaf3de;
    color: #27500a;
    border-color: #97c459;
}

.app-review-status-markedunverifiable {
    background: #faeeda;
    color: #633806;
    border-color: #ef9f27;
}

.app-review-status-unverifiable {
    background: #faeeda;
    color: #633806;
    border-color: #ef9f27;
}

.app-review-status-failedverification {
    background: #fcebeb;
    color: #791f1f;
    border-color: #f09595;
}

.app-review-status-verified {
    background: #eaf3de;
    color: #27500a;
    border-color: #97c459;
}

.app-review-status-expired {
    background: #f1efe8;
    color: #444441;
    border-color: #b4b2a9;
}

/* Attempt card — wraps an attempt's rounds in a labeled container.
   Used by both the active attempt (always expanded) and the inline
   most-recent terminated attempt. Visual hierarchy matches the
   history accordion so active + history feel consistent. */
.app-attempt-card {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    margin: 12px 0;
}

.app-attempt-card-active {
    border-color: #85b7eb;
}

.app-attempt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 12px;
    background: #f8f9fa;
}

.app-attempt-card-active .app-attempt-card-header {
    background: #e6f1fb;
}

.app-attempt-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.app-attempt-card-label {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.app-attempt-card-date {
    font-size: 13px;
    color: #6c757d;
}

.app-attempt-card-verifier {
    font-size: 13px;
    color: #495057;
}

.app-attempt-card-body {
    border-top: 1px solid #dee2e6;
    padding: 12px 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

/* Attempt history accordion */
.app-attempt-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    width: 100%;
    box-sizing: border-box;
}

.app-attempt-history-card {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
}

.app-attempt-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    background: #f8f9fa;
}

    .app-attempt-history-header:hover {
        background: #eef1f4;
    }

.app-attempt-history-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.app-attempt-history-label {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.app-attempt-history-date {
    font-size: 13px;
    color: #6c757d;
}

.app-attempt-history-verifier {
    font-size: 13px;
    color: #495057;
}

.app-attempt-history-rounds {
    font-size: 12px;
    color: #6c757d;
}

.app-attempt-history-body {
    border-top: 1px solid #dee2e6;
    display: none;
    padding: 12px 14px;
    background: #fff;
}

.app-attempt-history-body-open {
    display: block;
}

/* Verifier inline request editor — table of staged requests the verifier adds
   before posting a non-terminal decision. Each row is cloned from the hidden
   <template> in VerifierTimeline.cshtml. */
.app-review-round-hint {
    font-size: 12px;
    color: #6c757d;
    margin: 4px 0 8px 0;
}

.app-verifier-requests-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 8px;
}

.app-verifier-requests-table th,
.app-verifier-requests-table td {
    padding: 6px 6px;
    vertical-align: middle;
    text-align: left;
}

.app-verifier-requests-table thead th {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.app-verifier-requests-col-type {
    width: 220px;
}

.app-verifier-requests-col-note {
    width: auto;
}

.app-verifier-requests-col-actions {
    width: 40px;
    text-align: center;
}

.app-verifier-request-row td {
    border-bottom: 1px solid #f1f3f5;
}

.app-verifier-request-type,
.app-verifier-request-note {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
}

    .app-verifier-request-type:focus,
    .app-verifier-request-note:focus {
        outline: none;
        border-color: #85b7eb;
        box-shadow: 0 0 0 2px rgba(133, 183, 235, 0.25);
    }

.app-verifier-request-remove {
    padding: 2px 8px;
    font-size: 14px;
    line-height: 1;
    min-width: 28px;
}

.app-verifier-request-add {
    font-size: 13px;
    padding: 6px 12px;
}

/* Submitter per-request response items — one block per verifier request,
   showing the request type/note (read-only) and a textarea where the
   submitter types a reply. Posted as submitterResponsesJson on submit. */
.app-submitter-responses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-submitter-response-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-submitter-response-request {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.app-submitter-response-request-note {
    margin: 0;
    font-size: 13px;
    color: #212529;
    flex: 1;
    min-width: 0;
}

.app-submitter-response-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-top: 4px;
}

.app-submitter-response-note {
    width: 100%;
    box-sizing: border-box;
}

/* Verifier-side paired Q&A display — for each verifier request on the
   previous round, show the request and the submitter's matching response
   (or "no response" if the submitter skipped it). */
.app-verifier-review-qa-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-verifier-review-qa-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-verifier-review-qa-request {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.app-verifier-review-qa-request-note {
    margin: 0;
    font-size: 13px;
    color: #212529;
    flex: 1;
    min-width: 0;
}

.app-verifier-review-qa-response {
    padding-left: 10px;
    border-left: 3px solid #85b7eb;
}

.app-verifier-review-qa-response-label {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 4px 0;
}

.app-verifier-review-qa-response-note {
    font-size: 13px;
    color: #212529;
    white-space: pre-wrap;
}

.app-verifier-review-qa-response-empty {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

/* Document attachment picker — compact trigger (button + chip list) that
   opens the page-level DocumentPickerDialog. Chips show currently-selected
   documents; click × on a chip to remove just that one without re-opening. */
.app-document-picker-trigger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.app-document-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-document-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #eef1f4;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    font-size: 12px;
    color: #212529;
    max-width: 100%;
    word-break: break-all;
}

.app-document-picker-chip-remove {
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 50%;
}

    .app-document-picker-chip-remove:hover {
        color: #dc3545;
        background: #fff;
    }

.app-document-picker-open {
    align-self: flex-start;
    font-size: 12px;
    padding: 4px 10px;
}

.app-document-picker-dialog .e-dialog .e-dlg-content {
    padding: 12px 16px;
}
