/* prompt-list-page.css — Tabbed prompt list with config panel */

/* ── Page root ─────────────────────────────────────────────── */

/* Double-column width comes from the .dlg-page--wide scheme on the root. */

/* Tighter than the shared rule: the filter row sits right under the title. */
.pl-page h1 {
    margin-bottom: 8px;
}

/* ── Nav row: tabs + edit ─────────────────────────────────── */

.pl-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Tabs ──────────────────────────────────────────────────── */

/* Tab appearance and gap come from the shared dlg-tabs.css. */

/* ── Action buttons ───────────────────────────────────────── */

.pl-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ── Edit button ──────────────────────────────────────────── */

.dlg-page a.pl-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 2px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dlg-color-text);
    text-decoration: none;
    border-radius: var(--dlg-radius-sm);
    cursor: pointer;
}

.pl-edit-btn svg {
    flex-shrink: 0;
}

.dlg-page a.pl-edit-btn:hover {
    color: var(--dlg-color-text);
    opacity: 0.7;
}

/* ── Panels ────────────────────────────────────────────────── */

.pl-panel {
    display: none;
}

.pl-panel--active {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding-top: 16px;
}

/* ── Left: prompt body ─────────────────────────────────────── */

.pl-body {
    flex: 1;
    min-width: 0;
}

.pl-prompt-text {
    background: var(--dlg-color-bg-secondary);
    border-radius: var(--dlg-radius);
    padding: 16px 20px;
    margin: 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    color: var(--dlg-color-text);
}

/* ── Syntax highlighting ───────────────────────────────────── */

.pl-hl-header {
    font-weight: 700;
}

.pl-hl-conditional {
    font-style: italic;
}

.pl-prompt-text code.pl-hl-inject {
    font-family: "Courier Prime", "Courier New", Courier, monospace;
    font-size: 14px;
}

/* ── Right: sidebar with Config/Test tabs ─────────────────── */

.pl-sidebar {
    flex: 0 0 420px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pl-sidebar-tabs {
    margin-bottom: 16px;
}

.pl-sidebar-content {
    display: none;
}

.pl-sidebar-content--active {
    display: block;
}

.pl-config {
    background: var(--dlg-color-bg-secondary);
    border-radius: var(--dlg-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pl-config-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pl-config-field--default {
    opacity: 0.7;
}

.pl-config-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: var(--dlg-color-text);
}

.pl-config-default-badge {
    font-size: 11px;
    font-weight: 400;
    color: var(--dlg-color-text-secondary);
    font-style: italic;
}

.pl-config-value {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pl-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(74, 74, 74, 0.2);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    color: var(--dlg-color-text);
}

.pl-tag--empty {
    background: none;
    color: var(--dlg-color-text-secondary);
    font-style: italic;
}

/* ── Responsive: single column below 1399px ──────────────── */

@media (max-width: 1399px) {
    .pl-panel--active {
        flex-direction: column;
    }

    .pl-sidebar {
        flex: none;
        width: 100%;
    }
}
