/**
 * RECATOOLS — AI Prompt Builder (Phase 1)
 * style.css — Tool-specific styles only.
 * Inherits typography + grid from /assets/css/tool-page.css.
 *
 * Uses real RECATOOLS theme variables (--accent, --border, --text-muted)
 * with sensible fallbacks. Does NOT invent new variable names.
 *
 * Developer-tools palette accent for framework chips (blue family).
 */

.apb-tool-card { padding: 1.25rem 1.5rem; }

/* ── Framework selector ─────────────────────────────────────────── */
.apb-framework-row {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #faf8f5;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.apb-fw-title {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.625rem;
}
.apb-fw-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}
.apb-fw-chip {
    text-align: left;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    font-family: inherit;
    line-height: 1.35;
}
.apb-fw-chip:hover {
    border-color: var(--accent);
    background: var(--accent-lt, #fff5f2);
}
.apb-fw-chip.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.apb-fw-chip strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.01em;
}
.apb-fw-chip small {
    display: block;
    font-size: 0.6875rem;
    opacity: 0.78;
    font-weight: 400;
}
.apb-fw-chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Template gallery ───────────────────────────────────────────── */
.apb-template-row {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.apb-template-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.apb-template-select {
    flex: 1;
    min-width: 220px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
}
.apb-template-select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* ── Main two-column layout ─────────────────────────────────────── */
.apb-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .apb-main { grid-template-columns: 1fr; }
}

/* ── Form (left column) ─────────────────────────────────────────── */
.apb-form-header {
    padding: 0.875rem 1rem;
    background: #eff6ff;
    border-left: 3px solid #1e40af;
    border-radius: 0 10px 10px 0;
    margin-bottom: 1rem;
}
.apb-form-fw-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 0.01em;
}
.apb-form-fw-expansion {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.apb-form-fw-best {
    font-size: 0.75rem;
    color: var(--text-primary, #1a1814);
    margin-top: 6px;
}
.apb-form-fw-origin {
    font-size: 0.75rem;
    color: #b45309;
    margin-top: 6px;
    font-style: italic;
}

.apb-field-wrap { margin-bottom: 1rem; }
.apb-field-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #1a1814);
    margin-bottom: 6px;
    line-height: 1.45;
}
.apb-field-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}
.apb-field {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.55;
    resize: vertical;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    min-height: 60px;
}
.apb-field:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent);
}

/* ── Preview (right column) ─────────────────────────────────────── */
.apb-preview-wrap {
    position: sticky;
    top: 1.25rem;
    align-self: start;
}
.apb-preview-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.apb-model-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
}
.apb-model-select {
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
}
.apb-model-select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
.apb-model-review-link {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
}
.apb-model-review-link:hover { text-decoration: underline; }

.apb-preview {
    width: 100%;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafafa;
    font-family: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono", Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary, #1a1814);
}
.apb-preview:empty::before {
    content: 'Pick a framework and start filling fields. The assembled prompt appears here.';
    color: var(--text-muted);
    font-family: inherit;
}

.apb-preview-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.625rem;
    flex-wrap: wrap;
}
.apb-btn-primary {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0.55rem 1rem;
    border: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.12s, transform 0.12s;
}
.apb-btn-primary:hover {
    background: var(--accent-h, #d43e27);
    transform: translateY(-1px);
}
.apb-btn-primary:active { transform: translateY(0); }
.apb-btn-secondary {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary, #1a1814);
    font-family: inherit;
    transition: border-color 0.12s, color 0.12s;
}
.apb-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.apb-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Privacy footer ─────────────────────────────────────────────── */
.apb-privacy {
    font-size: 0.8125rem;
    color: #047857;
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 1rem;
}
.apb-privacy svg { flex-shrink: 0; }

/* ── Pull quote (educational section) ───────────────────────────── */
.apb-pullquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: #faf8f5;
    border-radius: 0 10px 10px 0;
}
.apb-pullquote p {
    font-size: 1.0625rem;
    font-style: italic;
    margin: 0 0 8px;
    line-height: 1.6;
}
.apb-pullquote cite {
    font-style: normal;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* cache-buster: 2026-05-24T05:06:05Z */
