/* ===== Tema chiaro/scuro — funnelmanager.app =====
   Il tema scuro e' quello originale (variabili definite nella pagina). Default: CHIARO (data-theme="light" impostato da theme.js).
   Qui: interruttore, palette chiara e correzioni specifiche del sito. */

html{color-scheme:dark;}
html[data-theme="light"]{color-scheme:light;}
html.theme-anim body,html.theme-anim nav,html.theme-anim section,html.theme-anim footer{transition:background-color .3s ease,color .3s ease,border-color .3s ease;}

/* ---------- Interruttore ---------- */
.theme-toggle{position:relative;flex:none;width:58px;height:30px;padding:0;border-radius:99px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);cursor:pointer;color:#9a98b3;transition:background .25s,border-color .25s,box-shadow .25s;-webkit-tap-highlight-color:transparent;}
.theme-toggle:hover{border-color:rgba(139,92,246,.5);}
.theme-toggle:focus-visible{outline:2px solid #a78bfa;outline-offset:3px;}
.tt-icons{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;padding:0 8px;pointer-events:none;}
.tt-i{display:flex;opacity:.55;}
.tt-knob{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;transition:transform .35s cubic-bezier(.2,.9,.3,1.2),background .3s,box-shadow .3s;pointer-events:none;}
.tt-k{position:absolute;display:flex;transition:opacity .25s,transform .35s;}
.tt-k svg{width:13px;height:13px;}
html:not([data-theme="light"]) .tt-knob{transform:translateX(28px);background:linear-gradient(135deg,#8b5cf6,#4f46e5);box-shadow:0 0 12px rgba(139,92,246,.5);}
html:not([data-theme="light"]) .tt-k-sun{opacity:0;transform:rotate(-90deg) scale(.5);}
html[data-theme="light"] .tt-knob{transform:translateX(0);background:linear-gradient(135deg,#fbbf24,#f59e0b);box-shadow:0 2px 10px rgba(245,158,11,.45);}
html[data-theme="light"] .tt-k-moon{opacity:0;transform:rotate(90deg) scale(.5);}
html[data-theme="light"] .theme-toggle{background:rgba(15,23,42,.06);border-color:rgba(30,20,70,.16);color:#544f6e;}
.theme-toggle--desk{margin-left:14px;}
.theme-toggle--solo{margin-left:14px;margin-right:2px;}
.theme-toggle--mob{display:none;}
@media(max-width:768px){
  .theme-toggle--desk{display:none;}
  .theme-toggle--mob{display:block;margin-left:auto;margin-right:12px;}
}

/* ---------- Palette tema chiaro (viola/indigo/emerald piu scuri per il contrasto) ---------- */
html[data-theme="light"]{
  --bg:#f7f6fc;--surface:#ffffff;--surface2:#efedf8;
  --border:rgba(30,20,70,.11);--border-strong:rgba(30,20,70,.2);
  --violet:#6d28d9;--indigo:#4338ca;--emerald:#047857;
  --text:#14111f;--muted:#544f6e;
}
html[data-theme="light"] body::before{opacity:.06;}
html[data-theme="light"] nav{background:rgba(255,255,255,.92);}
html[data-theme="light"] .nav-logo-text-fm,
html[data-theme="light"] .nav-link:hover{color:var(--text)!important;}
html[data-theme="light"] .glass{background:rgba(255,255,255,.85);}
html[data-theme="light"] .glass-hover:hover{box-shadow:0 20px 40px rgba(109,40,217,.14);}
html[data-theme="light"] .grad-text{background:linear-gradient(135deg,#14111f 0%,#6d28d9 50%,#4338ca 100%);-webkit-background-clip:text;background-clip:text;}
html[data-theme="light"] .grad-green{background:linear-gradient(135deg,#047857 0%,#059669 100%);-webkit-background-clip:text;background-clip:text;}
html[data-theme="light"] .btn-ghost:hover{border-color:rgba(30,20,70,.28);background:rgba(15,23,42,.05);}
html[data-theme="light"] .lang-toggle{background:rgba(15,23,42,.06);}
html[data-theme="light"] .quote-mark{color:rgba(109,40,217,.35);}

/* testi con colori scritti nel template (stile inline con o senza spazio dopo i due punti): stessa tinta, piu scuri sul chiaro */
html[data-theme="light"] [style*="color:#8b8a9b" i],
html[data-theme="light"] [style*="color: #8b8a9b" i],
html[data-theme="light"] [style*="color: rgb(139, 138, 155)" i]{color:var(--muted)!important;}
html[data-theme="light"] [style*="color:#8888aa" i],
html[data-theme="light"] [style*="color: #8888aa" i],
html[data-theme="light"] [style*="color: rgb(136, 136, 170)" i]{color:var(--muted)!important;}
html[data-theme="light"] [style*="color:rgba(139,138,155,.7)" i],
html[data-theme="light"] [style*="color: rgba(139,138,155,.7)" i]{color:var(--muted)!important;}
html[data-theme="light"] [style*="color:#5c5c7a" i],
html[data-theme="light"] [style*="color: #5c5c7a" i],
html[data-theme="light"] [style*="color: rgb(92, 92, 122)" i]{color:var(--muted)!important;}
html[data-theme="light"] [style*="color:#94a3b8" i],
html[data-theme="light"] [style*="color: #94a3b8" i],
html[data-theme="light"] [style*="color: rgb(148, 163, 184)" i]{color:var(--muted)!important;}
html[data-theme="light"] [style*="color:#cbd5e1" i],
html[data-theme="light"] [style*="color: #cbd5e1" i],
html[data-theme="light"] [style*="color: rgb(203, 213, 225)" i]{color:#3b3552!important;}
html[data-theme="light"] [style*="color:#f1f0f6" i],
html[data-theme="light"] [style*="color: #f1f0f6" i],
html[data-theme="light"] [style*="color: rgb(241, 240, 246)" i]{color:var(--text)!important;}
html[data-theme="light"] [style*="color:#e0e0f0" i],
html[data-theme="light"] [style*="color: #e0e0f0" i],
html[data-theme="light"] [style*="color: rgb(224, 224, 240)" i]{color:var(--text)!important;}
html[data-theme="light"] [style*="color:#d4d1e8" i],
html[data-theme="light"] [style*="color: #d4d1e8" i],
html[data-theme="light"] [style*="color: rgb(212, 209, 232)" i]{color:#3b3552!important;}
html[data-theme="light"] [style*="color:#a78bfa" i],
html[data-theme="light"] [style*="color: #a78bfa" i],
html[data-theme="light"] [style*="color: rgb(167, 139, 250)" i]{color:#6d28d9!important;}
html[data-theme="light"] [style*="color:#c4b5fd" i],
html[data-theme="light"] [style*="color: #c4b5fd" i],
html[data-theme="light"] [style*="color: rgb(196, 181, 253)" i]{color:#6d28d9!important;}
html[data-theme="light"] [style*="color:#8b5cf6" i],
html[data-theme="light"] [style*="color: #8b5cf6" i],
html[data-theme="light"] [style*="color: rgb(139, 92, 246)" i]{color:#6d28d9!important;}
html[data-theme="light"] [style*="color:#818cf8" i],
html[data-theme="light"] [style*="color: #818cf8" i],
html[data-theme="light"] [style*="color: rgb(129, 140, 248)" i]{color:#4338ca!important;}
html[data-theme="light"] [style*="color:#34d399" i],
html[data-theme="light"] [style*="color: #34d399" i],
html[data-theme="light"] [style*="color: rgb(52, 211, 153)" i]{color:#047857!important;}
html[data-theme="light"] [style*="color:#60a5fa" i],
html[data-theme="light"] [style*="color: #60a5fa" i],
html[data-theme="light"] [style*="color: rgb(96, 165, 250)" i]{color:#1d4ed8!important;}
html[data-theme="light"] [style*="color:#93c5fd" i],
html[data-theme="light"] [style*="color: #93c5fd" i],
html[data-theme="light"] [style*="color: rgb(147, 197, 253)" i]{color:#1d4ed8!important;}
html[data-theme="light"] [style*="color:#3b82f6" i],
html[data-theme="light"] [style*="color: #3b82f6" i],
html[data-theme="light"] [style*="color: rgb(59, 130, 246)" i]{color:#1d4ed8!important;}
html[data-theme="light"] [style*="color:#f59e0b" i],
html[data-theme="light"] [style*="color: #f59e0b" i],
html[data-theme="light"] [style*="color: rgb(245, 158, 11)" i]{color:#b45309!important;}
html[data-theme="light"] [style*="color:#fcd34d" i],
html[data-theme="light"] [style*="color: #fcd34d" i],
html[data-theme="light"] [style*="color: rgb(252, 211, 77)" i]{color:#b45309!important;}
html[data-theme="light"] [style*="color:#5eead4" i],
html[data-theme="light"] [style*="color: #5eead4" i],
html[data-theme="light"] [style*="color: rgb(94, 234, 212)" i]{color:#0f766e!important;}
html[data-theme="light"] [style*="color:#2dd4bf" i],
html[data-theme="light"] [style*="color: #2dd4bf" i],
html[data-theme="light"] [style*="color: rgb(45, 212, 191)" i]{color:#0f766e!important;}
html[data-theme="light"] [style*="color:#14b8a6" i],
html[data-theme="light"] [style*="color: #14b8a6" i],
html[data-theme="light"] [style*="color: rgb(20, 184, 166)" i]{color:#0f766e!important;}
html[data-theme="light"] [style*="color:#fdba74" i],
html[data-theme="light"] [style*="color: #fdba74" i],
html[data-theme="light"] [style*="color: rgb(253, 186, 116)" i]{color:#c2410c!important;}
html[data-theme="light"] [style*="color:#fb923c" i],
html[data-theme="light"] [style*="color: #fb923c" i],
html[data-theme="light"] [style*="color: rgb(251, 146, 60)" i]{color:#c2410c!important;}
html[data-theme="light"] [style*="color:#f97316" i],
html[data-theme="light"] [style*="color: #f97316" i],
html[data-theme="light"] [style*="color: rgb(249, 115, 22)" i]{color:#c2410c!important;}
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,0.1)"],
html[data-theme="light"] [style*="border: 1px solid rgba(255,255,255,0.1)"],
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,.08)"],
html[data-theme="light"] [style*="border:1px solid rgba(255,255,255,.12)"]{border-color:rgba(30,20,70,.16)!important;}

/* mockup del prodotto (canvas dei funnel): resta scuro, e' l'interfaccia dell'app */
html[data-theme="light"] .funnel-canvas{
  --bg:#0a0a0f;--surface:#111118;--surface2:#16161f;--border:rgba(255,255,255,0.07);--border-strong:rgba(255,255,255,0.12);
  --violet:#7C3AED;--indigo:#4F46E5;--emerald:#10b981;--text:#f1f0f6;--muted:#8b8a9b;color:var(--text);
}

/* dentro il mockup scuro tornano i colori originali */
html[data-theme="light"] .funnel-canvas [style*="color:#8b8a9b" i],
html[data-theme="light"] .funnel-canvas [style*="color: #8b8a9b" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(139, 138, 155)" i]{color:#8b8a9b!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#8888aa" i],
html[data-theme="light"] .funnel-canvas [style*="color: #8888aa" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(136, 136, 170)" i]{color:#8888aa!important;}
html[data-theme="light"] .funnel-canvas [style*="color:rgba(139,138,155,.7)" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgba(139,138,155,.7)" i]{color:rgba(139,138,155,.7)!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#5c5c7a" i],
html[data-theme="light"] .funnel-canvas [style*="color: #5c5c7a" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(92, 92, 122)" i]{color:#5c5c7a!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#94a3b8" i],
html[data-theme="light"] .funnel-canvas [style*="color: #94a3b8" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(148, 163, 184)" i]{color:#94a3b8!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#cbd5e1" i],
html[data-theme="light"] .funnel-canvas [style*="color: #cbd5e1" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(203, 213, 225)" i]{color:#cbd5e1!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#f1f0f6" i],
html[data-theme="light"] .funnel-canvas [style*="color: #f1f0f6" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(241, 240, 246)" i]{color:#f1f0f6!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#e0e0f0" i],
html[data-theme="light"] .funnel-canvas [style*="color: #e0e0f0" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(224, 224, 240)" i]{color:#e0e0f0!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#d4d1e8" i],
html[data-theme="light"] .funnel-canvas [style*="color: #d4d1e8" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(212, 209, 232)" i]{color:#d4d1e8!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#a78bfa" i],
html[data-theme="light"] .funnel-canvas [style*="color: #a78bfa" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(167, 139, 250)" i]{color:#a78bfa!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#c4b5fd" i],
html[data-theme="light"] .funnel-canvas [style*="color: #c4b5fd" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(196, 181, 253)" i]{color:#c4b5fd!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#8b5cf6" i],
html[data-theme="light"] .funnel-canvas [style*="color: #8b5cf6" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(139, 92, 246)" i]{color:#8b5cf6!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#818cf8" i],
html[data-theme="light"] .funnel-canvas [style*="color: #818cf8" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(129, 140, 248)" i]{color:#818cf8!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#34d399" i],
html[data-theme="light"] .funnel-canvas [style*="color: #34d399" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(52, 211, 153)" i]{color:#34d399!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#60a5fa" i],
html[data-theme="light"] .funnel-canvas [style*="color: #60a5fa" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(96, 165, 250)" i]{color:#60a5fa!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#93c5fd" i],
html[data-theme="light"] .funnel-canvas [style*="color: #93c5fd" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(147, 197, 253)" i]{color:#93c5fd!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#3b82f6" i],
html[data-theme="light"] .funnel-canvas [style*="color: #3b82f6" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(59, 130, 246)" i]{color:#3b82f6!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#f59e0b" i],
html[data-theme="light"] .funnel-canvas [style*="color: #f59e0b" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(245, 158, 11)" i]{color:#f59e0b!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#fcd34d" i],
html[data-theme="light"] .funnel-canvas [style*="color: #fcd34d" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(252, 211, 77)" i]{color:#fcd34d!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#5eead4" i],
html[data-theme="light"] .funnel-canvas [style*="color: #5eead4" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(94, 234, 212)" i]{color:#5eead4!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#2dd4bf" i],
html[data-theme="light"] .funnel-canvas [style*="color: #2dd4bf" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(45, 212, 191)" i]{color:#2dd4bf!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#14b8a6" i],
html[data-theme="light"] .funnel-canvas [style*="color: #14b8a6" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(20, 184, 166)" i]{color:#14b8a6!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#fdba74" i],
html[data-theme="light"] .funnel-canvas [style*="color: #fdba74" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(253, 186, 116)" i]{color:#fdba74!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#fb923c" i],
html[data-theme="light"] .funnel-canvas [style*="color: #fb923c" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(251, 146, 60)" i]{color:#fb923c!important;}
html[data-theme="light"] .funnel-canvas [style*="color:#f97316" i],
html[data-theme="light"] .funnel-canvas [style*="color: #f97316" i],
html[data-theme="light"] .funnel-canvas [style*="color: rgb(249, 115, 22)" i]{color:#f97316!important;}

/* banner cookie */
html[data-theme="light"] #cookie-banner{background:rgba(255,255,255,.97)!important;border-top:1px solid var(--border)!important;box-shadow:0 -8px 40px rgba(30,20,70,.15)!important;}
html[data-theme="light"] #cookie-reject{color:var(--muted)!important;border-color:var(--border)!important;}
html[data-theme="light"] #cookie-mini{background:rgba(255,255,255,.95)!important;box-shadow:0 4px 20px rgba(30,20,70,.2)!important;}
html[data-theme="light"] .lang-btn.active{background:#6d28d9;}
