/* ==========================================================================
   confronto.css — componenti per le pagine di confronto prezzi concorrenti
   Usa i token di style.css (verde foresta / paper). Nessuna dipendenza.
   ========================================================================== */

/* --- Answer box: la risposta secca in cima, quella che Google può citare --- */
.article-content .answer-box {
    background: linear-gradient(150deg, #ffffff 0%, var(--forest-soft, #e8f0e9) 100%);
    border: 1px solid rgba(33, 76, 58, 0.18);
    border-left: 4px solid var(--forest, #214c3a);
    border-radius: var(--radius-xl, 14px);
    padding: 1.75rem 1.75rem 1.5rem;
    margin: 0 0 2.5rem;
    box-shadow: var(--shadow, 0 10px 25px rgba(24, 35, 31, 0.08));
}
.article-content .answer-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--forest, #214c3a);
    background: rgba(33, 76, 58, 0.09);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
}
.article-content .answer-box p { margin: 0 0 0.85rem; }
.article-content .answer-box p:last-child { margin-bottom: 0; }
.article-content .answer-note {
    font-size: 0.88rem;
    color: var(--text-light, #5f6f67);
    border-top: 1px dashed rgba(33, 76, 58, 0.22);
    padding-top: 0.85rem;
    margin-top: 1.1rem !important;
}

/* --- Tabelle: nota di fonte sotto ogni tabella --- */
.article-content .table-note {
    font-size: 0.86rem;
    color: var(--text-light, #5f6f67);
    margin-top: -1rem;
    margin-bottom: 2.25rem;
    line-height: 1.55;
}
.table-hint { font-weight: 400; font-size: 0.85em; color: var(--text-light, #5f6f67); }
.mega-table { overflow-x: auto; margin: 2rem 0 1.5rem; -webkit-overflow-scrolling: touch; }
.mega-table table { min-width: 620px; }
.mega-table th { background: var(--ink, #18231f); color: #fff; }
.highlight-row { background: var(--forest-soft, #e8f0e9) !important; }
.check-green { color: var(--success, #237a57); font-weight: 600; }
.cross-red   { color: var(--warning-red, #b94036); font-weight: 600; }
.warn-yellow { color: var(--brass, #b88746); font-weight: 600; }

/* --- Liste checklist numerate --- */
.article-content ol.checklist-ol { counter-reset: cl; list-style: none; padding-left: 0; margin: 1.5rem 0 2rem; }
.article-content ol.checklist-ol li {
    counter-increment: cl;
    position: relative;
    padding: 0.85rem 0 0.85rem 3rem;
    border-bottom: 1px solid rgba(24, 35, 31, 0.08);
}
.article-content ol.checklist-ol li:last-child { border-bottom: 0; }
.article-content ol.checklist-ol li::before {
    content: counter(cl);
    position: absolute;
    left: 0; top: 0.8rem;
    width: 2rem; height: 2rem;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--forest, #214c3a);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Verdetto a due colonne: quando sì / quando no --- */
.split-verdict {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 2.5rem;
}
.verdict-col {
    border-radius: var(--radius-xl, 14px);
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid rgba(24, 35, 31, 0.10);
    background: #fff;
}
.verdict-col h4 { margin: 0 0 0.9rem; font-size: 1.02rem; line-height: 1.35; }
.verdict-col ul { margin: 0; padding-left: 1.15rem; }
.verdict-col li { margin-bottom: 0.6rem; line-height: 1.6; }
.verdict-col li:last-child { margin-bottom: 0; }
.verdict-yes { border-top: 3px solid var(--questura, #285a7a); background: #f4f8fa; }
.verdict-yes h4 { color: var(--questura, #285a7a); }
.verdict-no  { border-top: 3px solid var(--success, #237a57); background: var(--forest-soft, #e8f0e9); }
.verdict-no h4 { color: var(--forest, #214c3a); }

/* ==========================================================================
   Calcolatore TCO
   ========================================================================== */
.calc {
    background: linear-gradient(165deg, #1b3b2c 0%, var(--ink, #18231f) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0 2.5rem;
    color: #fff;
    box-shadow: var(--shadow-xl, 0 30px 70px rgba(24, 35, 31, 0.18));
    position: relative;
    overflow: hidden;
}
.calc::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(110% 70% at 88% 0%, rgba(184, 135, 70, 0.20), transparent 62%);
    pointer-events: none;
}
.calc > * { position: relative; z-index: 1; }

.calc-head h3 {
    color: #fff !important;
    margin: 0 0 0.35rem !important;
    font-size: 1.4rem;
    line-height: 1.2;
}
.calc-head p { color: rgba(255, 255, 255, 0.72) !important; margin: 0 0 1.75rem !important; font-size: 0.95rem; }

.calc-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 1.9rem; }
.calc-field { display: block; }
.calc-label {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.80);
    margin-bottom: 0.7rem;
    font-weight: 500;
}
.calc-label b {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brass, #b88746);
    font-variant-numeric: tabular-nums;
}

.calc input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    outline: none;
    cursor: pointer;
}
.calc input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--brass, #b88746);
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    cursor: grab;
    transition: transform 0.15s ease;
}
.calc input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.12); cursor: grabbing; }
.calc input[type="range"]::-moz-range-thumb {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--brass, #b88746);
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    cursor: grab;
}
.calc input[type="range"]:focus-visible { outline: 2px solid var(--brass, #b88746); outline-offset: 4px; }

.calc-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.calc-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex; flex-direction: column; gap: 0.3rem;
}
.calc-card-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: rgba(255, 255, 255, 0.62); font-weight: 600; }
.calc-card-value { font-size: 1.85rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc-card-sub { font-size: 0.85rem; color: rgba(255, 255, 255, 0.68); }
.calc-card-sub b { color: rgba(255, 255, 255, 0.92); }
.calc-card.is-rival { border-color: rgba(185, 64, 54, 0.5); background: rgba(185, 64, 54, 0.14); }
.calc-card.is-rival .calc-card-value { color: #f0a49c; }
.calc-card.is-us { border-color: rgba(90, 190, 145, 0.55); background: rgba(35, 122, 87, 0.22); }
.calc-card.is-us .calc-card-value { color: #7fe0b0; }

.calc-verdict {
    background: rgba(255, 255, 255, 0.10);
    border-left: 4px solid var(--brass, #b88746);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 1.1rem;
}
.calc-verdict strong { color: var(--brass, #b88746); }
.calc-verdict.is-negative { border-left-color: #f0a49c; }
.calc-verdict.is-negative strong { color: #f0a49c; }

.calc-disclaimer { font-size: 0.82rem; color: rgba(255, 255, 255, 0.55) !important; line-height: 1.55; margin: 0 !important; }

@media (max-width: 640px) {
    .calc { padding: 1.5rem 1.25rem; border-radius: 16px; }
    .calc-card-value { font-size: 1.55rem; }
    .article-content .answer-box { padding: 1.35rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .calc input[type="range"]::-webkit-slider-thumb { transition: none; }
}
