/*
 * File: vendor/stamina-bundles/ai-bundle/Resources/assets/css/assist.css
 * Purpose: the AI cards (Assist/_card, _tile, _button), loaded on every page since any screen may show them. They take
 * the colours of the tool the user linked (.ai-brand-claude, .ai-brand-chatgpt), Stamina's violet otherwise.
 */

.ai-brand-none {
    --ai-brand: var(--color-primary-600, #6d28d9);
    --ai-brand-strong: var(--color-primary-700, #5b21b6);
    --ai-tint: var(--color-primary-50, #f6f2ff);
    --ai-line: var(--color-primary-100, #ede5ff);
    --ai-text: #4b3f6b;
    --ai-title: var(--color-ink, #1c1530);
}

.ai-brand-claude {
    --ai-brand: #c96442;
    --ai-brand-strong: #b4573a;
    --ai-tint: #f6efe6;
    --ai-line: #eadccb;
    --ai-text: #5a3d2b;
    --ai-title: #2b1d14;
}

.ai-brand-chatgpt {
    --ai-brand: #111;
    --ai-brand-strong: #000;
    --ai-tint: #f3f3f2;
    --ai-line: #e3e3e1;
    --ai-text: #3a3a3a;
    --ai-title: #111;
}

.btn.ai-brand-button {
    border-color: var(--ai-brand);
    background: var(--ai-brand);
    color: #fff;
}

.btn.ai-brand-button:hover {
    border-color: var(--ai-brand-strong);
    background: var(--ai-brand-strong);
    color: #fff;
}

.ai-brand-button__logo {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: #fff;
}

.ai-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius-xl, 16px);
    background: var(--ai-brand);
    color: #fff;
    box-shadow: 0 14px 30px -18px var(--ai-brand);
}

.ai-tile__top {
    display: grid;
    gap: 8px;
}

.ai-tile__logo {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    color: var(--ai-brand);
    font-size: 24px;
}

.ai-tile__logo img {
    width: 100%;
    height: 100%;
}

.ai-tile__title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #fff;
}

.ai-tile__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgb(255 255 255 / 88%);
}

.ai-tile__points {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    color: rgb(255 255 255 / 92%);
}

.ai-tile__points i {
    width: 14px;
    color: #fff;
}

.ai-tile__actions {
    display: grid;
    gap: 6px;
}

.ai-tile__actions .btn {
    justify-content: center;
}

.ai-tile .btn.ai-brand-button {
    border-color: #fff;
    background: #fff;
    color: var(--ai-brand);
    font-weight: 600;
}

.ai-tile .btn.ai-brand-button:hover {
    background: rgb(255 255 255 / 90%);
    color: var(--ai-brand-strong);
}

.ai-tile .btn.btn-link {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ai-assist {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--ai-line);
    border-radius: var(--radius-lg, 10px);
    background: var(--ai-tint);
}

.ai-assist__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ai-assist__mark {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--color-surface, #fff);
    box-shadow: 0 0 0 1px var(--color-line);
    color: var(--ai-brand);
    font-size: 14px;
    overflow: hidden;
}

.ai-assist__mark img {
    width: 100%;
    height: 100%;
}

.ai-assist__copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ai-assist__copy strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ai-title);
}

.ai-assist__copy small {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ai-text);
}

.ai-assist__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.ai-assist__more {
    font-size: 12px;
    color: var(--color-muted);
}

.ai-assist__more summary {
    cursor: pointer;
}

.ai-assist__more[open] {
    flex-basis: 100%;
}

.ai-assist__more pre {
    max-height: 220px;
    margin: 6px 0 0;
    padding: 8px 10px;
    overflow: auto;
    border-radius: 6px;
    background: var(--color-surface, #fff);
    box-shadow: 0 0 0 1px var(--color-line);
    font-size: 11.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
