/* Questionario CREALO — agente che legge il sito del cliente: avanzamento, scheda da confermare, avviso piccolo */
.ag-box, .ag-card { margin-top: 4px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.ag-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ag-head > span:last-child { margin-left: auto; font-size: 12px; color: var(--ink-3); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 60%, transparent); animation: ag-pulse 1.4s ease-out infinite; flex: none; }
@keyframes ag-pulse { to { box-shadow: 0 0 0 12px transparent; } }
.ag-ok { width: 24px; height: 24px; border-radius: 50%; background: var(--acc); display: grid; place-items: center; flex: none; }
.ag-ok svg { width: 15px; height: 15px; fill: none; stroke: #0b1020; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ag-fasi { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.ag-fasi li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); animation: ag-in .4s var(--ease-out) both; }
.ag-fasi li svg { width: 16px; height: 16px; flex: none; margin-top: 1px; fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ag-fasi li.now { color: var(--ink); }
.ag-fasi li.now .spin { margin: 1px 2px 0 0; flex: none; }
@keyframes ag-in { from { opacity: 0; transform: translateY(6px); } }
.ag-err { font-size: 14px; color: var(--ink); }
.ag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ag-card .field { margin-top: 14px; }
select.inp { appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23a9adc4' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
select.inp option { background: #161829; color: var(--ink); }
textarea.inp.ag-desc { min-height: 64px; font-size: 14px; }
.ag-why { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.ag-n { font-style: normal; color: var(--ink-3); margin-left: 6px; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.ag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 11px; border-radius: 99px; font-size: 13px; background: color-mix(in srgb, var(--acc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); }
.ag-chip button { width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; color: var(--ink-2); }
.ag-chip button:hover { background: rgba(255,255,255,.12); color: var(--ink); }
.ag-add { flex: 1; min-width: 140px; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; padding: 5px 4px; }
.ag-funcs { font-size: 13.5px; line-height: 1.5; padding-top: 10px; }

/* avviso piccolo mentre si risponde alle altre domande */
.wz-agent { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 11px 14px; border-radius: 14px; text-align: left; color: var(--ink);
  border: 1px solid var(--line); background: rgba(22,24,41,.94); backdrop-filter: blur(8px); animation: ag-in .4s var(--ease-out) both; }
.wz-agent[hidden] { display: none; }
.wz-agent .spin { margin: 0; flex: none; }
.wz-agent b { display: block; font-size: 13px; }
.wz-agent small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-agent > span:nth-child(2) { min-width: 0; flex: 1; }
.wz-agent em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--acc); }
.wz-agent.ready { border-color: color-mix(in srgb, var(--acc) 60%, transparent); }
/* lettura approfondita: cosa abbiamo preso dal resto del sito */
.ag-deep { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); font-size: 13px; animation: ag-in .4s var(--ease-out) both; }
.ag-deep .spin { margin: 2px 0 0; flex: none; }
.ag-deep b { display: block; font-size: 13px; }
.ag-deep small { display: block; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.ag-deep.ok { display: block; border-style: solid; border-color: color-mix(in srgb, var(--acc) 45%, transparent); background: color-mix(in srgb, var(--acc) 6%, transparent); }
.ag-deep-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.ag-deep ul { margin: 10px 0 0; padding: 0 0 0 16px; display: grid; gap: 5px; color: var(--ink-2); line-height: 1.45; }
.ag-deep ul b { display: inline; color: var(--ink); font-weight: 600; }
.ag-thumbs { display: flex; gap: 6px; margin-top: 10px; overflow: hidden; }
.ag-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: #fff; flex: none; border: 1px solid var(--line); }
.ag-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ag-sw input { position: absolute; opacity: 0; pointer-events: none; }
.ag-sw i { width: 32px; height: 18px; border-radius: 99px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.ag-sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ag-sw input:checked + i { background: var(--acc); }
.ag-sw input:checked + i::after { transform: translateX(14px); }
.ag-sw input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }

@media (max-width: 600px) { .ag-grid { grid-template-columns: 1fr; } .ag-thumbs img { width: 52px; height: 40px; } }

/* animazione dell'analisi (Remotion) */
.ag-anim { aspect-ratio: 16 / 9; margin: -4px -4px 14px; border-radius: 12px; overflow: hidden; background: #0b0c18; }

/* collegamento a RINNOVALO: la home del cliente rifatta moderna */
.ag-rinnovalo { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(31,214,164,.35); background: rgba(31,214,164,.06); text-decoration: none; color: inherit; transition: border-color .25s, background .25s; }
.ag-rinnovalo:hover { border-color: #1fd6a4; background: rgba(31,214,164,.11); }
.ag-rinnovalo b { flex: none; font: 800 13px/1 'Sora', sans-serif; letter-spacing: .04em; color: #1fd6a4; }
.ag-rinnovalo span { flex: 1; font-size: 14px; line-height: 1.4; }
.ag-rinnovalo i { font-style: normal; color: #1fd6a4; font-size: 18px; }
