/*
 * Contenuti Tech-tips. Caricato da webshop/views/tech-tips/dettaglio.twig, webshop/views/prodotti/dettaglio.twig e
 * dall'editor dell'admin (CKEditor e anteprima di "Pulisci sorgente").
 *
 * .tt-body: aspetto di ogni tech-tip. Il sorgente pulito (App\Service\TechTip\ContentCleaner) non ha stili in linea,
 * quindi tutto lo decide questo file. Il testo "Normale" è lo stesso delle didascalie delle slide (Poppins 400,
 * --subtitle-size di typography.css); Titolo 2 e Titolo 3 scalano fra l'h1 di pagina (32px, 24px su mobile) e il
 * testo: 32 / 26 / 22 / 18 e 24 / 21 / 19 / 16. "Piccolo" (<small>) è un gradino sotto il testo.
 */
.tt-body {
    color: #fff;
    font-family: Poppins, Arial, Tahoma, sans-serif;
    font-size: var(--subtitle-size, 18px);
    font-weight: 400;
    line-height: var(--subtitle-line-height, 1.5);
}
.tt-body p {
    margin: 0 0 14px;
}
.tt-body h2 {
    margin: 28px 0 14px;
    color: #0deaf1;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
}
.tt-body h3 {
    margin: 24px 0 12px;
    color: red;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
}
.tt-body > :first-child,
.tt-body h2 + h3 {
    margin-top: 0;
}
.tt-body small {
    font-size: 15px;
    line-height: 1.45;
}
.tt-body strong {
    font-weight: 600;
}
.tt-body a {
    color: #0deaf1;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.tt-body ul,
.tt-body ol {
    margin: 0 0 16px;
    padding-left: 1.4em;
}
.tt-body li {
    margin: 0 0 6px;
}
.tt-body li::marker {
    color: #0deaf1;
}

/* foto: mai più larghe dello schermo */
.tt-body img {
    max-width: 100%;
    height: auto;
}

/* tabelle: righe sottili, prima colonna in evidenza; su schermi stretti scorrono al loro interno */
.tt-body table {
    display: block;
    max-width: 100%;
    margin: 0 0 20px;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.4;
}
.tt-body th,
.tt-body td {
    padding: 10px 14px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tt-body th {
    color: #0deaf1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.tt-body th:first-child,
.tt-body td:first-child {
    text-align: left;
}
.tt-body td:first-child {
    font-weight: 600;
}
.tt-body tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

/*
 * Larghezza e posizione scelte nella finestra Tabella dell'editor (classi sulla <table>, tenute da "Pulisci sorgente"):
 * tt-w-30…100 su computer, tt-wm-50…100 su smartphone, tt-center al centro. Senza scelta resta il comportamento sopra
 * (larga quanto il contenuto, scorre al suo interno se non ci sta). Con una larghezza la tabella torna una vera tabella
 * e i testi lunghi vanno a capo nelle celle. Le larghezze sono !important perché style.css del sito impone
 * "table { width: auto !important }" a tutte le tabelle.
 */
.tt-body table.tt-center {
    width: fit-content !important;
    margin-left: auto;
    margin-right: auto;
}
.tt-body table[class*="tt-w"] td,
.tt-body table[class*="tt-w"] th {
    overflow-wrap: anywhere;
}
@media (min-width: 768px) {
    .tt-body table.tt-w-30 { display: table; width: 30% !important; }
    .tt-body table.tt-w-40 { display: table; width: 40% !important; }
    .tt-body table.tt-w-50 { display: table; width: 50% !important; }
    .tt-body table.tt-w-60 { display: table; width: 60% !important; }
    .tt-body table.tt-w-70 { display: table; width: 70% !important; }
    .tt-body table.tt-w-80 { display: table; width: 80% !important; }
    .tt-body table.tt-w-90 { display: table; width: 90% !important; }
    .tt-body table.tt-w-100 { display: table; width: 100% !important; }
}
@media (max-width: 767px) {
    .tt-body table.tt-wm-50 { display: table; width: 50% !important; }
    .tt-body table.tt-wm-60 { display: table; width: 60% !important; }
    .tt-body table.tt-wm-70 { display: table; width: 70% !important; }
    .tt-body table.tt-wm-80 { display: table; width: 80% !important; }
    .tt-body table.tt-wm-90 { display: table; width: 90% !important; }
    .tt-body table.tt-wm-100 { display: table; width: 100% !important; }
}

/* impaginazione salvata con il vecchio suggeritore (es. "Factory Specials"): sparisce con "Pulisci sorgente" */
.tt-content {
    max-width: 880px;
    margin: 0 auto;
    text-align: left;
}
.tt-lead {
    font-size: 20px;
    line-height: 1.55;
}

@media (max-width: 767px) {
    .tt-body {
        font-size: 16px;
    }
    .tt-body h2 {
        font-size: 21px;
    }
    .tt-body h3 {
        font-size: 19px;
    }
    .tt-body small {
        font-size: 14px;
    }
    .tt-lead {
        font-size: 18px;
    }
}
