/* Chỉ áp dụng cho bản popup riêng của detai_ver2. */
.copilot-modal {
    padding: 0 !important;
}

.copilot-modal.modal-1200 .modal-dialog.modal-lg {
    width: 98vw !important;
    max-width: none;
    height: 96vh;
    margin: 2vh auto !important;
}

.copilot-modal .modal-dialog>.modal-content {
    height: 96vh;
    max-height: 96vh;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    border-radius: 9px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .22);
}

.copilot-popup {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    font: 12px Arial, sans-serif;
    color: #334155;
}

.copilot-popup>.modal-content {
    display: none !important;
}

.copilot-popup>.modal-header,
.copilot-popup>.modal-footer {
    flex: none;
}

.copilot-popup>.modal-body {
    flex: 0 0 34vh;
    height: 34vh;
    min-height: 0;
    overflow: auto;
    border-bottom: 1px solid #dce7f5;
}

.copilot-popup>.modal-footer {
    padding: 8px 16px;
    background: #fff;
}

.copilot-popup>.modal-footer .btn {
    margin: 2px 4px;
}

.copilot-topbar {
    flex: none;
    min-height: 45px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}

.copilot-topbar strong {
    font-size: 14px;
    color: #1e293b;
}

.copilot-topbar>div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.copilot-topbar button {
    border: 0;
    background: none;
}

.copilot-topbar .copilot-mode {
    padding: 5px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    background: #eff6ff;
    color: #185394;
    font-weight: 600;
}

.copilot-topbar .copilot-close {
    color: #cf1322;
    font-size: 18px;
}

.copilot-workspace-host {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

.copilot-workspace {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: #fff;
}

.copilot-section {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid #185394;
    color: #64748b;
}

.copilot-section strong {
    color: #1e293b;
    font-size: 14px;
}

.copilot-section small {
    font-size: 11px;
}

.copilot-split {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    border-radius: 7px;
}

.copilot-sources {
    width: 220px;
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-right: 1px solid #dbe4ef;
}

.copilot-sources.collapsed {
    width: 54px;
    flex-basis: 54px;
}

.copilot-sources header {
    flex: none;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px solid #dce7f5;
}

.copilot-sources header>div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copilot-sources header i {
    color: #185394;
}

.copilot-sources header strong,
.copilot-sources header small {
    display: block;
}

.copilot-sources header strong {
    color: #1e293b;
}

.copilot-sources header small {
    font-size: 10px;
    color: #64748b;
}

.copilot-sources header button {
    border: 0;
    background: none;
    color: #64748b;
}

.copilot-source-content {
    flex: 1;
    min-height: 0;
    padding: 12px;
    overflow: auto;
}

.copilot-source-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    margin-bottom: 14px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    background: #eff6ff;
    font-size: 11px;
}

.copilot-source-summary strong,
.copilot-source-content h4 {
    margin: 0 0 7px;
    font-size: 10px;
    color: #185394;
    font-weight: 700;
}

.copilot-source-summary small {
    color: #64748b;
    font-size: 10px;
}

.copilot-source-content label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 7px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-weight: 400;
}

.copilot-source-content label input {
    margin: 0;
}

.copilot-source-content label i {
    color: #3b82f6;
}

.copilot-documents {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.copilot-empty-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    color: #64748b;
    font-size: 11px;
}

.copilot-empty-doc i {
    font-size: 18px;
}

.copilot-documents button {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    color: #185394;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copilot-source-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    color: #185394;
}

.copilot-outline,
.copilot-ai {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.copilot-outline {
    background: #fff;
}

.copilot-split.copilot-ai-open .copilot-outline {
    border-right: 5px solid #e2e8f0;
}

.copilot-outline header {
    flex: none;
    padding: 12px;
    border-bottom: 1px solid #dce7f5;
    background: #f2f7fd;
}

.copilot-outline header strong {
    color: #1e293b;
}

.copilot-outline header i {
    color: #2563eb;
}

.copilot-outline header span {
    margin-left: 4px;
    color: #94a3b8;
}

.copilot-editor {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 15px;
}

.copilot-editor .cke {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.copilot-editor .cke_inner,
.copilot-editor .cke_contents {
    max-width: 100%;
    box-sizing: border-box;
}

.copilot-outline footer {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-top: 1px solid #e8e8e8;
    background: #fafafa;
    color: #64748b;
    font-size: 11px;
}

.copilot-outline footer button {
    border: 0;
    border-radius: 4px;
    padding: 6px 10px;
    background: #185394;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.copilot-outline footer button:disabled {
    opacity: .55;
}

.copilot-ai {
    background: #f8fafc;
}

.copilot-ai header {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 11px;
    border-bottom: 1px solid #e2e8f0;
    background: #edf2f7;
}

.copilot-ai header>div {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 11px;
}

.copilot-ai header b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #185394;
    color: #fff;
}

.copilot-ai header strong {
    color: #1e293b;
}

.copilot-ai header span {
    color: #64748b;
}

.copilot-ai header em {
    padding: 2px 6px;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
    font-size: 10px;
    font-style: normal;
}

.copilot-ai nav {
    display: flex;
    gap: 3px;
    padding: 3px;
    border-radius: 7px;
    background: #e5ebf3;
}

.copilot-ai nav button {
    border: 0;
    border-radius: 5px;
    padding: 5px 8px;
    background: none;
    color: #64748b;
    font-size: 11px;
}

.copilot-ai nav button.active {
    background: #fff;
    color: #185394;
    box-shadow: 0 1px 3px #cbd5e1;
    font-weight: 600;
}

.copilot-context {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #dce7f5;
    background: #f3f8ff;
    color: #365979;
    font-size: 10px;
}

.copilot-context strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copilot-context span {
    flex: none;
    padding: 3px 8px;
    border: 1px solid #cfe0f2;
    border-radius: 12px;
    background: #fff;
    color: #185394;
}

.copilot-ai-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copilot-ai {
    background: #fff;
}

.copilot-ai header {
    background: #fff;
    border-bottom-color: #ececf1;
}

.copilot-ai nav {
    background: #f4f4f5;
}

.copilot-ai nav button.active {
    color: #202123;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.copilot-context {
    padding: 7px 14px;
    border-bottom-color: #f0f0f2;
    background: #fff;
    color: #71717a;
    font-size: 11px;
}

.copilot-context span {
    border-color: #e4e4e7;
    color: #52525b;
}

.copilot-chat-body {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    gap: 10px;
    overflow: hidden;
    padding: 12px 18px 4px;
    background: #fff;
}

.copilot-chat-older {
    align-self: center;
    flex: none;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background: #fff;
    color: #52525b;
    font-size: 11px;
    cursor: pointer;
}

.copilot-chat-older:hover {
    background: #f4f4f5;
}

.copilot-chat-history {
    width: 100%;
    max-width: 740px;
    flex: 1;
    min-height: 0;
    margin: 0 auto;
    padding: 10px 4px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scrollbar-color: #d4d4d8 transparent;
}

.copilot-chat-message {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #27272a;
    font-size: 13px;
    line-height: 1.65;
}

.copilot-chat-message.user {
    align-self: flex-end;
    width: fit-content;
    max-width: 82%;
    padding: 9px 14px;
    border: 0;
    border-radius: 20px;
    background: #f4f4f5;
    color: #27272a;
}

.copilot-chat-message.failed {
    color: #7f1d1d;
}

.copilot-chat-message>small:not(.copilot-chat-message-status) {
    display: none;
}

.copilot-chat-message .copilot-chat-message-status {
    display: block;
    margin: 7px 0 0;
    color: #71717a;
    font-size: 11px;
}

.copilot-chat-text {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
}

.copilot-chat-empty,
.copilot-chat-loading {
    max-width: 34ch;
    margin: auto;
    padding: 18px;
    color: #71717a;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.copilot-chat-error {
    align-self: stretch;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 12px;
    line-height: 1.5;
}

.copilot-chat-error button {
    min-height: 32px;
    margin-left: 8px;
    padding: 5px 10px;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background: #fff;
    color: #3f3f46;
    cursor: pointer;
}

.copilot-chat-error button:hover {
    background: #f4f4f5;
}

.copilot-composer {
    width: 100%;
    max-width: 740px;
    flex: none;
    margin: 0 auto;
    padding: 10px 4px 12px;
    border-top: 0;
    background: #fff;
}

.copilot-composer>div {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 9px 8px 15px;
    border: 1px solid #d4d4d8;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(24, 24, 27, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.copilot-composer>div:focus-within {
    border-color: #a1a1aa;
    box-shadow: 0 0 0 3px rgba(161, 161, 170, .14);
}

.copilot-composer textarea {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    max-height: 140px;
    padding: 8px 0;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
    color: #27272a;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: none;
}

.copilot-composer textarea::placeholder {
    color: #a1a1aa;
}

.copilot-composer button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: 50%;
    background: #27272a;
    color: #fff;
    font-size: 14px;
    transition: background .15s ease, opacity .15s ease;
}

.copilot-composer button:not(:disabled):hover {
    background: #52525b;
}

.copilot-composer button:disabled {
    background: #e4e4e7;
    color: #a1a1aa;
    opacity: 1;
    cursor: not-allowed;
}

.copilot-composer small {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    padding: 0 8px;
    color: #a1a1aa;
    font-size: 10px;
}

.copilot-composer small span {
    flex: none;
    color: #a1a1aa;
}

.copilot-empty {
    max-width: 370px;
    padding: 20px;
    text-align: center;
    color: #64748b;
}

.copilot-empty>b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 9px;
    border-radius: 50%;
    background: #dbeafe;
    color: #185394;
    font-size: 18px;
}

.copilot-empty h3 {
    margin: 0 0 7px;
    font-size: 17px;
    font-weight: 700;
    color: #203951;
}

.copilot-empty p {
    margin: 0 0 16px;
    font-size: 11px;
    line-height: 1.5;
}

.copilot-empty>strong {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
}

.copilot-empty small {
    color: #94a3b8;
}

.copilot-empty button {
    margin: 3px;
    padding: 6px 8px;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 11px;
}

.copilot-empty button:disabled {
    opacity: .55;
}

.copilot-composer {
    flex: none;
    padding: 11px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.copilot-composer>div {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
}

.copilot-composer textarea {
    flex: 1;
    min-width: 0;
    border: 0;
    resize: none;
    outline: 0;
    font-size: 11px;
}

.copilot-composer button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: #185394;
    color: #fff;
}

.copilot-composer button:disabled {
    opacity: .5;
}

.copilot-composer small {
    display: block;
    margin-top: 6px;
    color: #185394;
}

.copilot-composer small span {
    float: right;
    color: #94a3b8;
}

@media (max-width: 900px) {
    .copilot-workspace {
        overflow: auto;
    }

    .copilot-split {
        flex-direction: column;
        overflow: visible;
    }

    .copilot-sources,
    .copilot-sources.collapsed {
        width: 100%;
        flex-basis: auto;
        min-height: 180px;
    }

    .copilot-outline,
    .copilot-ai {
        min-height: 470px;
    }

    .copilot-outline {
        border-right: 0;
        border-bottom: 5px solid #e2e8f0;
    }
}

@media (max-width: 600px) {
    .copilot-topbar {
        flex-wrap: wrap;
    }

    .copilot-topbar strong {
        font-size: 12px;
    }

    .copilot-section {
        align-items: flex-start;
    }

    .copilot-section small {
        display: none;
    }

    .copilot-context span {
        display: none;
    }

    .copilot-ai nav {
        width: 100%;
        overflow-x: auto;
    }

    .copilot-ai nav button {
        white-space: nowrap;
    }

    .copilot-chat-body {
        padding: 8px 12px 2px;
    }

    .copilot-chat-message.user {
        max-width: 90%;
    }

    .copilot-composer {
        padding: 8px 2px 10px;
    }

    .copilot-composer small {
        font-size: 9px;
    }
}

.copilot-editor-unavailable {
    padding: 24px;
    color: #64748b;
    text-align: center;
}

.copilot-popup>.modal-body .control-label {
    color: #334155;
    font-size: 12px;
    font-weight: 400;
}

.copilot-popup>.modal-body .form-control,
.copilot-popup>.modal-body .ui-select-container {
    border-color: #d9d9d9;
    border-radius: 4px;
    font-size: 12px;
}

.copilot-popup>.modal-body .form-control:focus {
    border-color: #5790cc;
    box-shadow: 0 0 0 2px rgba(24, 83, 148, .1);
}

.copilot-popup>.modal-header {
    padding: 10px 16px;
}

.copilot-registration-editor-note {
    margin: 5px 0 12px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 5px;
    background: #f3f8ff;
    color: #365979;
}

.copilot-popup.ai-expanded>.modal-body {
    display: none !important;
}

@media (max-height: 700px) {
    .copilot-popup>.modal-body {
        flex-basis: 28vh;
        height: 28vh;
    }
}
.copilot-attach-form { display: grid; gap: 6px; }
.copilot-attach-form input { min-width: 0; width: 100%; padding: 7px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; }
.copilot-attach-form button, .copilot-review button, .copilot-chat-questions button, .copilot-chat-suggestions button {
    padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #185394; cursor: pointer;
}
.copilot-attach-form button:disabled, .copilot-review button:disabled, .copilot-chat-questions button:disabled { opacity: .5; cursor: not-allowed; }
.copilot-attach-error { margin: 6px 0; color: #b91c1c; font-size: 11px; }
.copilot-attachment { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 6px; padding: 6px; border: 1px solid #dbe4ef; border-radius: 5px; background: #fff; }
.copilot-attachment span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copilot-attachment button { border: 0; background: none; color: #b91c1c; }
.copilot-context select { flex: 1; min-width: 0; max-width: 340px; padding: 4px 6px; border: 1px solid #e2e8f0; border-radius: 5px; background: #fff; }
.copilot-context button { flex: none; border: 0; background: none; color: #185394; }
.copilot-review { flex: 0 1 62%; min-height: 0; max-height: 65%; display: flex; flex-direction: column; overflow: hidden; border-bottom: 1px solid #dbe4ef; background: #fff; }
.copilot-review-heading { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 16px 10px; }
.copilot-review-heading strong { display: block; color: #1e293b; font-size: 14px; }
.copilot-review-heading small { display: block; margin-top: 3px; color: #64748b; font-size: 11px; line-height: 1.4; }
.copilot-review-heading>span { flex: none; padding: 3px 7px; border-radius: 999px; background: #eff6ff; color: #185394; font-size: 11px; }
.copilot-review-bulk { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 0 16px 11px; border-bottom: 1px solid #e8edf3; }
.copilot-review-bulk span { margin-right: 3px; color: #64748b; font-size: 11px; }
.copilot-review-bulk button { padding: 5px 9px; border: 1px solid #dbe4ef; border-radius: 6px; background: #fff; color: #185394; font-size: 11px; }
.copilot-review-bulk button:hover { background: #eff6ff; }
.copilot-review-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 16px; background: #f8fafc; }
.copilot-review-section { margin-bottom: 10px; padding: 0; overflow: hidden; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; }
.copilot-review-section-title { padding: 10px 12px; border-bottom: 1px solid #edf1f5; color: #1e293b; font-size: 12px; }
.copilot-review-hunk { padding: 10px 12px 12px; border-top: 1px solid #edf1f5; }
.copilot-review-section-title+.copilot-review-hunk, .copilot-review-section-title+div>.copilot-review-hunk:first-child { border-top: 0; }
.copilot-review-item-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: #64748b; font-size: 11px; }
.copilot-review-item-title small { color: #185394; font-size: 11px; font-weight: 600; }
.copilot-review-compare { display: grid; grid-template-columns: 1fr; gap: 7px; margin: 0 0 9px; }
.copilot-review-compare>div { min-width: 0; }
.copilot-review-compare small { display: block; padding: 6px 9px 0; font-size: 11px; font-weight: 600; }
.copilot-review-old { border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; }
.copilot-review-old small { color: #64748b; }
.copilot-review-new { border: 1px solid #bfdbfe; border-radius: 7px; background: #f3f8ff; }
.copilot-review-new small { color: #185394; }
.copilot-review-compare pre { max-height: 105px; margin: 0; padding: 5px 9px 8px; overflow: auto; border: 0; background: transparent; color: #334155; font: 12px/1.5 Arial, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.copilot-workspace-tab pre { max-height: none; overflow: auto; margin: 3px 0; padding: 8px; border: 1px solid #e2e8f0; border-radius: 5px; background: #f8fafc; color: #334155; font: 12px/1.5 Arial, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.copilot-review-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.copilot-review-actions button { flex: 1 1 150px; min-height: 34px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #334155; font-size: 11px; font-weight: 600; }
.copilot-review-actions button i { margin-right: 3px; }
.copilot-review-actions button:hover { border-color: #8bb4df; background: #f3f8ff; }
.copilot-review-actions button.active { border-color: #185394; background: #eaf2fb; color: #185394; }
.copilot-review-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid #dbe4ef; background: #fff; }
.copilot-review-footer span { min-width: 0; color: #64748b; font-size: 11px; }
.copilot-review-footer button.primary { flex: none; min-height: 34px; padding: 8px 12px; border: 1px solid #185394; border-radius: 7px; background: #185394; color: #fff; font-size: 11px; font-weight: 600; }
.copilot-review-footer button.primary:disabled { opacity: .5; cursor: not-allowed; }
.copilot-review button { cursor: pointer; }
.copilot-review button:disabled { cursor: not-allowed; }
.copilot-chat-progress { margin-top: 9px; padding: 10px 12px; border-left: 2px solid #3b82f6; border-radius: 0 8px 8px 0; background: #eff6ff; color: #475569; font-size: 11px; }
.copilot-chat-live-phase { display: flex; align-items: center; gap: 8px; min-height: 18px; color: #185394; }
.copilot-chat-live-phase strong { font-size: 11px; font-weight: 600; }
.copilot-chat-live-indicator { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #3b82f6; animation: copilot-chat-pulse 1.4s ease-in-out infinite; }
.copilot-chat-live-dots { display: inline-flex; gap: 3px; align-items: center; }
.copilot-chat-live-dots i { width: 3px; height: 3px; border-radius: 50%; background: #3b82f6; animation: copilot-chat-dot 1s ease-in-out infinite; }
.copilot-chat-live-dots i:nth-child(2) { animation-delay: .15s; }
.copilot-chat-live-dots i:nth-child(3) { animation-delay: .3s; }
.copilot-chat-progress-steps { display: grid; gap: 5px; margin: 9px 0 0 3px; padding-left: 12px; border-left: 1px solid #bfdbfe; }
.copilot-chat-progress-step { display: flex; align-items: flex-start; gap: 7px; color: #64748b; line-height: 1.45; }
.copilot-chat-progress-step i { width: 12px; flex: none; margin-top: 2px; color: #64748b; }
.copilot-chat-progress-step.current { color: #334155; }
.copilot-chat-progress-step.current i { color: #185394; }
@keyframes copilot-chat-pulse { 50% { opacity: .35; transform: scale(.78); } }
@keyframes copilot-chat-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .copilot-chat-live-indicator, .copilot-chat-live-dots i { animation: none; } }
.copilot-chat-questions { margin-top: 12px; padding: 16px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fff; }
.copilot-chat-question + .copilot-chat-question { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e2e8f0; }
.copilot-chat-questions strong, .copilot-chat-questions small { display: block; }
.copilot-chat-question strong { color: #1e293b; font-size: 14px; line-height: 1.45; }
.copilot-chat-question-label { margin-bottom: 4px; color: #185394; font-size: 11px; font-weight: 700; }
.copilot-chat-question-hint { margin-top: 3px; color: #64748b; font-size: 11px; }
.copilot-chat-options { display: grid; gap: 8px; margin-top: 12px; }
.copilot-chat-questions .copilot-chat-choice { display: flex; align-items: flex-start; gap: 11px; width: 100%; min-height: 58px; padding: 11px 12px; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; color: #1e293b; text-align: left; }
.copilot-chat-questions .copilot-chat-choice:hover, .copilot-chat-questions .copilot-chat-other:hover { background: #f6f9fc; }
.copilot-chat-questions .copilot-chat-choice.active { border-color: #185394; background: #eff6ff; }
.copilot-chat-choice-mark { display: grid; flex: none; place-items: center; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid #94a3b8; border-radius: 50%; color: #fff; font-size: 10px; }
.copilot-chat-choice-mark.multi { border-radius: 4px; }
.copilot-chat-choice.active .copilot-chat-choice-mark { border-color: #185394; background: #185394; }
.copilot-chat-choice-content { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.copilot-chat-choice-content small { margin-top: 3px; color: #64748b; font-size: 11px; font-weight: 400; line-height: 1.45; }
.copilot-chat-choice em { margin-left: 5px; color: #167044; font-size: 10px; font-style: normal; font-weight: 600; }
.copilot-chat-questions .copilot-chat-other { justify-self: start; padding: 3px 0; border: 0; background: none; color: #185394; font-size: 12px; }
.copilot-chat-questions .copilot-chat-other.active { font-weight: 700; }
.copilot-chat-questions textarea { width: 100%; margin-top: 9px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; resize: vertical; }
.copilot-chat-questions textarea:focus { border-color: #185394; outline: 2px solid #dbeafe; }
.copilot-chat-question-footer { display: flex; justify-content: flex-end; margin-top: 15px; padding-top: 13px; border-top: 1px solid #e2e8f0; }
.copilot-chat-questions .copilot-chat-submit { min-height: 36px; padding: 8px 13px; border: 1px solid #185394; border-radius: 8px; background: #185394; color: #fff; font-size: 12px; font-weight: 600; }
.copilot-chat-submit i { margin-left: 6px; }
.copilot-chat-questions .copilot-chat-submit:hover:not(:disabled) { background: #123f72; }
.copilot-chat-questions .copilot-chat-submit:disabled { opacity: .5; }
.copilot-chat-suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.copilot-chat-suggestions button { display: inline-flex; align-items: flex-start; gap: 8px; max-width: 100%; padding: 6px 11px; border: 1px solid #dce5ef; border-radius: 999px; background: #f8fafc; color: #475569; font-size: 12px; line-height: 1.45; text-align: left; white-space: normal; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.copilot-chat-suggestions button i { flex: none; margin-top: 2px; color: #3975b9; font-size: 11px; }
.copilot-chat-suggestions button:hover:not(:disabled) { border-color: #b8cde2; background: #eff6fc; color: #263f58; }
.copilot-chat-suggestions button:focus-visible { outline: 2px solid #9fc2e4; outline-offset: 2px; }
.copilot-chat-suggestions button:disabled { opacity: .6; cursor: default; }
.copilot-workspace-tab { display: block; padding: 18px; }
.copilot-workspace-tab>div, .copilot-workspace-tab>pre { max-width: 740px; margin: 0 auto; }
.copilot-workspace-tab pre { max-height: none; }
.copilot-workspace-tab ol { padding-left: 20px; }
.copilot-workspace-tab a { overflow-wrap: anywhere; }


.copilot-workspace-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.copilot-workspace-tools button, .copilot-apply-outline, .copilot-chat-empty button { padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #185394; }
.copilot-workspace-tools small { color: #64748b; }
.copilot-chat-empty button { display: block; width: 100%; margin: 5px 0; text-align: left; }



/* Chat layout: editor and conversation */
.copilot-section { margin-bottom: 6px; padding-bottom: 6px; }
.copilot-split.copilot-ai-open .copilot-outline { border-right: 1px solid #dbe4ef; }
.copilot-split.copilot-ai-open .copilot-ai { flex: 1 1 48%; }
.copilot-split.copilot-ai-open .copilot-outline { flex: 1 1 52%; }
.copilot-ai-header { min-height: 45px; }
.copilot-ai-header>div { font-size: 13px; }
.copilot-ai-header nav { white-space: nowrap; }
.copilot-ai-header nav button { font-size: 12px; padding: 6px 11px; }
.copilot-result-tabs { flex: none; display: flex; gap: 4px; padding: 7px 14px; border-bottom: 1px solid #e9edf2; background: #fff; }
.copilot-result-tabs button { padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: #64748b; font-size: 12px; }
.copilot-result-tabs button.active { background: #eaf2fb; color: #185394; font-weight: 600; }
.copilot-context { position: relative; z-index: 2; min-height: 40px; gap: 8px; padding: 5px 14px; }
.copilot-context select { max-width: none; min-height: 29px; font-size: 12px; }
.copilot-context>button, .copilot-more>button { width: 30px; height: 30px; border-radius: 7px; font-size: 13px; }
.copilot-context>button:hover, .copilot-more>button:hover { background: #f1f5f9; }
.copilot-more { position: relative; flex: none; }
.copilot-more-menu { position: absolute; right: 0; top: 33px; z-index: 10; min-width: 120px; padding: 4px; border: 1px solid #dbe4ef; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.13); }
.copilot-more-menu button { display: block; width: 100%; padding: 7px 9px; border: 0; border-radius: 5px; text-align: left; color: #334155; font-size: 12px; }
.copilot-more-menu button:hover { background: #f1f5f9; }
.copilot-ai .copilot-sources { width: auto; flex: none; max-height: 220px; overflow: auto; border-right: 0; border-bottom: 1px solid #dbe4ef; background: #f8fafc; }
.copilot-ai .copilot-sources header { min-height: 0; gap: 8px; padding: 8px 14px; font-size: 12px; }
.copilot-ai .copilot-sources header button { margin-left: auto; border: 0; background: none; color: #64748b; }
.copilot-ai .copilot-source-content { display: block; padding: 0 14px 12px; }
.copilot-source-hint { margin: 0 0 8px; color: #64748b; font-size: 11px; }
.copilot-ai .copilot-attach-form { grid-template-columns: 1fr 1fr auto; align-items: center; }
.copilot-ai .copilot-attach-form button { white-space: nowrap; }
.copilot-ai .copilot-documents { margin-top: 9px; }
.copilot-review-notice { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #f4d8a5; background: #fff9eb; color: #704b0e; }
.copilot-review-notice>div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.copilot-review-notice>div>i { font-size: 16px; }
.copilot-review-notice strong, .copilot-review-notice small { display: block; }
.copilot-review-notice strong { font-size: 12px; }
.copilot-review-notice small { margin-top: 2px; color: #8b6a35; font-size: 10px; }
.copilot-review-notice button { flex: none; padding: 6px 9px; border: 1px solid #d9aa59; border-radius: 6px; background: #fff; color: #704b0e; font-size: 11px; font-weight: 600; }
.copilot-chat-body { padding: 8px 18px 0; }
.copilot-chat-history { gap: 20px; padding: 12px 4px 18px; }
.copilot-chat-message { font-size: 14px; line-height: 1.6; }
.copilot-chat-message.user { max-width: 85%; padding: 10px 14px; background: #eef4fb; }
.copilot-chat-empty { max-width: none; margin: auto 0 0; padding: 8px 4px 12px; text-align: left; }
.copilot-chat-empty p { margin: 0 0 8px; font-weight: 600; color: #334155; }
.copilot-chat-empty button { display: inline-block; width: auto; margin: 0 6px 6px 0; padding: 8px 11px; border-radius: 999px; text-align: center; font-size: 12px; }
.copilot-composer { width: 100%; max-width: none; padding: 10px 18px 12px; border-top: 0; }
.copilot-composer>.copilot-composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 7px 8px; border: 1px solid #cbd5e1; border-radius: 18px; box-shadow: 0 2px 8px rgba(15,23,42,.06); }
.copilot-composer>.copilot-composer-box:focus-within { border-color: #4c8ccf; box-shadow: 0 0 0 3px rgba(76,140,207,.12); }
.copilot-composer textarea { min-height: 38px; max-height: 130px; padding: 8px 0; resize: vertical; font-size: 14px; line-height: 1.4; }
.copilot-composer .copilot-attach-toggle { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: transparent; color: #64748b; font-size: 15px; }
.copilot-composer .copilot-attach-toggle.active, .copilot-composer .copilot-attach-toggle:hover { background: #eaf2fb; color: #185394; }
.copilot-composer .copilot-attach-toggle span { margin-left: 2px; font-size: 10px; }
.copilot-composer .copilot-send { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: #185394; color: #fff; }
.copilot-composer .copilot-send:disabled { background: #e4e8ee; color: #94a3b8; opacity: 1; }
.copilot-composer small { display: flex; justify-content: space-between; margin-top: 5px; padding: 0 5px; color: #94a3b8; font-size: 10px; }
.copilot-composer small span { float: none; }
@media (max-width: 900px) { .copilot-split.copilot-ai-open .copilot-outline { border-right: 0; border-bottom: 1px solid #dbe4ef; } .copilot-ai .copilot-sources { min-height: 0; } }
@media (max-width: 600px) { .copilot-ai .copilot-attach-form { grid-template-columns: 1fr; } .copilot-ai-header { flex-wrap: wrap; } .copilot-composer { padding: 8px 12px 10px; } }

/* Split view and focused review */
.copilot-workspace { padding: 10px 12px 12px; background: #f7f9fc; }
.copilot-section { margin-bottom: 8px; border-bottom: 0; }
.copilot-split { border-color: #dce4ee; border-radius: 12px; background: #fff; box-shadow: 0 3px 18px rgba(15,23,42,.06); }
.copilot-split.copilot-ai-open .copilot-outline { border-right: 1px solid #dce4ee; }
.copilot-outline header, .copilot-ai-header { min-height: 48px; display: flex; align-items: center; }
.copilot-outline header { background: #fff; border-bottom: 1px solid #e8edf3; }
.copilot-ai-header { padding: 8px 15px; }
.copilot-ai-header>div strong { font-size: 13px; }
.copilot-review-mode { color: #64748b; font-size: 11px; font-weight: 600; }
.copilot-outline footer { min-height: 42px; background: #fff; }
.copilot-mobile-tabs { display: none; }
.copilot-chat-history { scroll-behavior: smooth; }
.copilot-chat-message.assistant { position: relative; padding-left: 32px; }
.copilot-chat-message.assistant:before { content: "✦"; position: absolute; top: 1px; left: 0; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: #eaf2fb; color: #185394; font-size: 13px; }
.copilot-chat-message.user { border-bottom-right-radius: 6px; }
.copilot-chat-text strong { color: #18283a; font-weight: 700; }
.copilot-chat-text code { padding: 1px 4px; border: 1px solid #e2e8f0; border-radius: 4px; background: #f5f7fa; color: #31425a; font: 12px/1.5 Consolas, monospace; }
.copilot-chat-empty { max-width: 430px; margin: auto; padding: 20px 10px; text-align: center; }
.copilot-chat-empty p { margin-bottom: 14px; font-size: 15px; }
.copilot-review { flex: 1 1 auto; max-height: none; border-bottom: 0; }
.copilot-review-heading { align-items: center; gap: 10px; padding: 16px 18px 12px; }
.copilot-review-heading>div { flex: 1; min-width: 0; }
.copilot-review-heading strong { font-size: 15px; }
.copilot-review-heading>span { order: 1; }
.copilot-review-close { order: 2; flex: none; width: 30px; height: 30px; padding: 0; border: 0 !important; border-radius: 6px !important; background: transparent !important; color: #64748b !important; }
.copilot-review-close:hover { background: #f1f5f9 !important; color: #334155 !important; }
.copilot-review-list { padding: 14px 18px; }
.copilot-review-section { border-radius: 9px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.copilot-review-compare { grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 10px; }
.copilot-review-old { border-color: #f1c9c9; background: #fff7f7; }
.copilot-review-old small { color: #a44141; }
.copilot-review-new { border-color: #b9dfc9; background: #f3fbf6; }
.copilot-review-new small { color: #167044; }
.copilot-review-compare small span { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 3px; border-radius: 4px; background: currentColor; color: inherit; font-weight: 700; }
.copilot-review-old small span { background: #fce4e4; }
.copilot-review-new small span { background: #d9f4e3; }
.copilot-review-compare pre { max-height: 220px; font-size: 12px; line-height: 1.55; }
.copilot-review-actions button { min-height: 38px; }
.copilot-review-actions button.active:first-child { border-color: #2d9461; background: #e9f8ef; color: #176b42; }
.copilot-review-actions button.active:last-child { border-color: #94a3b8; background: #f1f5f9; color: #334155; }
.copilot-review-footer { padding: 12px 18px; box-shadow: 0 -4px 14px rgba(15,23,42,.05); }
.copilot-review-footer button.primary { min-height: 38px; padding: 9px 14px; font-size: 12px; }
@media (max-width: 900px) {
  .copilot-workspace { overflow: hidden; }
  .copilot-mobile-tabs { flex: none; display: flex; gap: 4px; margin: 0 0 8px; padding: 3px; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; }
  .copilot-mobile-tabs button { flex: 1; min-height: 35px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: 12px; font-weight: 600; }
  .copilot-mobile-tabs button[aria-selected="true"] { background: #eaf2fb; color: #185394; }
  .copilot-split { flex-direction: row; overflow: hidden; }
  .copilot-outline, .copilot-ai { min-height: 0; flex: 1 1 auto; }
  .copilot-split.copilot-ai-open .copilot-outline { border: 0; }
  .copilot-split.copilot-ai-open.copilot-mobile-chat .copilot-outline { display: none; }
  .copilot-split.copilot-ai-open.copilot-mobile-outline .copilot-ai { display: none !important; }
  .copilot-review-heading { flex-wrap: wrap; }
  .copilot-review-heading>span { order: 3; width: 100%; }
}
@media (max-width: 600px) {
  .copilot-modal.modal-1200 .modal-dialog.modal-lg { width: 98vw !important; height: 96vh; margin: 2vh auto !important; }
  .copilot-modal .modal-dialog>.modal-content { height: 96vh; max-height: 96vh; }
  .copilot-workspace { padding: 8px; }
  .copilot-review-list { padding: 10px; }
  .copilot-review-heading, .copilot-review-footer { padding-left: 12px; padding-right: 12px; }
  .copilot-review-footer { flex-wrap: wrap; }
  .copilot-review-footer button.primary { width: 100%; }
}

/* Shared scroll area for outline and AI */
.copilot-workspace-host { overflow: auto; }
.copilot-workspace { flex: 0 0 auto; width: 100%; min-height: 100%; overflow: visible; }
.copilot-mobile-tabs { display: none !important; }
.copilot-split { display: flex; flex: 0 0 auto; flex-direction: row; align-items: stretch; overflow: visible; }
.copilot-outline, .copilot-ai { flex: 1 1 50%; width: 50%; min-height: 0; }
.copilot-split.copilot-ai-open .copilot-outline { border: 0; border-right: 1px solid #dce4ee; }
.copilot-split.copilot-ai-open .copilot-ai { border: 0; }
.copilot-split.copilot-ai-open.copilot-mobile-chat .copilot-outline, .copilot-split.copilot-ai-open.copilot-mobile-outline .copilot-ai { display: flex !important; }
.copilot-editor { flex: 0 0 auto; overflow: visible; }
.copilot-ai-body { flex: 0 0 auto; min-height: 0; overflow: visible; }
.copilot-ai .copilot-chat-body { overflow: visible; }
.copilot-chat-history { flex: 0 0 auto; min-height: 0; max-height: none; overflow: visible; }
@media (max-width: 900px) { .copilot-split { flex-direction: column; } .copilot-outline, .copilot-ai { flex: 0 0 auto; width: 100%; } .copilot-split.copilot-ai-open .copilot-outline { border-right: 0; border-bottom: 1px solid #dce4ee; } }

/* Fill the remaining modal height in expanded AI mode */
.copilot-popup.ai-expanded .copilot-workspace-host { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.copilot-popup.ai-expanded .copilot-workspace { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.copilot-popup.ai-expanded .copilot-split { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.copilot-popup.ai-expanded .copilot-outline, .copilot-popup.ai-expanded .copilot-ai { flex: 1 1 50%; width: 50%; min-height: 0; }
.copilot-popup.ai-expanded .copilot-editor { flex: 1 1 auto; min-height: 0; overflow: auto; }
.copilot-popup.ai-expanded .copilot-ai-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.copilot-popup.ai-expanded .copilot-chat-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.copilot-popup.ai-expanded .copilot-chat-history { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
@media (max-width: 900px) { .copilot-popup.ai-expanded .copilot-outline, .copilot-popup.ai-expanded .copilot-ai { flex: 1 1 50%; width: 100%; } }

/* Keep the expanded chat composer in view */
.copilot-popup.ai-expanded .copilot-ai { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.copilot-popup.ai-expanded .copilot-ai-header, .copilot-popup.ai-expanded .copilot-ai nav, .copilot-popup.ai-expanded .copilot-context, .copilot-popup.ai-expanded .copilot-composer { flex: 0 0 auto; }
.copilot-popup.ai-expanded .copilot-ai-body.copilot-chat-body { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.copilot-popup.ai-expanded .copilot-chat-history { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.copilot-popup.ai-expanded .copilot-composer { margin-top: 0; }

/* Three-pane result view in maximized mode */
.copilot-results { display: flex; flex: 1 1 36%; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.copilot-results-header { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 14px; border-bottom: 1px solid #e7edf3; color: #263b52; }
.copilot-results-header strong { font-size: 13px; }
.copilot-results-header strong i { margin-right: 6px; color: #185394; }
.copilot-results-header span { padding: 3px 8px; border-radius: 999px; background: #eef7f2; color: #347451; font-size: 10px; }
.copilot-results-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 7px 12px 16px; background: #f5f7fa; }
.copilot-result-section { margin: 8px 0 12px; padding: 0 12px 12px; overflow: hidden; border: 1px solid #dce4ed; border-left: 3px solid #4d7fb4; border-radius: 8px; background: #fff; }
.copilot-result-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin: 0 -12px 10px; padding: 0 12px; border-bottom: 1px solid #e7edf3; background: #f2f7fc; color: #2d4660; font-size: 13px; }
.copilot-result-section-heading strong { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.copilot-result-section-heading strong i { width: 16px; text-align: center; color: #3975b9; }
.copilot-result-section-heading small { color: #647a90; font-size: 10px; font-weight: 500; }
.copilot-result-assessment-card { border-left-color: #bd8a2d; }
.copilot-result-assessment-card .copilot-result-section-heading { border-bottom-color: #f0e4c8; background: #fff9ed; color: #644c20; }
.copilot-result-assessment-card .copilot-result-section-heading strong i { color: #a7761e; }
.copilot-result-outline-card { border-left-color: #32866f; }
.copilot-result-outline-card .copilot-result-section-heading { border-bottom-color: #d5ebe3; background: #f0f8f5; color: #285b4e; }
.copilot-result-outline-card .copilot-result-section-heading strong i { color: #287860; }
.copilot-result-topic { display: block; margin: 8px 0 4px; color: #3d5368; font-size: 11px; }
.copilot-result-summary, .copilot-result-text { color: #43566a; font-size: 12px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.copilot-workspace-markdown { margin: 3px 0; padding: 8px; border: 1px solid #e2e8f0; border-radius: 5px; background: #f8fafc; }
.copilot-markdown > :first-child { margin-top: 0; }
.copilot-markdown > :last-child { margin-bottom: 0; }
.copilot-markdown h4, .copilot-markdown h5 { color: #243b53; font-weight: 700; line-height: 1.4; }
.copilot-markdown h4 { margin: 14px 0 6px; font-size: 14px; }
.copilot-markdown h5 { margin: 12px 0 5px; font-size: 12px; }
.copilot-markdown p { margin: 0 0 9px; }
.copilot-markdown strong { color: #263f58; font-weight: 700; }
.copilot-markdown ul, .copilot-markdown ol { margin: 3px 0 10px; padding-left: 20px; }
.copilot-markdown li { margin: 0 0 5px; padding-left: 2px; }
.copilot-markdown li::marker { color: #7890a8; }
.copilot-markdown code { padding: 1px 4px; border-radius: 3px; background: #eef2f6; color: #344b63; font-size: 11px; }
.copilot-markdown blockquote { margin: 6px 0 10px; padding: 5px 9px; border-left: 2px solid #9eb6ce; color: #5d7185; background: #f7f9fb; }
.copilot-markdown hr { margin: 10px 0; border: 0; border-top: 1px solid #e3eaf1; }
.copilot-result-outline { margin-top: 8px; padding: 0; color: #3e5368; }
.copilot-result-sources { margin: 8px 0 0; padding-left: 18px; color: #52687d; font-size: 10px; }
.copilot-result-sources li + li { margin-top: 6px; }
.copilot-result-sources a { color: #315f89; overflow-wrap: anywhere; }
.copilot-result-sources small { display: block; color: #8392a1; }
.copilot-result-empty { padding: 8px 0; color: #8795a3; font-size: 10px; }
.copilot-popup.ai-expanded .copilot-outline { flex: 0 0 27%; width: 27%; border-right: 1px solid #dce4ed; border-bottom: 0; }
.copilot-popup.ai-expanded .copilot-ai { flex: 0 0 37%; width: 37%; border-right: 1px solid #dce4ed; }
.copilot-popup.ai-expanded .copilot-results { flex: 1 1 36%; width: 36%; }
.copilot-popup.ai-expanded .copilot-ai nav, .copilot-popup.ai-expanded .copilot-result-tabs, .copilot-popup.ai-expanded .copilot-ai-body.copilot-workspace-tab { display: none !important; }
@media (max-width: 900px) { .copilot-popup.ai-expanded .copilot-outline, .copilot-popup.ai-expanded .copilot-ai, .copilot-popup.ai-expanded .copilot-results { flex: 1 1 33.333%; width: 100%; min-height: 0; } .copilot-popup.ai-expanded .copilot-results { border-top: 1px solid #dce4ed; } }


/* Resizable dividers for the expanded three-pane view */
.copilot-popup.ai-expanded .copilot-split {
    display: grid;
    grid-template-columns: 27fr 8px 37fr 8px 36fr;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
}
.copilot-popup.ai-expanded .copilot-outline,
.copilot-popup.ai-expanded .copilot-ai,
.copilot-popup.ai-expanded .copilot-results {
    flex: none;
    width: auto;
    min-width: 0;
}
.copilot-pane-resizer {
    position: relative;
    z-index: 4;
    width: 8px;
    min-width: 8px;
    cursor: col-resize;
    touch-action: none;
    user-select: none;
    background: #f8fafc;
}
.copilot-pane-resizer::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3px;
    width: 2px;
    content: '';
    background: #dce4ed;
}
.copilot-pane-resizer:hover::before,
.copilot-pane-resizer:focus::before {
    background: #185394;
}
.copilot-pane-resizer:focus {
    outline: 0;
}
body.copilot-resizing {
    cursor: col-resize;
    user-select: none;
}
@media (max-width: 900px) {
    .copilot-popup.ai-expanded .copilot-split {
        grid-template-columns: 1fr !important;
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) !important;
    }
    .copilot-pane-resizer {
        display: none !important;
    }
    .copilot-popup.ai-expanded .copilot-outline,
    .copilot-popup.ai-expanded .copilot-ai,
    .copilot-popup.ai-expanded .copilot-results {
        min-height: 0;
    }
}


/* Give the maximized workspace more vertical room */
.copilot-popup.ai-expanded .copilot-section {
    display: none;
}
.copilot-popup.ai-expanded .copilot-workspace {
    padding: 8px 12px;
}
.copilot-popup.ai-expanded > .modal-footer {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 4px 12px;
}
.copilot-popup.ai-expanded > .modal-footer > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    float: none;
}
.copilot-popup.ai-expanded > .modal-footer .btn {
    min-height: 32px;
    margin: 0;
    padding: 5px 12px;
    font-size: 12px;
    line-height: 1.2;
}
.copilot-chat-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px; background: linear-gradient(135deg, #60a5fa, #34d399); color: #fff; box-shadow: 0 10px 22px rgba(59,130,246,.2); font-size: 22px; }
.copilot-chat-empty { max-width: 540px; margin: auto; padding: 24px 12px; text-align: center; }
.copilot-chat-empty p { margin: 0 0 16px; color: #334155; font-size: 15px; font-weight: 700; }
.copilot-chat-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.copilot-chat-starters button { width: auto; max-width: 100%; margin: 0; padding: 7px 12px; border: 1px solid #dce5ef; border-radius: 999px; background: #fff; color: #475569; box-shadow: 0 1px 3px rgba(15,23,42,.05); font-size: 12px; line-height: 1.45; text-align: left; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.copilot-chat-starters button:hover:not(:disabled) { border-color: #b8cde2; background: #eff6fc; color: #263f58; }
.copilot-chat-starters button:focus-visible { outline: 2px solid #9fc2e4; outline-offset: 2px; }
.copilot-chat-starters button:disabled { opacity: .6; cursor: default; }

.copilot-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.copilot-popup { overflow: hidden; }
.copilot-popup:not(.ai-expanded) > .copilot-scroll-body {
    overflow-y: auto;
}
.copilot-popup.ai-expanded > .copilot-scroll-body {
    display: flex;
    overflow: hidden;
}
.copilot-popup:not(.ai-expanded) > .copilot-scroll-body > .modal-body {
    flex: 0 0 auto;
    height: auto;
    overflow: visible;
}
.copilot-popup:not(.ai-expanded) > .copilot-scroll-body > .copilot-workspace-host {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}
.copilot-popup:not(.ai-expanded) > .copilot-scroll-body > .copilot-workspace-host > .copilot-workspace {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
}
.copilot-outline-toggle { flex: none; width: 28px; height: 28px; margin-left: auto; border: 1px solid #dce5ef; border-radius: 6px; background: #fff; color: #52677d; }
.copilot-outline-toggle:hover { border-color: #9fc2e4; background: #eff6fc; color: #185394; }
.copilot-split.copilot-outline-collapsed .copilot-outline { grid-column: 1; min-width: 0; }
.copilot-split.copilot-outline-collapsed > .copilot-outline header { justify-content: center; padding: 8px 4px; }
.copilot-split.copilot-outline-collapsed > .copilot-outline header strong,
.copilot-split.copilot-outline-collapsed > .copilot-outline header span,
.copilot-split.copilot-outline-collapsed > .copilot-outline .copilot-editor,
.copilot-split.copilot-outline-collapsed > .copilot-outline footer { display: none !important; }
.copilot-split.copilot-outline-collapsed > .copilot-pane-resizer { display: none !important; }
.copilot-split.copilot-outline-collapsed > .copilot-ai { grid-column: 3; }
.copilot-split.copilot-outline-collapsed > .copilot-results { grid-column: 5; }
@media (max-width: 900px) {
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed {
        grid-template-rows: 48px minmax(0, 1fr) minmax(0, 1fr) !important;
    }
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed > .copilot-outline,
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed > .copilot-ai,
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed > .copilot-results { grid-column: 1 !important; }
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed > .copilot-outline { grid-row: 1; }
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed > .copilot-ai { grid-row: 2; }
    .copilot-popup.ai-expanded .copilot-split.copilot-outline-collapsed > .copilot-results { grid-row: 3; }
}

/* Fill the available outline area while leaving CKEditor resize handle in control. */
.copilot-popup.ai-expanded > .copilot-scroll-body {
    flex-direction: column;
}
.copilot-popup.ai-expanded .copilot-outline {
    height: 100%;
}
.copilot-popup.ai-expanded .copilot-outline .copilot-editor {
    display: flex;
    flex-direction: column;
}
.copilot-popup.ai-expanded .copilot-outline .copilot-editor > .row,
.copilot-popup.ai-expanded .copilot-outline .copilot-editor > .row > div {
    flex: 1 1 auto;
    min-height: 0;
}
.copilot-popup.ai-expanded .copilot-outline .copilot-editor > .row > div {
    display: flex;
    flex-direction: column;
}
.copilot-popup.ai-expanded .copilot-outline .copilot-editor .cke {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.copilot-split.copilot-outline-collapsed > .copilot-outline header .copilot-outline-toggle { margin: 0; align-self: center; }
.copilot-attach-action { position: relative; flex: 0 0 34px; width: 34px; height: 34px; }
.copilot-attach-action .copilot-attach-toggle { display: block; }
.copilot-attach-menu { position: absolute; z-index: 30; bottom: calc(100% + 10px); left: 0; width: 280px; padding: 6px; border: 1px solid #dce4ee; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.16); }
.copilot-attach-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 7px; background: #fff; color: #334155; text-align: left; }
.copilot-attach-menu button:hover:not(:disabled) { background: #eff6fc; }
.copilot-attach-menu button:disabled { opacity: .55; cursor: not-allowed; }
.copilot-attach-menu button>i { width: 18px; color: #3975b9; text-align: center; }
.copilot-attach-menu button span, .copilot-attach-menu button strong, .copilot-attach-menu button small { display: block; }
.copilot-attach-menu button strong { font-size: 12px; font-weight: 600; }
.copilot-attach-menu button small { margin-top: 2px; color: #8392a1; font-size: 10px; }
.copilot-attach-uploading { margin: 6px 0; color: #52677d; font-size: 11px; }
.copilot-attach-uploading i { margin-right: 4px; color: #3975b9; }

.copilot-outline-reviewed { flex: 0 0 auto; margin: 8px 0 0; }
