/* /css/lg-ai-opinion.css
   The "Get an AI opinion" line and AI box at the top of a calculator's results
   (/scripts/lg-ai-opinion.js). Purple, like the calculators' AI Analysis button. */

.lgai { --lgai-purple: #7c3aed; --lgai-deep: #3b2a8f; --lgai-ink: #14181f; --lgai-muted: #5b6472;
    margin: 0 0 18px; font-family: Poppins, sans-serif; }

/* The banner: the invitation on the left, the button on the right. */
.lgai-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px;
    padding: 18px 20px 18px 18px; border-radius: 22px; border: 1px solid #e4dcff;
    background: radial-gradient(420px 160px at 0% 0%, rgba(124,58,237,.12), transparent 70%), linear-gradient(135deg, #f7f3ff 0%, #eef3ff 100%);
    box-shadow: 0 1px 3px rgba(76,29,149,.06);
}
.lgai-ask { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; text-align: left; }
.lgai-ask-icon {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, var(--lgai-purple) 0%, #1a56db 100%); color: #fff; box-shadow: 0 6px 16px rgba(124,58,237,.3);
}
.lgai-ask-icon svg { width: 26px; height: 26px; }
.lgai-ask-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lgai-ask-title { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.3px; color: var(--lgai-ink); }
.lgai-ask-sub { font-size: 15px; line-height: 1.45; color: var(--lgai-muted); }
.lgai-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 52px; padding: 0 26px 0 20px; flex: none;
    border: 1px solid rgba(196,181,253,.35); border-radius: 999px; cursor: pointer;
    background: radial-gradient(120px 60px at 0% 0%, rgba(124,58,237,.9), transparent 70%), linear-gradient(135deg, var(--lgai-deep) 0%, var(--lgai-ink) 100%);
    color: #fff; font: 600 17px/1 Poppins, sans-serif; white-space: nowrap;
    box-shadow: 0 8px 22px rgba(76,29,149,.28); transition: transform .15s, box-shadow .15s, opacity .15s;
}
.lgai-btn svg { width: 20px; height: 20px; color: #c4b5fd; flex: none; }
.lgai-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(76,29,149,.36); }
.lgai-btn:focus-visible { outline: 3px solid var(--lgai-purple); outline-offset: 3px; }
.lgai-btn:disabled { cursor: progress; opacity: .8; }

.lgai-box {
    position: relative; margin-top: 14px; padding: 18px 22px 16px 22px; border-radius: 20px;
    background: linear-gradient(180deg, #f7f3ff 0%, #fbf9ff 100%); border: 1px solid #e4dcff;
    box-shadow: 0 1px 3px rgba(76,29,149,.06); transition: opacity .2s;
}
.lgai-box::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--lgai-purple), #1a56db); }
.lgai-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--lgai-purple); }
.lgai-head svg { width: 16px; height: 16px; }
.lgai-text { margin: 8px 0 0; font-size: 17px; line-height: 1.65; color: var(--lgai-ink); }
.lgai-note { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--lgai-muted); }
.lgai-note:empty { display: none; }

.lgai-box.is-loading .lgai-text { color: var(--lgai-muted); animation: lgai-pulse 1.4s ease-in-out infinite; }
.lgai-box.is-stale .lgai-text { opacity: .5; }
.lgai-box.is-error { background: #fff7f7; border-color: #f5d0d0; }
.lgai-box.is-error::before { background: #e03131; }
.lgai-box.is-error .lgai-head { color: #b42323; }
@keyframes lgai-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .lgai-box.is-loading .lgai-text { animation: none; } }

/* Phones: the invitation on top, a full-width button under it. */
@media (max-width: 600px) {
    .lgai-bar { padding: 16px; gap: 14px; border-radius: 20px; }
    .lgai-ask { flex-basis: 100%; gap: 12px; align-items: flex-start; }
    .lgai-ask-icon { width: 42px; height: 42px; border-radius: 12px; }
    .lgai-ask-icon svg { width: 22px; height: 22px; }
    .lgai-ask-title { font-size: 19px; }
    .lgai-ask-sub { font-size: 14px; }
    .lgai-btn { width: 100%; height: 50px; }
    .lgai-box { padding: 16px 16px 14px 18px; border-radius: 18px; }
    .lgai-text { font-size: 16px; }
}
@media print { .lgai-bar { display: none; } }
