/* =========================================================================
   Prompt-detail-only styles
   Loaded via {% block page_styles %} in prompt_detail.html.
   ========================================================================= */

/* Prompt header (title + meta) */
.prompt-header { margin: 20px 0 32px; }
.prompt-header h1 {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    background: linear-gradient(135deg, var(--text) 40%, var(--accent-light) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    margin-bottom: 12px;
}
.prompt-header .lead { color: var(--text-muted); font-size: 1.05rem; max-width: 760px; }

.prompt-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }

/* Thumbnail strip under the header */
.thumb-strip {
    display: flex; gap: 12px; overflow-x: auto; padding: 6px 0 14px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.thumb-strip img {
    flex: 0 0 auto; height: 180px; width: auto; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface);
    scroll-snap-align: start; cursor: zoom-in;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.thumb-strip img:hover { border-color: var(--accent); transform: translateY(-2px); }

/* Prompt body / template code block */
.prompt-body {
    margin-top: 24px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
}
.prompt-body pre {
    font-family: var(--mono); font-size: 0.92rem; line-height: 1.65;
    white-space: pre-wrap; word-wrap: break-word; color: var(--text);
}
.prompt-body .var {
    display: inline-block; padding: 1px 7px; margin: 0 1px; border-radius: 6px;
    color: var(--accent-light); background: var(--accent-glow);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    font-weight: 600;
}

/* Template variable syntax highlighting ----------------------------------- */
/* {{ and }} and the variable name → bold, no colour change               */
.var-delim   { font-weight: 700; }
.var-name    { font-weight: 700; }
/* [bracketed value] → accent, bold, italic                               */
.var-bracket { color: var(--accent); font-weight: 700; font-style: italic; }
/* comma,separated,list → accent, regular weight                          */
.var-list    { color: var(--accent); font-weight: 400; font-style: normal; }

/* Copy prompt button */
.copy-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
    border-radius: 10px; border: 1px solid var(--accent); color: var(--accent);
    background: transparent; cursor: pointer; font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.copy-btn:hover { background: var(--accent-glow); }
.copy-btn.copied { color: var(--success); border-color: var(--success); background: transparent; }

/* How Variables Work explainer --------------------------------------------- */
.var-explainer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.var-explainer__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--text);
}
.var-explainer__section {
    margin-bottom: 20px;
}
.var-explainer__section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
}
.var-explainer__section p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.55;
}
.var-explainer__code {
    font-family: var(--mono);
    font-size: 0.88rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
}
/* Inline {{ }} pills in prose text */
.var-inline-delim {
    display: inline;
    font-family: var(--mono);
    font-size: 0.82em;
    font-weight: 700;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    color: var(--text);
}
.var-explainer__tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 4px;
}
.var-explainer__tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.var-explainer__tip p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}
.var-explainer__tip strong { color: var(--text); }

/* Category chips linking out */
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cat-chip {
    padding: 5px 12px; border-radius: 999px; font-size: 0.82rem;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-muted); transition: border-color 0.15s ease, color 0.15s ease;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
