/* solar-pilot.html — prova della previsione fotovoltaica (#1431 A2). Colori dalle variabili di app.css (tema chiaro e scuro). */
.fvp-main { max-width: 760px; margin: 0 auto; padding: 24px 16px 96px; }
.fvp-main h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 14px; }
.fvp-main h2 { font-size: 1.12rem; margin: 30px 0 10px; }
.fvp-main h3 { font-size: 1rem; margin: 0 0 8px; }
.fvp-main p, .fvp-main li { line-height: 1.65; color: var(--text-primary); }
.fvp-main p { margin: 0 0 12px; }
.fvp-main ul { margin: 0 0 14px; padding-left: 22px; }
.fvp-main li { margin: 6px 0; }

.fvp-partecipa { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--border); }
.fvp-nota { color: var(--text-secondary); }
.fvp-aiuto { display: block; color: var(--text-secondary); font-size: .9rem; margin: 4px 0 10px; line-height: 1.5; }
.fvp-facoltativo { color: var(--text-secondary); font-weight: 400; font-size: .88rem; }
.fvp-avviso { background: var(--bg-tertiary); border-left: 4px solid var(--warning, #f9a825); padding: 10px 12px; border-radius: 6px; }
.fvp-esito { margin-top: 8px; font-size: .95rem; }
.fvp-esito[data-tipo="ok"] { color: var(--success, #2e7d32); }
.fvp-esito[data-tipo="errore"] { color: var(--error, #c62828); }

.fvp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-weight: 600; cursor: pointer;
}
.fvp-btn:hover { filter: brightness(.97); }
.fvp-btn:disabled { opacity: .6; cursor: progress; }
/* blu fisso in tutti e due i temi: nel tema scuro --primary è un azzurro chiaro e il bianco sopra non si legge */
.fvp-btn--primario { background: #1a5fc4; border-color: #1a5fc4; color: #fff; font-size: 1.05rem; }
.fvp-btn--secondario { background: transparent; }
.fvp-btn--pericolo { background: transparent; border-color: var(--error, #c62828); color: var(--error, #c62828); }
.fvp-btn--piccolo { min-height: 36px; padding: 6px 12px; font-weight: 500; }

.fvp-modulo fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 16px; margin: 0 0 16px; min-width: 0; }
.fvp-modulo legend { font-weight: 700; padding: 0 6px; }
.fvp-campo { display: block; margin: 10px 0; font-weight: 500; }
.fvp-campo input[type="text"], .fvp-campo input[type="number"], .fvp-campo input[type="date"],
.fvp-campo select, .fvp-campo textarea {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box; margin-top: 4px; min-height: 44px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-primary); color: var(--text-primary); font: inherit; font-weight: 400;
}
.fvp-campo textarea { min-height: 80px; resize: vertical; }
.fvp-scelta { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; line-height: 1.5; cursor: pointer; }
.fvp-scelta input { margin-top: 4px; width: 20px; height: 20px; flex: 0 0 auto; }
.fvp-domanda { margin: 14px 0 4px !important; font-weight: 500; }
.fvp-consenso { background: var(--bg-secondary); }
.fvp-azioni { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.fvp-mappa { width: 100%; height: 340px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-tertiary); }
.fvp-stato-mappa { margin: 8px 0 0 !important; font-weight: 500; }
.fvp-stato-mappa[data-ok="1"] { color: var(--success, #2e7d32); }
.fvp-segnaposto { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: #1a5fc4; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: grab; }

.fvp-falda { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.fvp-falda__testa { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.fvp-falda__campi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (min-width: 560px) { .fvp-falda__campi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.fvp-scheda .fvp-stato { font-size: 1.02rem; }
.fvp-riquadro { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; background: var(--bg-secondary); }
.fvp-riga { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.fvp-riga .fvp-campo { margin: 0; flex: 1 1 160px; }
.fvp-riga input[type="file"] { flex: 1 1 200px; min-height: 44px; max-width: 100%; }
.fvp-riquadro progress { width: 100%; margin-top: 10px; }
.fvp-elenco { list-style: none; padding: 0 !important; margin: 0; }
.fvp-elenco li { border-bottom: 1px solid var(--border); padding: 6px 0; margin: 0 !important; font-size: .95rem; }
.fvp-ritiro { background: transparent; }

/* ── Apertura, usi pratici, passi, figura dell'orizzonte (#1431, 16/11) ── */
.fvp-lead { font-size: 1.12rem; line-height: 1.6; color: var(--text-primary); }
.fvp-hero { margin: 8px 0 24px; }
.fvp-hero svg, .fvp-figura svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.fvp-figura { margin: 14px 0 22px; }
.fvp-figura figcaption { font-size: .92rem; color: var(--text-secondary); line-height: 1.5; margin-top: 8px; }

.fvp-usi { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 14px 0 12px; }
@media (min-width: 620px) { .fvp-usi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fvp-uso { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--bg-secondary); }
.fvp-uso svg { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: rgba(242, 169, 0, .16);
  fill: none; stroke: #c98a00; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fvp-uso h3 { margin: 10px 0 6px !important; font-size: 1.02rem; }
.fvp-uso p { margin: 0 !important; font-size: .95rem; line-height: 1.55; }

.fvp-passi { counter-reset: passo; list-style: none; padding: 0 !important; margin: 12px 0 18px !important; }
.fvp-passi li { counter-increment: passo; position: relative; padding: 8px 0 8px 48px !important; margin: 0 !important; }
.fvp-passi li::before { content: counter(passo); position: absolute; left: 0; top: 6px; width: 32px; height: 32px;
  border-radius: 50%; background: #1a5fc4; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* colori dei disegni: tema chiaro */
.fvp-c-cielo1 { stop-color: #cfe6ff; } .fvp-c-cielo2 { stop-color: #fff6df; }
.fvp-c-arco { stroke: #f2a900; } .fvp-c-sole { fill: #f7b500; } .fvp-c-raggi { stroke: #f7b500; }
.fvp-c-monte { fill: #8aa58c; } .fvp-c-torri { fill: #6f8a71; }
.fvp-c-colle2 { fill: #b9d1b1; } .fvp-c-colle1 { fill: #9dbd94; }
.fvp-c-muro { fill: #f3ece0; } .fvp-c-tetto { fill: #c0624a; } .fvp-c-finestra { fill: #9cc4ea; } .fvp-c-porta { fill: #8a5a3c; }
.fvp-c-scheda { fill: rgba(255,255,255,.88); } .fvp-c-asse { stroke: #8a94a6; }
.fvp-c-testo { font: 600 13px Inter, system-ui, sans-serif; fill: #44506a; }
.fvp-c-testo--grande { font-size: 19px; }
.fvp-c-fondo { fill: #eef5ff; } .fvp-c-estate { stroke: #f2a900; } .fvp-c-inverno { stroke: #e07b39; }
.fvp-c-nascosto { stroke: rgba(80, 90, 110, .55); } .fvp-c-rilievo { fill: #8aa58c; } .fvp-c-piatto { stroke: #c0624a; }
.fvp-c-sole-inv { fill: #e07b39; }
/* tema scuro */
:root[data-theme="dark"] .fvp-c-cielo1 { stop-color: #1b2c4a; } :root[data-theme="dark"] .fvp-c-cielo2 { stop-color: #3a3324; }
:root[data-theme="dark"] .fvp-c-monte { fill: #3f5a46; } :root[data-theme="dark"] .fvp-c-torri { fill: #2f4636; }
:root[data-theme="dark"] .fvp-c-colle2 { fill: #344b3a; } :root[data-theme="dark"] .fvp-c-colle1 { fill: #2b3f30; }
:root[data-theme="dark"] .fvp-c-muro { fill: #c9c0b1; } :root[data-theme="dark"] .fvp-c-scheda { fill: rgba(20,24,32,.85); }
:root[data-theme="dark"] .fvp-c-testo { fill: #d6dceb; } :root[data-theme="dark"] .fvp-c-fondo { fill: #1d2533; }
:root[data-theme="dark"] .fvp-c-rilievo { fill: #3f5a46; } :root[data-theme="dark"] .fvp-c-nascosto { stroke: rgba(200, 210, 230, .55); }
:root[data-theme="dark"] .fvp-uso svg { stroke: #f2b84b; }

/* immagini (illustrazioni) dell'apertura e degli usi */
.fvp-hero img, .fvp-illustrazione img { display: block; width: 100%; height: auto; border-radius: 14px; }
.fvp-illustrazione { margin: 6px 0 14px; }
@media (min-width: 620px) { .fvp-illustrazione img { max-height: 420px; object-fit: cover; } }

/* ── Modulo d'adesione v2: procedura a passi (#1431, 16/11) ── */
.fvp-prima { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 4px; margin: 6px 0 18px; background: var(--bg-secondary); }
.fvp-prima h2 { margin-top: 0 !important; }
.fvp-modulo__titolo { margin-top: 8px !important; }
.fvp-avanzamento { display: flex; gap: 4px; list-style: none; padding: 0 !important; margin: 4px 0 14px !important; counter-reset: av; }
.fvp-avanzamento li { flex: 1 1 0; min-width: 0; margin: 0 !important; padding-top: 8px; border-top: 4px solid var(--border);
  font-size: .78rem; line-height: 1.25; color: var(--text-secondary); overflow-wrap: anywhere; }
.fvp-avanzamento li.fatto { border-top-color: #6a9be0; }
.fvp-avanzamento li.attuale { border-top-color: #1a5fc4; color: var(--text-primary); font-weight: 700; }
@media (max-width: 480px) { .fvp-avanzamento li:not(.attuale) { font-size: 0; } .fvp-avanzamento li.attuale { flex-grow: 3; } }
.fvp-bozza-nota { font-size: .85rem; color: var(--text-secondary); line-height: 1.5; margin: 0 0 14px !important; }
.fvp-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary, #1a5fc4); text-decoration: underline; cursor: pointer; }
.fvp-passo { margin: 0; }
.fvp-passo__titolo { font-size: 1.15rem !important; margin: 0 0 12px !important; outline: none; }
.fvp-passo__n { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }
.fvp-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.fvp-nav .fvp-btn--primario { flex: 1 1 auto; max-width: 320px; margin-left: auto; }
.fvp-errori { border: 2px solid var(--error, #c62828); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; outline: none; }
.fvp-main .fvp-errori__titolo { font-weight: 700; margin: 0 0 4px !important; color: var(--error, #c62828); }
.fvp-errori ul { margin: 0 !important; }
.fvp-errori a { color: var(--error, #c62828); font-weight: 600; }
.fvp-main .fvp-errore-campo { color: var(--error, #c62828); font-weight: 600; margin: 8px 0 0 !important; font-size: .95rem; }
.fvp-gruppo[data-errore="1"] { border-color: var(--error, #c62828) !important; border-width: 2px !important; }
.fvp-avviso-campo { background: var(--bg-tertiary); border-left: 4px solid var(--warning, #f9a825); padding: 8px 12px;
  border-radius: 6px; margin: 10px 0 0 !important; font-size: .95rem; }
.fvp-avviso-campo p { margin: 0 0 6px !important; }
.fvp-avviso-campo ul { margin: 4px 0 0 !important; }
.fvp-riquadro-info { background: var(--bg-tertiary); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; font-size: .95rem; }
.fvp-riquadro-info p:last-child { margin-bottom: 0 !important; }
.fvp-campo--corto input { max-width: 220px !important; }
.fvp-nota--piccola { font-size: .9rem; margin: 8px 0 !important; }
.fvp-riga--strumenti { align-items: flex-end; margin-bottom: 10px; }

/* figure da toccare (scelte con immagine) */
.fvp-figure { display: grid; gap: 10px; margin: 8px 0 4px; }
.fvp-figure--3 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .fvp-figure--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fvp-figure--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .fvp-figure--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.fvp-figura-scelta { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: stretch;
  border: 2px solid var(--border); border-radius: 12px; padding: 8px 10px 10px; cursor: pointer; background: var(--bg-primary);
  font-size: .92rem; line-height: 1.4; }
@media (max-width: 559px) { .fvp-figure--3 .fvp-figura-scelta { flex-direction: row; align-items: center; } .fvp-figure--3 .fvp-figura-scelta svg { flex: 0 0 96px; } }
.fvp-figura-scelta--piccola { text-align: center; font-size: .82rem; padding: 6px 4px 8px; }
.fvp-figura-scelta input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fvp-figura-scelta svg { width: 100%; height: auto; max-height: 90px; }
.fvp-figura-scelta strong { display: block; }
.fvp-figura-scelta:has(input:checked) { border-color: #1a5fc4; background: rgba(26, 95, 196, .08); box-shadow: 0 0 0 1px #1a5fc4; }
.fvp-figura-scelta:has(input:focus-visible) { outline: 3px solid #6a9be0; outline-offset: 2px; }
:root[data-theme="dark"] .fvp-figura-scelta:has(input:checked) { background: rgba(106, 155, 224, .16); border-color: #6a9be0; box-shadow: 0 0 0 1px #6a9be0; }
.fvp-f-asse, .fvp-f-sottile, .fvp-f-muro { fill: none; stroke: var(--text-secondary); stroke-width: 1.5; stroke-linecap: round; }
.fvp-f-curva { fill: none; stroke: #f2a900; stroke-width: 3; stroke-linecap: round; }
.fvp-f-colonna { fill: none; stroke: #f2a900; stroke-width: 7; }
.fvp-f-schermo { fill: var(--bg-tertiary); stroke: var(--text-secondary); stroke-width: 1.5; }
.fvp-f-numero { font: 700 15px Inter, system-ui, sans-serif; fill: var(--text-primary); }
.fvp-f-piccolo { font: 500 10px Inter, system-ui, sans-serif; fill: var(--text-secondary); }
.fvp-f-tetto { fill: none; stroke: #c0624a; stroke-width: 3.5; stroke-linecap: round; }
.fvp-f-pannello { fill: none; stroke: #1a5fc4; stroke-width: 5; stroke-linecap: round; }
:root[data-theme="dark"] .fvp-f-pannello { stroke: #6a9be0; }
.fvp-f-aria { fill: none; stroke: #4aa3c7; stroke-width: 1.5; stroke-linecap: round; }
.fvp-f-freccia { fill: none; stroke: #e07b39; stroke-width: 3; stroke-linecap: round; }
.fvp-f-freccia-punta { fill: #e07b39; }
.fvp-f-goccia { fill: #4aa3c7; stroke: #4aa3c7; stroke-width: 1; }

.fvp-pulsanti-piani, .fvp-bussola, .fvp-ruota, .fvp-chip-gruppo { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.fvp-btn--scelta { min-height: 44px; padding: 8px 12px; font-weight: 600; }
.fvp-btn--scelta[aria-pressed="true"], .fvp-chip[aria-pressed="true"] { background: #1a5fc4; border-color: #1a5fc4; color: #fff; }
.fvp-bussola .fvp-btn--scelta { min-width: 52px; }
.fvp-chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-primary); font: inherit; cursor: pointer; }

/* falde */
.fvp-schede-falde { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.fvp-scheda-falda { display: flex; flex-direction: column; align-items: flex-start; min-height: 44px; padding: 6px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-weight: 700; cursor: pointer; }
.fvp-scheda-falda small { font-weight: 400; color: var(--text-secondary); font-size: .8rem; }
.fvp-scheda-falda[aria-selected="true"] { border-color: #1a5fc4; box-shadow: inset 0 -3px 0 #1a5fc4; }
.fvp-istruzione { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.fvp-istruzione svg { flex: 0 0 110px; width: 110px; height: auto; }
.fvp-istruzione p { margin: 0 !important; font-size: .95rem; }
.fvp-mappa--falda { height: 320px; }
/* si afferrano solo l'anello (fascia larga e invisibile) e la maniglia: il centro passa i tocchi alla mappa */
.fvp-rosa { width: 200px; height: 200px; touch-action: none; border-radius: 50%; pointer-events: none; }
.fvp-rosa__presa { fill: none; stroke: transparent; stroke-width: 36; pointer-events: stroke; cursor: grab; }
.fvp-rosa__maniglia { pointer-events: all; cursor: grab; }
.fvp-rosa:focus-visible { outline: 3px solid #6a9be0; outline-offset: 2px; }
.fvp-rosa svg { width: 100%; height: 100%; overflow: visible; }
.fvp-rosa__anello { fill: rgba(255, 255, 255, .18); stroke: rgba(26, 95, 196, .85); stroke-width: 3; }
.fvp-rosa__tacche line { stroke: #0b3d8c; stroke-width: 4; stroke-linecap: round; }
.fvp-rosa__n { font: 800 18px Inter, system-ui, sans-serif; fill: #0b3d8c; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.fvp-rosa__freccia line { stroke: #e05a14; stroke-width: 7; stroke-linecap: round; }
.fvp-rosa__freccia path { fill: #e05a14; stroke: #fff; stroke-width: 2; }
.fvp-rosa__maniglia { fill: rgba(224, 90, 20, .18); stroke: #e05a14; stroke-width: 2; }
.fvp-rosa__centro { fill: #fff; stroke: #0b3d8c; stroke-width: 3; }
:root[data-theme="dark"] .fvp-rosa__anello { fill: rgba(0, 0, 0, .2); stroke: #8db8f2; }
:root[data-theme="dark"] .fvp-rosa__tacche line { stroke: #d6e6ff; }
:root[data-theme="dark"] .fvp-rosa__n { fill: #d6e6ff; stroke: #111; }
.fvp-eco { font-size: 1.05rem; font-weight: 700; margin: 6px 0 !important; }
.fvp-calcolo { font-weight: 600; margin: 4px 0 !important; }
.fvp-totale { font-size: 1.05rem; font-weight: 700; margin: 12px 0 0 !important; }
.fvp-dove-trovo { margin: 8px 0 0; }
.fvp-dove-trovo summary, .fvp-mppt summary { cursor: pointer; font-weight: 600; color: var(--primary, #1a5fc4); min-height: 32px; }
.fvp-falde-azioni { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.fvp-telefono { margin: 10px 0 0; }

/* riepilogo */
.fvp-riep { overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }
.fvp-riep__testa { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fvp-riep h4 { margin: 0; font-size: 1rem; }
.fvp-riep p { margin: 6px 0 0 !important; }
.fvp-riep__falde { list-style: none; padding: 0 !important; margin: 6px 0 0 !important; }
.fvp-riep__falde li { display: flex; gap: 10px; align-items: center; }
.fvp-mini-bussola { flex: 0 0 40px; width: 40px; height: 40px; }
.fvp-mini-bussola circle { fill: none; stroke: var(--text-secondary); stroke-width: 1.5; }
.fvp-mini-bussola text { font: 700 8px Inter, system-ui, sans-serif; fill: var(--text-secondary); }
.fvp-mini-bussola line { stroke: #e05a14; stroke-width: 3; stroke-linecap: round; }
.fvp-mini-bussola path { fill: #e05a14; }
.fvp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fvp-passi--piccoli li { padding-left: 42px !important; }
.fvp-bozza .fvp-azioni { margin-top: 4px; }
/* l'attributo hidden vince sempre sui display: flex/grid di questa pagina */
.fvp-main [hidden] { display: none !important; }
