/*
    side-panel.css
*/

.side-panel-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    color: #424143;
}

.side-panel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

/* ── Document Summary block ─────────────────────────────────────────── */
.summary-block {
    margin-bottom: 16px;
}

/* No longer referenced - Document Summary's heading is now .summary-toggle
   below (it needed the toggle's flex layout/chevron, which this didn't
   have). Left in place rather than deleted in case something else wants
   a plain, non-interactive heading in this same style later. */
.summary-heading {
    font-weight: 500;
    font-size: 14px;
    color: #424143;
    margin-bottom: 12px;
}

/* Document Summary's own collapsible toggle - deliberately NOT styled like
   .accordion-header below (no grey background, no border box): this is
   reference info being tucked away, not another actionable section, so it
   should read as lighter-weight than Files/Reviewers/My Review/etc. */
.summary-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #e1e1e1;
    padding: 0 0 8px;
    margin-bottom: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: #424143;
}

    .summary-toggle:hover .summary-toggle-title {
        text-decoration: underline;
    }

    .summary-toggle i {
        font-size: 11px;
        color: #605e5c;
    }

.summary-toggle-title {
    font-weight: 500;
    font-size: 14px;
}

/* Toggle + settings gear on one line; the row carries the divider so the
   gear sits on it too. */
.summary-toggle-row {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 12px;
}

    .summary-toggle-row .summary-toggle {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 6px;
    }

.summary-settings-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
    border: none;
    border-radius: 2px;
    background: none;
    color: #8a8886;
    font-size: 12px;
    cursor: pointer;
}

    .summary-settings-btn:hover {
        background: #f3f2f1;
        color: #323130;
    }

    .summary-settings-btn:focus-visible {
        outline: 2px solid #0078d4;
        outline-offset: 1px;
    }

/* ── Markups identified badge ─────────────────────────────────────────── */
.markups-identified-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #007faa;
    margin-bottom: 10px;
}

/* ── Task type (Review / Consolidation) badge ─────────────────────────── */
.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 3px 9px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.task-badge-review {
    background: #deecf9;
    color: #004578;
}

.task-badge-consolidation {
    background: #e6f0d0;
    color: #294903;
}

.field-row {
    margin-bottom: 10px;
}

.field-label {
    display: block;
    font-weight: 500;
    color: #444;
    margin-bottom: 2px;
}

.field-value {
    color: #424143;
    word-break: break-word;
}

.field-empty {
    color: #a19f9d;
}

.file-name {
    font-size: 12px;
    word-break: break-all;
}

/* ── File list (Document Summary) ───────────────────────────────────────── */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.file-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 2px 0;
    font-family: inherit;
    font-size: 12px;
    color: #007faa;
    cursor: pointer;
    text-align: left;
    word-break: break-word;
}

    .file-link:hover {
        text-decoration: underline;
    }

.file-link-active {
    font-weight: 600;
}

.file-live-dot {
    font-size: 5px;
    color: #107c10;
    margin-left: 2px;
}

.file-static {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #605e5c;
    padding: 2px 0;
    word-break: break-word;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.action-btn {
    padding: 8px 12px;
    border: 1px solid #cacaca;
    border-radius: 3px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 175ms cubic-bezier(.1, .65, .1, .65);
}

.action-btn-primary {
    background: #007faa;
    color: #ffffff;
    border-color: #006c91;
}

    .action-btn-primary:hover {
        background: #006691;
        border-color: #005478;
    }

    .action-btn-primary:disabled {
        background: #b9c2c8;
        border-color: #a9b3ba;
        color: #f0f0f0;
        cursor: not-allowed;
    }

        .action-btn-primary:disabled:hover {
            background: #b9c2c8;
            border-color: #a9b3ba;
        }

/* ── Accordion sections ──────────────────────────────────────────────── */
.accordion-section {
    border: 1px solid #cfd6dd;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #ebedf0;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

    .accordion-header:hover {
        background: #dfe2e6;
    }

.accordion-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accordion-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.accordion-title {
    font-weight: 600;
    font-size: 13px;
    color: #424143;
}

.badge-editing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff4ce;
    color: #4a3f0a;
    border: 1px solid #ffd335;
}

.accordion-subtitle {
    font-size: 11px;
    color: #605e5c;
}

.subtitle-complete {
    color: #107c10;
}

.subtitle-pending {
    color: #7d4e00;
}

.required-star {
    color: #d7142c;
}

.accordion-body {
    padding: 10px 12px 14px;
    border-top: 1px solid #cfd6dd;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
}

/* ── Reviewer / review rows ───────────────────────────────────────────── */
.user-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px;
    border-radius: 4px;
    background: #f3f2f1;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007faa;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.user-roles {
    margin-top: 4px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.review-row {
    padding: 10px;
    border-radius: 4px;
    background: #f3f2f1;
    border-left: 3px solid #cfd6dd;
    display: flex;
    flex-direction: column;
}

.review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.review-title {
    font-weight: 600;
    font-size: 12px;
    word-break: break-word;
    flex: 1;
}

.review-author {
    font-size: 11px;
    color: #605e5c;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.review-details {
    font-size: 12px;
    color: #424143;
    margin-top: 4px;
    white-space: pre-wrap;
}

.empty-state {
    text-align: center;
    color: #a19f9d;
    padding: 20px;
    font-size: 12px;
}

.view-comment-btn {
    align-self: flex-end;
    margin-top: 6px;
    background: none;
    border: none;
    color: #007faa;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
}

    .view-comment-btn:hover {
        text-decoration: underline;
    }

    .view-comment-btn:disabled {
        color: #a19f9d;
        cursor: not-allowed;
    }

        .view-comment-btn:disabled:hover {
            text-decoration: none;
        }

/* ── My Review - click-to-edit, autosave-on-blur textarea ────────────────
   Replaces the old view-text + separate Edit button; the textarea itself
   is always the editing surface (see SidePanel.razor's My Review section). */
.my-review-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
}

.my-review-textarea-error {
    border-color: #a80000;
}

.my-review-saving-hint {
    font-size: 11px;
    color: #605e5c;
    margin-top: 4px;
}

.my-review-saved-hint {
    color: #107c10;
}

/* ── View Comment modal ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-panel {
    background: #ffffff;
    border-radius: 6px;
    width: 320px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #cfd6dd;
    flex-shrink: 0;
}

.modal-title {
    font-weight: 600;
    font-size: 13px;
    color: #424143;
    word-break: break-word;
    margin-right: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #4d4c4f3b;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    padding: 2px 4px;
}

    .modal-close-btn:hover {
        color: #424143;
    }

.modal-body {
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-author {
    font-size: 12px;
    color: #605e5c;
}

.modal-comment-text {
    font-size: 13px;
    color: #424143;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f3f2f1;
    border-radius: 4px;
    padding: 10px;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-you {
    background: #deecf9;
    color: #004578;
}

.badge-consolidator {
    background: #e6f0d0;
    color: #294903;
}

.badge-reviewer {
    background: #f3f2f1;
    color: #605e5c;
    border: 1px solid #cfd6dd;
}

.badge-done {
    background: #dff6dd;
    color: #107c10;
}

.status-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-draft {
    background: #fff4ce;
    color: #7d4e00;
}

.status-complete {
    background: #dff6dd;
    color: #107c10;
}

.status-rejected {
    background: #fde7e9;
    color: #a4262c;
}

.status-default {
    background: #f3f2f1;
    color: #605e5c;
}

/* ── Return code select ───────────────────────────────────────────────── */
.return-code-select {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #cfd6dd;
    border-radius: 2px;
    font-family: inherit;
    font-size: 12px;
    color: #424143;
}

    .return-code-select:disabled {
        background: #f3f2f1;
        color: #a19f9d;
        cursor: not-allowed;
    }

/* ── Bottom action bar ─────────────────────────────────────────────────── */
.bottom-action-bar {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #cad0d7;
    background: #faf9f8;
}

.footer-btn {
    flex: 1;
    padding: 9px 0;
    border: 1px solid #cacaca;
    border-radius: 3px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 175ms cubic-bezier(.1, .65, .1, .65);
}

.footer-btn-waive {
    color: #5c5c5c;
    background: #f1f1f1;
}

    .footer-btn-waive:hover {
        background: #d0d0d0;
        border-color: #9e9e9ecc;
    }

    .footer-btn-waive:disabled {
        background: #f3f2f1;
        color: #c8c6c4;
        cursor: not-allowed;
    }

        .footer-btn-waive:disabled:hover {
            background: #f3f2f1;
            border-color: #cacaca;
        }

.footer-btn-complete {
    background: #007faa;
    color: #ffffff;
    border-color: #006c91;
}

    .footer-btn-complete:hover {
        background: #006691;
        border-color: #005478;
    }

    .footer-btn-complete:disabled {
        background: #b9c2c8;
        border-color: #a9b3ba;
        color: #f0f0f0;
        cursor: not-allowed;
    }

        .footer-btn-complete:disabled:hover {
            background: #b9c2c8;
            border-color: #a9b3ba;
        }
