/* prompt-test-panel.css — Prompt test panel content styles.
   Box layout provided by dlg-box.css (loaded globally).
   All rules scoped under .pt-panel. */

.pt-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* ── Form fields ─────────────────────────────────────────── */

.pt-panel .pt-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.pt-panel .pt-field:last-child {
    margin-bottom: 0;
}

.pt-panel .pt-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
}

.pt-panel input.pt-input {
    padding: 9px 12px;
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    color: rgba(17, 24, 39, 0.87);
    width: 100%;
    box-sizing: border-box;
}

.pt-panel input.pt-input::placeholder {
    color: #919191;
}

.pt-panel input.pt-input:focus {
    outline: none;
    border-color: #141b9b;
}

/* ── Run test button ─────────────────────────────────────── */

.pt-panel .pt-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.pt-panel button.pt-run-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: #212121;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.pt-panel button.pt-run-btn:hover {
    opacity: 0.85;
    background: #212121;
    border-color: transparent;
}

.pt-panel button.pt-run-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.pt-panel button.pt-run-btn svg {
    flex-shrink: 0;
}

.pt-panel .pt-status {
    font-size: 13px;
    color: #919191;
}

.pt-panel .pt-status--err {
    color: #dc172e;
}

/* ── Reformat button ──────────────────────────────────────── */

.pt-panel button.pt-reformat-btn {
    padding: 9px 16px;
    background: #fff;
    color: rgba(17, 24, 39, 0.87);
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pt-panel button.pt-reformat-btn:hover {
    background: #f5f5f5;
    border-color: #141b9b;
}

.pt-panel button.pt-reformat-btn:active {
    background: rgba(20, 27, 155, 0.2);
}

.pt-panel button.pt-reformat-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Result text ─────────────────────────────────────────── */

.pt-panel .pt-result-text {
    margin: 0;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(17, 24, 39, 0.87);
    max-height: 400px;
    overflow-y: auto;
}

/* ── Inquiry box ─────────────────────────────────────────── */

.pt-panel [data-box="inquiry"] .inquiry-tree h1 {
    display: none;
}

/* ── Critique ────────────────────────────────────────────── */

.pt-panel .pt-critique {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pt-panel .pt-critique[hidden] {
    display: none;
}

.pt-panel input.pt-critique-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 20px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    color: rgba(17, 24, 39, 0.87);
}

.pt-panel input.pt-critique-input::placeholder {
    color: #919191;
}

.pt-panel input.pt-critique-input:focus {
    outline: none;
    border-color: #141b9b;
}

.pt-panel button.pt-critique-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #212121;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.pt-panel button.pt-critique-send:hover {
    opacity: 0.85;
    background: #212121;
    border-color: transparent;
}

/* ── Errors box ──────────────────────────────────────────── */

.pt-panel [data-box="errors"] .dlg-box-header {
    color: #dc172e;
}

.pt-panel .pt-errors {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pt-panel .pt-error-item {
    padding: 8px 12px;
    background: #fdeaec;
    border: 1px solid #f3b5bc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    line-height: 20px;
    color: #dc172e;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Follow up Q/A pairs ─────────────────────────────────────── */

.pt-followup-q {
    font-weight: 600;
    margin: 10px 0 4px;
}

.pt-followup-q:first-child {
    margin-top: 0;
}

/* ── Markdown-rendered follow-up answers ────────────────────── */

/* Typography comes from the shared .dlg-md rules in dlg-markdown.css;
   only the literal-text wrapping must be overridden here. */
.pt-panel .pt-result-text--md {
    white-space: normal;
}
