/* NOTE: literal copy, not actually minified - run through the project's normal JS/CSS build/minify step before shipping to production. */
/* Advisor — custom two-column chat layout (advisor.txt LayoutHints). Not minified by hand;
   run through the project's normal CSS build step before shipping — see advisor.min.css. */

.adv-root {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .adv-root {
        grid-template-columns: 1fr;
    }
    .adv-panel {
        order: -1;
    }
}

/* Defined locally rather than relying on the .hidden utility in about-bundle.css, which is not
   guaranteed to be loaded on a ShowUpload=false AI page. */
.adv-root .hidden {
    display: none !important;
}

.adv-hero {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 8px;
}
.adv-hero h1 { margin: 0 0 4px; }
.adv-hero p { margin: 0; opacity: .75; }

/* ── Example prompts grid (first load only) ─────────────────────────── */
.adv-examples {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.adv-example-group h4 {
    margin: 0 0 8px;
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: .03em;
    opacity: .6;
}
.adv-example-card {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--card-bg, #f5f5f7);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: .92em;
    line-height: 1.35;
}
.adv-example-card:hover { background: rgba(0,0,0,.06); }

/* ── Chat column ─────────────────────────────────────────────────────── */
.adv-chat {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.adv-history {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 2px 12px;
}
.adv-msg { display: flex; }
.adv-msg.adv-user { justify-content: flex-end; }
.adv-msg.adv-assistant { justify-content: flex-start; }
.adv-bubble {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.5;
}
.adv-user .adv-bubble {
    background: var(--accent, #2563eb);
    color: #fff;
    border-bottom-right-radius: 3px;
}
.adv-assistant .adv-bubble {
    background: var(--card-bg, #f5f5f7);
    border-bottom-left-radius: 3px;
}
.adv-bubble p:first-child { margin-top: 0; }
.adv-bubble p:last-child { margin-bottom: 0; }
.adv-bubble pre {
    background: rgba(0,0,0,.06);
    padding: 8px 10px;
    border-radius: 6px;
    overflow-x: auto;
}
.adv-thinking .adv-bubble { opacity: .6; font-style: italic; }

.adv-references {
    margin-top: 8px;
    font-size: .85em;
}
.adv-references summary {
    cursor: pointer;
    opacity: .7;
}
.adv-ref-item {
    padding: 4px 0 4px 14px;
    border-left: 2px solid rgba(0,0,0,.1);
    margin-top: 6px;
}
.adv-ref-item a { font-weight: 600; }

.adv-disclaimer {
    font-size: .78em;
    opacity: .55;
    margin-top: 4px;
}

.adv-composer {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    border-top: 1px solid rgba(0,0,0,.08);
    padding-top: 12px;
    margin-top: 8px;
}
.adv-composer textarea {
    flex: 1;
    resize: none;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
}
.adv-style-select { width: auto; }
.adv-composer button {
    white-space: nowrap;
}

/* ── Capability side panel ───────────────────────────────────────────── */
.adv-panel {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 14px;
    position: sticky;
    top: 16px;
    max-height: 80vh;
    overflow-y: auto;
}
.adv-panel h3 { margin: 0 0 10px; font-size: 1em; }
.adv-panel-search {
    width: 100%;
    margin-bottom: 10px;
}
.adv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.adv-chip {
    font-size: .78em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.06);
    cursor: pointer;
    border: none;
}
.adv-chip.active {
    background: var(--accent, #2563eb);
    color: #fff;
}
.adv-cap-row {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 8px 2px;
    cursor: pointer;
}
.adv-cap-row:hover { background: rgba(0,0,0,.04); }
.adv-cap-name { font-weight: 600; font-size: .9em; }
.adv-cap-maturity {
    font-size: .68em;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 6px;
}
.adv-cap-maturity.Shipped { background: #dcfce7; color: #166534; }
.adv-cap-maturity.Partial { background: #fef3c7; color: #92400e; }
.adv-cap-maturity.Experimental { background: #fee2e2; color: #991b1b; }
.adv-cap-summary {
    font-size: .8em;
    opacity: .7;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adv-error .adv-bubble { color: #991b1b; }
