/* vo-intake — ✦ Crea con VO': colloquio d'ingresso conversazionale.
   Spec comportamento: docs/vo-comportamento.md (Situazione 1).
   Mobile-first: scheda sopra (sticky), chat sotto. Desktop: due colonne.
   Prefisso .voi- · palette v2 (deep ocean / sunny gold / white sand). */

.voi-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #FDF3D7;
    font-family: 'Poppins', -apple-system, sans-serif;
    color: #003E54;
}

/* ── CTA in dashboard ─────────────────────────────────────────── */
.voi-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 999px;
    background: #003E54;
    color: #FDF3D7;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: 1.5px solid #003E54;
    transition: filter .15s;
}
.voi-cta:hover { filter: brightness(1.15); }
.voi-cta-star { color: #F9CD2D; font-size: 16px; }

/* ── Header pagina ────────────────────────────────────────────── */
.voi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 32px);
}
.voi-top img { height: 30px; width: auto; }
.voi-top a { color: #003E54; font-size: 13px; font-weight: 600; text-decoration: none; opacity: .7; }
.voi-top a:hover { opacity: 1; }

/* ── Layout: scheda + chat ────────────────────────────────────── */
.voi-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 14px calc(14px + env(safe-area-inset-bottom));
    min-height: 0;
}
@media (min-width: 900px) {
    .voi-main { max-width: 980px; flex-direction: row; align-items: stretch; padding-bottom: 24px; }
    .voi-scheda { width: 320px; flex-shrink: 0; position: sticky; top: 16px; align-self: flex-start; }
    .voi-chat { flex: 1; min-width: 0; }
}

/* ── La scheda che si riempie ─────────────────────────────────── */
.voi-scheda {
    background: #fff;
    border: 1px solid rgba(0, 62, 84, .12);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 62, 84, .07);
    padding: 14px 16px;
}
.voi-scheda-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(0, 62, 84, .5);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.voi-scheda-title .voi-star { color: #F9CD2D; font-size: 14px; }
.voi-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 380px) { .voi-slots { grid-template-columns: 1fr; } }
.voi-slot {
    border: 1.5px dashed rgba(0, 62, 84, .22);
    border-radius: 10px;
    padding: 8px 10px;
    min-height: 52px;
    transition: border-color .25s, background .25s;
}
.voi-slot.voi-filled {
    border-style: solid;
    border-color: #F9CD2D;
    background: #FFFbea;
}
.voi-slot-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(0, 62, 84, .45);
}
.voi-slot-value {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 2px;
    word-break: break-word;
}
.voi-slot-value:empty::before { content: '—'; color: rgba(0, 62, 84, .3); font-weight: 400; }
.voi-slot--wide { grid-column: 1 / -1; }
.voi-notes { font-size: 12.5px; font-weight: 500; color: rgba(0, 62, 84, .75); }

/* ── Chat ─────────────────────────────────────────────────────── */
.voi-chat {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0, 62, 84, .12);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 62, 84, .07);
    overflow: hidden;
    min-height: 46dvh;
}
.voi-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.voi-msg {
    max-width: 88%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.voi-msg-ai { background: #f4f7f8; color: #14303E; border-bottom-left-radius: 5px; align-self: flex-start; }
.voi-msg-user { background: #003E54; color: #FDF3D7; border-bottom-right-radius: 5px; align-self: flex-end; }
.voi-msg-note { align-self: center; font-size: 12.5px; color: rgba(0, 62, 84, .6); background: none; padding: 2px 6px; }
.voi-empty {
    margin: auto;
    text-align: center;
    color: rgba(0, 62, 84, .55);
    font-size: 14px;
    padding: 24px 18px;
    line-height: 1.6;
}
.voi-empty .voi-star { color: #F9CD2D; font-size: 22px; display: block; margin-bottom: 6px; }
.voi-typing { display: flex; gap: 4px; align-self: flex-start; padding: 10px 13px; }
.voi-typing i {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(0, 62, 84, .35);
    animation: voiBlink 1.2s infinite;
}
.voi-typing i:nth-child(2) { animation-delay: .2s; }
.voi-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes voiBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Creazione in corso */
.voi-creating {
    align-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFF6D6;
    border: 1.5px solid #F9CD2D;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
}

/* ── Footer input ─────────────────────────────────────────────── */
.voi-foot { border-top: 1px solid rgba(0, 62, 84, .08); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.voi-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.voi-chip {
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #003E54;
    background: #FFFbea;
    border: 1.5px solid #F9CD2D;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .15s;
}
.voi-chip:hover { background: #FDF3D7; }
.voi-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.voi-input {
    flex: 1;
    resize: none;
    border: 1.5px solid rgba(0, 62, 84, .2);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    color: #14303E;
    background: #fff;
    max-height: 110px;
}
.voi-input:focus { outline: none; border-color: #003E54; }
/* 16px su mobile: sotto quella soglia iOS Safari zooma al focus */
@media (max-width: 767px) { .voi-input { font-size: 16px; } }
.voi-send {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    background: #F9CD2D;
    color: #003E54;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter .15s;
}
.voi-send:hover { filter: brightness(1.06); }
.voi-send:disabled { opacity: .5; cursor: default; }
