/* BACKdigit theme 0.9.33: bdhe-frontend, bdtc-style, bd-cf-style, bd-push */
/* bdhe-frontend */
/* BD Header Elements - Frontend CSS v1.1.34 */

/* ====== PULSANTE DARK MODE ====== */
.bdhe-dark-toggle.bdhe-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bdhe-color-btn-bg, transparent);
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--bdhe-color-icon, inherit);
    line-height: 1;
    transition: opacity 0.2s ease;
}
.bdhe-dark-toggle.bdhe-button:hover { opacity: 0.75; }
.bdhe-dark-toggle.bdhe-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 3px;
}
.bdhe-toggle-icon { display: inline-block; line-height: 1; }

/* ====== INTERRUTTORE ON/OFF ====== */
.bdhe-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.bdhe-switch-label {
    font-size: 0.85em;
    color: var(--bdhe-color-label, inherit);
    opacity: 0.7;
    transition: opacity 0.25s;
    user-select: none;
}

.bdhe-switch-label-light { opacity: 1; }
.bdhe-switch-label-dark  { opacity: 0.5; }

.custom-dark .bdhe-switch-label-light { opacity: 0.5; }
.custom-dark .bdhe-switch-label-dark  { opacity: 1; }

/* Il pulsante switch */
.bdhe-dark-toggle.bdhe-switch {
    position: relative;
    display: inline-block;
    width: var(--bdhe-sw-w, 40px);
    height: var(--bdhe-sw-h, 22px);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}
.bdhe-dark-toggle.bdhe-switch:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 999px;
}

/* Traccia */
.bdhe-switch-track {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--bdhe-color-track-off, rgba(128,128,128,0.6));
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 999px;
    transition: background 0.25s ease;
    position: relative;
}

.custom-dark .bdhe-switch-track,
.bdhe-dark-toggle.bdhe-switch[aria-checked="true"] .bdhe-switch-track {
    background: var(--bdhe-color-track-on, var(--theme-palette-color-1, #2872fa));
    border-color: transparent;
}

/* Knob */
.bdhe-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: var(--bdhe-sw-k, 18px);
    height: var(--bdhe-sw-k, 18px);
    background: var(--bdhe-color-knob, #fff);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transition: transform 0.25s ease;
}

.custom-dark .bdhe-switch-knob,
.bdhe-dark-toggle.bdhe-switch[aria-checked="true"] .bdhe-switch-knob {
    transform: translateX(calc(var(--bdhe-sw-w, 40px) - var(--bdhe-sw-k, 18px) - 4px));
}

/* Knob con icone ☾ / ☼ */
.bdhe-switch-knob.bdhe-knob-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--bdhe-sw-icon-size, calc(var(--bdhe-sw-k, 18px) * 0.6));
    line-height: 1;
    user-select: none;
    color: var(--bdhe-color-knob-icon-light, #888);
    transition: transform 0.25s ease, color 0.25s ease;
}
/* Icona chiara visibile di default */
.bdhe-switch-knob.bdhe-knob-icons::before {
    content: var(--bdhe-sw-icon-light, '☾');
    display: block;
}
/* Icona scura quando attivo */
.custom-dark .bdhe-switch-knob.bdhe-knob-icons::before,
.bdhe-dark-toggle.bdhe-switch[aria-checked="true"] .bdhe-switch-knob.bdhe-knob-icons::before {
    content: var(--bdhe-sw-icon-dark, '☼');
    color: var(--bdhe-color-knob-icon-dark, #f5c542);
}

/* ====== HTML BLOCKS ====== */
.bdhe-html-block {
    display: flex;
    align-items: center;
}
.bdhe-html-block > * { margin: 0; }

/* Switch Desktop/Mobile via CSS (non più via wp_is_mobile() in PHP):
   wp_is_mobile() riflette lo User-Agent della richiesta reale, quindi
   nella preview del Customizer (stesso browser, sia in tab "Header
   desktop" che "Header per tablet/mobile") restituiva sempre lo stesso
   valore e il contenuto mobile non veniva mai mostrato in preview.
   Stampiamo entrambi i contenuti e decidiamo la visibilità via CSS,
   così la preview risponde alla larghezza simulata dell'iframe.
   Breakpoint: 1000px (dalla 2.4.4, prima 1024) — sotto questa soglia (quindi anche i tablet)
   viene mostrato il contenuto Mobile, non solo sotto i veri smartphone.
   Coerente con il confine desktop/tablet già usato altrove nel plugin
   (vedi dark-mode-toggle/view.php). Se il breakpoint impostato in
   Personalizza → Header → Impostazioni generali è diverso, aggiornalo
   anche qui sotto. */
.bdhe-html-block__mobile { display: none; }

/* 2.4.4: 1000 px come l'header del tema e di Blocksy (prima 1024: tra 1000 e 1024 px
   l'header desktop mostrava il contenuto mobile). */
@media (max-width: 999.98px) {
    .bdhe-html-block__desktop { display: none; }
    .bdhe-html-block__mobile  { display: block; }
}

/* Contenuto unico (campo Mobile lasciato vuoto): un solo blocco nel DOM,
   sempre visibile, nessuno switch via CSS necessario. */
.bdhe-html-block__all { display: block; }

/* ====== WIDGET SLOTS ====== */
.bdhe-widget-slot { display: flex; align-items: center; }
.bdhe-widget-slot .widget { margin: 0; }
.bdhe-widget-slot .widget-title { display: none; }
.bdhe-widget-slot p { margin-block-end: 0; margin-bottom: 0; }

/* ====== CONTENT BLOCKS ====== */
.bdhe-content-block { display: flex; align-items: center; }
.bdhe-content-block > * { margin: 0; }
.bdhe-content-block p:last-child { margin-bottom: 0; }

/* Switch Desktop/Mobile via CSS, stesso motivo e stesso breakpoint
   degli html-block (vedi sopra): wp_is_mobile() non riflette il
   device "simulato" nella preview del Customizer. */
.bdhe-content-block__mobile { display: none; }

@media (max-width: 999.98px) {
    .bdhe-content-block__desktop { display: none; }
    .bdhe-content-block__mobile  { display: block; }
}

/* Empty state nel Customizer */
.bdhe-empty {
    padding: 8px 12px;
    opacity: 0.5;
    font-size: 12px;
    font-style: italic;
    border: 1px dashed currentColor;
    border-radius: 4px;
}

/* Fix: wrapper elementi deve essere flex come gli altri elementi Blocksy */
[data-id^="html-block-"],
[data-id^="content-block-"],
[data-id^="widget-slot-"],
[data-id="dark-mode-toggle"] {
    display: flex !important;
    align-items: center;
}

/* ====== BD SEARCH ====== */

/* Fix wrapper nel builder Blocksy */
[data-id="bd-search"] {
    display: flex !important;
    align-items: center;
}

/* Bottone icona nell'header */
.bdhe-search-wrap {
    display: inline-flex;
    align-items: center;
}

.bdhe-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--bdhe-search-icon-color, inherit);
    line-height: 1;
    transition: color 0.2s ease, opacity 0.2s ease;
}
.bdhe-search-btn:hover {
    color: var(--bdhe-search-icon-hover-color, var(--bdhe-search-icon-color, inherit));
    opacity: 0.75;
}
.bdhe-search-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 3px;
}
.bdhe-search-btn svg {
    display: block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* Bottone con etichetta */
.bdhe-search-btn--with-label {
    gap: 6px;
}
.bdhe-search-btn-label {
    font-size: inherit;
    color: var(--bdhe-search-btn-label-color, var(--bdhe-search-icon-color, currentColor));
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.bdhe-search-btn:hover .bdhe-search-btn-label {
    color: var(--bdhe-search-icon-hover-color, var(--bdhe-search-btn-label-color, currentColor));
}

/* ── Overlay fullscreen ────────────────────────────────────── */
#bdhe-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bdhe-search-overlay-bg, rgba(10, 10, 15, 0.92));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    overflow-y: auto;
}
#bdhe-search-overlay.bdhe-search-open {
    display: flex;
    animation: bdheOverlayIn 0.22s ease both;
}

@keyframes bdheOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Blocca scroll body quando overlay aperto */
body.bdhe-search-body-open {
    overflow: hidden;
}

.bdhe-search-overlay-inner {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    position: relative;
    color: #fff;
}

/* Bottone chiudi (X) */
.bdhe-search-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    padding: 6px;
    line-height: 1;
    transition: color 0.2s;
    border-radius: 50%;
}
.bdhe-search-close:hover { color: #fff; }
.bdhe-search-close:focus-visible {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

/* Campo ricerca */
.bdhe-search-field-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 2px solid var(--bdhe-search-border-color, rgba(255,255,255,0.25));
    padding-bottom: 12px;
    margin-bottom: 28px;
    transition: border-color 0.2s;
}
.bdhe-search-field-wrap:focus-within {
    border-color: var(--bdhe-search-border-color, rgba(255,255,255,0.7));
    filter: brightness(1.3);
}

.bdhe-search-field-icon {
    flex-shrink: 0;
    opacity: 0.6;
    width: 28px;
    height: 28px;
}

/* Alta specificità per battere Blocksy (che usa selettore lungo su input[type=search]) */
#bdhe-search-overlay .bdhe-search-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    /* font-size e color vengono iniettati dal JS come <style> scoped con !important */
    font-size: var(--bdhe-search-field-fs, 2rem) !important;
    color: var(--bdhe-search-text-color, #fff) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    height: auto !important;
    padding: 0 !important;
    width: 100% !important;
    caret-color: var(--bdhe-search-text-color, #fff) !important;
    border-radius: 0 !important;
}
#bdhe-search-overlay .bdhe-search-input::placeholder {
    color: var(--bdhe-search-placeholder-color, rgba(255,255,255,0.35)) !important;
    opacity: 1 !important;
}
/* Rimuove la X nativa del browser */
#bdhe-search-overlay .bdhe-search-input::-webkit-search-cancel-button { display: none; }
#bdhe-search-overlay .bdhe-search-input::-webkit-search-decoration { display: none; }

/* ── Risultati live ────────────────────────────────────────── */
.bdhe-search-results { margin-bottom: 16px; }

.bdhe-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bdhe-search-item-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--bdhe-search-result-title-color, #fff) !important;
    transition: background 0.15s, color 0.15s;
}
.bdhe-search-item-link:hover {
    background: var(--bdhe-search-result-hover-bg, rgba(255,255,255,0.1)) !important;
    color: var(--bdhe-search-result-hover-color, #fff) !important;
}

/* Thumbnail */
.bdhe-search-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bdhe-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bdhe-search-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
}
.bdhe-search-no-thumb svg { width: 28px; height: 28px; }

/* Testo risultato */
.bdhe-search-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.bdhe-search-title {
    font-size: 1rem; /* override da JS scoped style */
    font-weight: 500;
    line-height: 1.3;
    color: var(--bdhe-search-result-title-color, #fff) !important;
    /* Nessun troncamento CSS fisso: il numero di parole è già gestito lato JS
       tramite l'opzione "Numero parole titolo risultato". Se il titolo resta
       lungo va a capo su più righe invece di tagliarsi con ... */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}
.bdhe-search-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
    color: var(--bdhe-search-result-type-color, inherit) !important;
    opacity: 1 !important;
}

/* Messaggi */
.bdhe-search-noresults,
.bdhe-search-error {
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
    padding: 8px 12px;
    margin: 0;
}

/* Link "Visualizza tutti" */
.bdhe-search-viewall {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 16px;
    text-align: center;
}
.bdhe-search-viewall-link {
    display: inline-block;
    color: var(--bdhe-search-viewall-color, rgba(255,255,255,0.75)) !important;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid var(--bdhe-search-viewall-color, rgba(255,255,255,0.25));
    border-radius: 999px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bdhe-search-viewall-link:hover {
    background: rgba(255,255,255,0.12);
    color: var(--bdhe-search-viewall-hover-color, #fff) !important;
    border-color: var(--bdhe-search-viewall-hover-color, rgba(255,255,255,0.5));
}

/* Loading dots */
.bdhe-search-loading {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 20px 0;
}
.bdhe-search-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    animation: bdheLoadingDot 1.2s infinite ease-in-out both;
}
.bdhe-search-loading span:nth-child(1) { animation-delay: 0s; }
.bdhe-search-loading span:nth-child(2) { animation-delay: 0.2s; }
.bdhe-search-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bdheLoadingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40%           { transform: scale(1);   opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
    .bdhe-search-overlay-inner {
        padding: 50px 16px 30px;
    }
    .bdhe-search-thumb {
        width: 44px;
        height: 44px;
    }
}

/* ── Overlay: evidenziazione keyword ── */
#bdhe-search-overlay .bdhe-search-highlight,
.bdhe-search-highlight {
    background: transparent;
    color: inherit;
    font-weight: 700;
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: var(--bdhe-search-result-title-color, rgba(255,255,255,0.7));
    text-underline-offset: 2px;
}

/* ── Overlay: storico ricerche ── */
.bdhe-search-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
}
.bdhe-search-history-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    padding: 2px 6px;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}
.bdhe-search-history-clear:hover {
    color: rgba(255,100,100,0.9);
    background: rgba(255,255,255,0.07);
}
.bdhe-search-history-item {
    display: flex;
    align-items: center;
}
.bdhe-search-history-item .bdhe-search-item-link { flex: 1; }
.bdhe-search-history-icon {
    background: rgba(255,255,255,0.07) !important;
    color: rgba(255,255,255,0.5);
}
.bdhe-search-history-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    color: rgba(255,255,255,0.25);
    line-height: 1;
    transition: color 0.15s;
}
.bdhe-search-history-remove:hover { color: rgba(255,100,100,0.9); }

/* ── Overlay: excerpt risultati ── */
.bdhe-search-excerpt {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    margin-top: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Nasconde Google AdSense mentre l'overlay ricerca è aperto ── */
body.bdhe-search-body-open .adsbygoogle,
body.bdhe-search-body-open ins.adsbygoogle,
body.bdhe-search-body-open [id^="google_ads_iframe"],
body.bdhe-search-body-open [id^="aswift_"],
body.bdhe-search-body-open .google-auto-placed,
body.bdhe-search-body-open #google_ads_iframe_anchor,
body.bdhe-search-body-open .google-anchor-ad,
body.bdhe-search-body-open div[data-anchor-status],
body.bdhe-search-body-open iframe[id^="google_ads_iframe"],
body.bdhe-search-body-open .GoogleActiveViewElement {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ══ 2.3.0 — Pulsante modalità scura: 8 design (tema BACKdigit) ══════════
 * Chiaro/scuro dal CSS: classe custom-dark su <html>. Colore: --bdhe-dm-accent.
 */
.bdhe-dm {
	--bdhe-dm-accent: var(--bdt-accent, #fc8f00);
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .45em;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 17px;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.bdhe-dm:hover,
.bdhe-dm:focus { background: transparent; color: inherit; }
.bdhe-dm:focus-visible { outline: 2px solid var(--bdhe-dm-accent); outline-offset: 3px; border-radius: 6px; }
.bdhe-dm--s { font-size: 14px; }
.bdhe-dm--l { font-size: 21px; }
/* 2.4.0: dimensione per desktop, tablet e mobile */
.bdhe-dm[style*="--bdhe-dm-fs"] { font-size: var(--bdhe-dm-fs); }
@media (max-width: 999.98px) { .bdhe-dm[style*="--bdhe-dm-fs"] { font-size: var(--bdhe-dm-fs-t, var(--bdhe-dm-fs)); } }
@media (max-width: 689.98px) { .bdhe-dm[style*="--bdhe-dm-fs"] { font-size: var(--bdhe-dm-fs-m, var(--bdhe-dm-fs-t, var(--bdhe-dm-fs))); } }
.bdhe-dm .bdhe-dm-i { display: block; width: 1.15em; height: 1.15em; line-height: 1.15em; text-align: center; }
.bdhe-dm .bdhe-dm-moon,
.custom-dark .bdhe-dm .bdhe-dm-sun,
.bdhe-dm .bdhe-dm-d,
.custom-dark .bdhe-dm .bdhe-dm-l { display: none; }
.custom-dark .bdhe-dm .bdhe-dm-moon,
.custom-dark .bdhe-dm .bdhe-dm-d { display: block; }
.bdhe-dm-label { font-family: var(--bdt-font-menu, inherit); font-size: .82em; letter-spacing: .5px; white-space: nowrap; }
.bdhe-dm-label > span { display: inline; }
.custom-dark .bdhe-dm-label .bdhe-dm-d { display: inline; }
.bdhe-dm-ico { display: inline-flex; transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.custom-dark .bdhe-dm-ico { transform: rotate(-25deg); }

/* 1 Icona */
.bdhe-dm--icon:hover .bdhe-dm-ico { color: var(--bdhe-dm-accent); }

/* 2 Cerchio */
.bdhe-dm--circle .bdhe-dm-ico { width: 2.1em; height: 2.1em; align-items: center; justify-content: center; border-radius: 50%; background: var(--bdhe-dm-accent); color: #fff; }

/* 3 Pillola */
.bdhe-dm--pill { padding: .42em .9em; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 999px; }
.bdhe-dm--pill:hover { border-color: var(--bdhe-dm-accent); }
.bdhe-dm--pill .bdhe-dm-ico { color: var(--bdhe-dm-accent); }

/* 4 Interruttore */
.bdhe-dm-track { position: relative; display: inline-block; flex: none; width: 3.1em; height: 1.65em; border-radius: 999px; background: color-mix(in srgb, currentColor 30%, transparent); transition: background .25s; }
.custom-dark .bdhe-dm-track { background: var(--bdhe-dm-accent); }
.bdhe-dm-knob { position: absolute; top: .15em; left: .15em; display: flex; align-items: center; justify-content: center; width: 1.35em; height: 1.35em; border-radius: 50%; background: #fff; color: #f5a623; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
.custom-dark .bdhe-dm-knob { transform: translateX(1.45em); color: #3c4a7a; }
.bdhe-dm-knob .bdhe-dm-i { width: .85em; height: .85em; line-height: .85em; font-size: .9em; }

/* 5 Giorno e notte */
.bdhe-dm-sky { position: relative; display: inline-block; flex: none; width: 3.5em; height: 1.75em; overflow: hidden; border-radius: 999px; background: linear-gradient(180deg, #5ab4f5, #9bd6ff); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25); transition: background .4s; }
.custom-dark .bdhe-dm-sky { background: linear-gradient(180deg, #0d1330, #27306b); }
.bdhe-dm-orb { position: absolute; top: .2em; left: .2em; width: 1.35em; height: 1.35em; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 .5em rgba(255, 210, 63, .8); transition: transform .4s cubic-bezier(.4, 0, .2, 1), background .4s, box-shadow .4s; }
.custom-dark .bdhe-dm-orb { transform: translateX(1.75em); background: #e9e9f2; box-shadow: inset -.35em -.15em 0 #c3c3d3; }
.bdhe-dm-sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .4s; }
.bdhe-dm-sky i:nth-child(1) { left: 22%; top: 30%; }
.bdhe-dm-sky i:nth-child(2) { left: 34%; top: 65%; }
.bdhe-dm-sky i:nth-child(3) { left: 14%; top: 60%; }
.custom-dark .bdhe-dm-sky i { opacity: 1; }

/* 6 Segmentato */
.bdhe-dm-seg { display: inline-flex; overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 8px; font-family: var(--bdt-font-menu, inherit); font-size: .8em; letter-spacing: .5px; }
.bdhe-dm-seg > span { display: inline-flex; align-items: center; padding: .4em .7em; opacity: .7; transition: background .2s, opacity .2s; }
.bdhe-dm-seg .bdhe-dm-i { width: 1.2em; height: 1.2em; }
html:not(.custom-dark) .bdhe-dm-seg-l,
.custom-dark .bdhe-dm-seg-d { background: var(--bdhe-dm-accent); color: #fff; opacity: 1; }

/* 7 Testo e interruttore */
.bdhe-dm--textswitch { gap: .6em; }
.bdhe-dm-text { font-family: var(--bdt-font-menu, inherit); font-size: .78em; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.bdhe-dm-track--mini { width: 2.1em; height: 1.15em; }
.bdhe-dm-track--mini .bdhe-dm-knob { width: .85em; height: .85em; }
.custom-dark .bdhe-dm-track--mini .bdhe-dm-knob { transform: translateX(.95em); }

/* 8 Minimal */
.bdhe-dm--minimal .bdhe-dm-ico { width: 2em; height: 2em; align-items: center; justify-content: center; border-radius: 10px; opacity: .8; transition: background .2s, opacity .2s, transform .45s; }
.bdhe-dm--minimal:hover .bdhe-dm-ico { background: color-mix(in srgb, currentColor 12%, transparent); opacity: 1; }
.bdhe-dm--minimal .bdhe-dm-i { stroke-width: 1.5; }

@media (prefers-reduced-motion: reduce) {
	.bdhe-dm *, .bdhe-dm { transition: none !important; }
}

/* bdtc-style */
/* BD Tech Comparator — Frontend CSS */

.bdtc-wrap {
    --bg:#fff;--bg-card:#f7f8fa;--bg-input:#f0f1f4;--border:#e2e4ea;
    --accent:#003483;--accent-dim:rgba(0,52,131,0.07);--accent2:#ff4500;
    --text:#111318;--text-label:#444854;--muted:#6b7280;
    --radius:14px;--shadow:0 2px 16px rgba(0,0,0,0.07);
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    background:var(--bg);border-radius:20px;padding:16px 8px 32px;
    color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow);
}
.custom-dark .bdtc-wrap {
    --bg:var(--theme-palette-color-8);--bg-card:var(--theme-palette-color-8);
    --bg-input:var(--theme-palette-color-6);--border:#373839;
    --accent:var(--theme-palette-color-1);--accent-dim:rgba(0,242,246,0.08);
    --accent2:#00afbb;--text:#fff;--text-label:#bfb8b8;--muted:#bfb8b8;
    --shadow:0 0 24px rgba(0,242,246,0.10);
}
.bdtc-wrap * { box-sizing:border-box;margin:0;padding:0; }

.bdtc-title { font-family:Georgia,'Times New Roman',serif;font-size:24px;font-weight:800;text-align:center;margin-bottom:6px;color:var(--text); }
.bdtc-title span { color:var(--accent); }
.bdtc-subtitle { text-align:center;color:var(--muted);font-size:13px;margin-bottom:28px; }

.bdtc-selectors { display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:end;margin-bottom:10px; }
.bdtc-selector-group label { display:block;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1.2px;color:var(--muted);margin-bottom:6px; }
.bdtc-search-wrap { position:relative; }
.bdtc-search-input { width:100%;background:var(--bg-input);border:1px solid gray;border-radius:var(--radius);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:14px;padding:11px 15px;outline:none;transition:border-color .2s,box-shadow .2s; }
.bdtc-search-input:focus { border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-dim); }
.bdtc-hint { font-size:11px;color:var(--muted);margin-top:5px;font-style:italic; }

.bdtc-dropdown { position:absolute;top:calc(100% + 5px);left:0;right:0;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);z-index:9999;max-height:240px;overflow-y:auto;display:none;box-shadow:0 8px 32px rgba(0,0,0,.12); }
.bdtc-dropdown.open { display:block; }
.bdtc-drop-item { padding:8px 12px;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:10px;color:var(--text);border-bottom:1px solid var(--border);transition:background .12s;min-height:60px; }
.bdtc-drop-item:hover { background:var(--accent-dim); }
.bdtc-drop-img { width:38px;height:50px;object-fit:contain;border-radius:5px;background:var(--bg);flex-shrink:0; }
.bdtc-drop-placeholder { width:38px;height:50px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0; }
.bdtc-drop-info { display:flex;flex-direction:column;flex:1;min-width:0; }
.bdtc-drop-name { font-size:13px;color:var(--text);line-height:1.4; }
.bdtc-drop-year { font-size:11px;color:var(--muted); }
.bdtc-drop-label { padding:6px 12px 4px;font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--border); }

.bdtc-vs { display:flex;align-items:center;justify-content:center;padding-bottom:4px; }
.bdtc-vs span { font-family:Georgia,'Times New Roman',serif;font-size:18px;font-weight:800;color:var(--accent2);border:2px solid var(--accent2);border-radius:50%;width:42px;height:42px;display:flex;align-items:center;justify-content:center; }

.bdtc-btn { display:block;width:100%;padding:13px;margin-top:8px;background:#57b54d;color:#fff;font-family:Georgia,'Times New Roman',serif;font-weight:700;font-size:15px;border:none;border-radius:var(--radius);cursor:pointer;transition:opacity .15s,transform .15s; }
.bdtc-btn:hover { opacity:.88;transform:translateY(-1px); }
.bdtc-btn:disabled { opacity:.4;cursor:not-allowed;transform:none; }

.bdtc-loading { text-align:center;padding:36px;color:var(--muted);display:none; }
.bdtc-spinner { width:34px;height:34px;margin:0 auto 10px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:bdtcspin .7s linear infinite; }
@keyframes bdtcspin { to { transform:rotate(360deg); } }

.bdtc-error { background:rgba(220,38,38,.07);border:1px solid rgba(220,38,38,.2);border-radius:var(--radius);padding:14px 18px;color:#dc2626;font-size:13px;margin-top:12px;display:none;text-align:center; }
.bdtc-risultati { display:none;margin-top:28px; }
.bdtc-cards { display:none !important; }
.bdtc-nota { text-align:center;font-size:11px;color:var(--muted);margin-top:12px;padding-top:12px;border-top:1px solid var(--border); }

/* TABLE */
.bdtc-table-scroll { display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);border-radius:18px;margin-bottom:20px; }
.bdtc-table { width:100%;border-collapse:collapse;min-width:480px; }
.bdtc-th-label { width:120px;min-width:120px;position:sticky;left:0;background:var(--bg);z-index:3;border-bottom:2px solid var(--border);padding:12px 10px;vertical-align:top; }
.bdtc-th-phone { text-align:left;padding:14px 12px;border-bottom:2px solid var(--border);border-left:1px solid var(--border);background:linear-gradient(160deg,var(--accent-dim) 0%,transparent 100%);vertical-align:top;width:56%; }
.bdtc-th-phone:last-child { background:linear-gradient(160deg,rgba(0,175,187,0.08) 0%,transparent 100%); }
.bdtc-th-inner { align-items:flex-start;gap:12px; }
.bdtc-th-img { width:80px;height:110px;object-fit:contain;flex-shrink:0; }
.bdtc-th-info { flex:1;min-width:0; }
.bdtc-th-brand { font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin-bottom:2px; }
.bdtc-th-name { font-family:Georgia,'Times New Roman',serif;font-size:14px;font-weight:700;color:var(--text);margin-bottom:8px;line-height:1.3; }
.bdtc-shop-btns { display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:6px; }
.bdtc-shop-btns a { display:block; }

.bdtc-section { background:#57b54d;color:#fff;font-family:Georgia,'Times New Roman',serif;font-size:12px;font-weight:700;text-transform:uppercase;padding:6px 10px;position:sticky;left:0;z-index:2;white-space:nowrap; }
.bdtc-label-cell { position:sticky;left:0;background:var(--bg);z-index:1;padding:8px 10px;font-size:11px;font-weight:700;color:var(--text-label);text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid var(--border);min-width:120px;max-width:120px;width:120px;line-height:1.3;word-break:break-word; }
.bdtc-val-cell { padding:8px 12px;font-size:13px;color:var(--text);border-bottom:1px solid var(--border);border-left:1px solid var(--border);vertical-align:middle;line-height:1.45; }
.bdtc-val-cell a { color:var(--accent);text-decoration:underline;font-weight:600; }
.bdtc-val-cell a:hover { color:var(--accent2); }
.bdtc-miss { color:var(--muted); }

/* SINGLE */
.bdtc-single-wrap { border:1px solid var(--border);border-radius:18px;overflow:hidden;margin-bottom:20px; }
.bdtc-single-header { display:flex;align-items:flex-start;gap:16px;padding:20px 16px;border-bottom:1px solid var(--border);background:linear-gradient(160deg,var(--accent-dim) 0%,transparent 100%); }
.bdtc-single-img { width:100px;height:136px;object-fit:contain;flex-shrink:0; }
.bdtc-single-info { flex:1; }
.bdtc-single-brand { font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin-bottom:4px; }
.bdtc-single-name { font-family:Georgia,'Times New Roman',serif;font-size:20px;font-weight:700;color:var(--text);margin-bottom:10px; }

/* SCORES */
.bdtc-scores { background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:20px 22px;margin-bottom:16px; }
.bdtc-scores h4 { font-family:Georgia,'Times New Roman',serif;font-size:15px;font-weight:800;margin-bottom:16px;color:var(--text); }
.bdtc-score-row { display:flex;align-items:center;gap:10px;margin-bottom:12px; }
.bdtc-score-label { font-size:12px;font-weight:600;color:var(--text);width:140px;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.bdtc-score-track { flex:1;height:10px;background:var(--bg-input);border-radius:99px;overflow:hidden; }
.bdtc-score-fill { height:100%;border-radius:99px;width:0;transition:width 1s cubic-bezier(.4,0,.2,1); }
.bdtc-p1 { background:var(--accent); }
.bdtc-p2 { background:#00afbb;transition-delay:.15s; }
.bdtc-score-val { font-size:11px;color:var(--muted);width:80px;text-align:right; }

/* AI BOX */
.bdtc-ai-box { background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-top:16px; }
.bdtc-ai-box h4 { font-family:Georgia,'Times New Roman',serif;font-size:16px;font-weight:800;margin-bottom:12px;color:var(--text);display:flex;align-items:center;gap:8px; }
.bdtc-ai-text { font-size:16px;line-height:1.8;color:var(--text); }
.bdtc-ai-text p { margin-bottom:10px; }
.bdtc-ai-text strong { color:var(--accent); }

/* BRAND CAROUSEL */
.bdtc-brand-carousel { margin-top:16px;padding:14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius); }
.bdtc-brand-carousel h5 { font-family:Georgia,'Times New Roman',serif;font-size:12px;font-weight:700;color:var(--text);margin-bottom:10px;text-transform:uppercase;letter-spacing:.5px; }
.bdtc-brand-scroll { display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding-bottom:4px; }
.bdtc-brand-scroll::-webkit-scrollbar { height: 4px; }
.bdtc-brand-scroll::-webkit-scrollbar-track { background: transparent; border-radius: 4px; }
.bdtc-brand-scroll::-webkit-scrollbar-thumb { background: var(--accent, #003483); border-radius: 4px; }
.bdtc-brand-card { flex:0 0 110px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 6px;background:var(--bg);border:1px solid var(--border);border-radius:10px;cursor:pointer;transition:transform .15s,border-color .15s;text-align:center; }
.bdtc-brand-card:hover { transform:translateY(-2px);border-color:var(--accent); }
.bdtc-brand-card img { width:80px;height:110px;object-fit:contain;border-radius:5px; }
.bdtc-bc-name { font-size:17px;font-weight:600;color:var(--text);line-height:1.3;word-break:break-word; }
.bdtc-bc-year { font-size:17px;color:var(--muted); }

/* LIGHTBOX */
.bdtc-lightbox { display:none;position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.85);align-items:center;justify-content:center;cursor:zoom-out; }
.bdtc-lightbox.open { display:flex; }
.bdtc-lightbox img { max-width:90vw;max-height:90vh;object-fit:contain;border-radius:12px;box-shadow:0 8px 40px rgba(0,0,0,.5); }
.bdtc-lb-close { position:fixed;top:16px;right:20px;color:#fff;font-size:32px;cursor:pointer;z-index:100000; }

/* QUICK SPECS (rete + RAM + storage) */
.bdtc-quick-specs { display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0 10px; }
.bdtc-net-logo { height:26px;width:auto;object-fit:contain;flex-shrink:0; }
.bdtc-net-badge { display:inline-block;font-size:11px;font-weight:800;padding:3px 8px;border-radius:5px;letter-spacing:.5px;line-height:1.4; }
.bdtc-net-5g { background:#1a3c8f;color:#fff; }
.bdtc-net-4g { background:#0077c8;color:#fff; }
.bdtc-qs-chip { display:inline-block;font-size:12px;font-weight:700;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:5px;padding:3px 9px;line-height:1.4;white-space:nowrap; }
.bdtc-qs-ram { background:rgba(0,52,131,0.07);border-color:rgba(0,52,131,0.2);color:var(--accent); }
.bdtc-qs-storage { background:rgba(87,181,77,0.08);border-color:rgba(87,181,77,0.3);color:#3a7a32; }
.custom-dark .bdtc-qs-ram { background:rgba(0,242,246,0.1);border-color:rgba(0,242,246,0.25);color:var(--accent); }
.custom-dark .bdtc-qs-storage { background:rgba(87,181,77,0.12);border-color:rgba(87,181,77,0.3);color:#7ecf78; }

/* RESPONSIVE */
@media(min-width:621px){
    .bdtc-th-label { width:180px;min-width:180px; }
    .bdtc-label-cell { width:180px;min-width:180px;max-width:180px;font-size:12px; }
    .bdtc-val-cell { font-size:14px;padding:10px 16px; }
    .bdtc-th-img { width:90px;height:120px;cursor:zoom-in;transition:transform .15s; }
    .bdtc-th-img:hover { transform:scale(1.04); }
    .bdtc-th-name { font-size:15px; }
    .bdtc-net-logo { height:28px; }
    .bdtc-qs-chip { font-size:13px; }
}
@media(max-width:620px){
    .bdtc-wrap { padding:14px 6px 26px; }
    .bdtc-selectors { grid-template-columns:1fr;gap:10px; }
    .bdtc-vs { display:none; }
    .bdtc-title { font-size:20px; }
    .bdtc-th-label { width:90px;min-width:90px; }
    .bdtc-label-cell { width:90px;min-width:90px;max-width:90px; }
    .bdtc-th-img { width:100px;height:120px; }
    .bdtc-single-header { flex-direction:column;align-items:center;text-align:center; }
    .bdtc-shop-btns { justify-content:center; }
    .bdtc-quick-specs { justify-content:center; }
    .bdtc-net-logo { height:22px; }
    .bdtc-qs-chip { font-size:11px;padding:3px 7px; }
    .bdtc-net-badge { font-size:10px; }
}

/* ─── PRODOTTI RECENTI ────────────────────────────────────────────────────── */
.bdtc-recenti-wrap {
    width: 100%;
    margin: 16px 0;
}
.bdtc-recenti-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    align-items: stretch; /* equal height */
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.bdtc-recenti-scroll::-webkit-scrollbar { height: 4px; }
.bdtc-recenti-scroll::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 4px; }
.bdtc-recenti-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.bdtc-recenti-card {
    flex: 0 0 150px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: box-shadow .2s;
}
.bdtc-recenti-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.bdtc-recenti-img {
    width: 90px;
    height: 110px;
    object-fit: contain;
    flex-shrink: 0;
}
.bdtc-recenti-noimg {
    width: 90px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.bdtc-recenti-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    text-align: center;
    flex: 1; /* spinge i bottoni in fondo — equal height */
}
.bdtc-recenti-year {
    font-size: 12px;
    color: #888;
}
.bdtc-recenti-btns {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    margin-top: auto; /* sempre in fondo alla card */
}
.bdtc-btn-amazon, .bdtc-btn-ebay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    gap: 4px;
}
.bdtc-btn-amazon { background: transparent; border: 1px solid #ddd; color: #000; }
.bdtc-btn-amazon:hover { background: #f9f9f9; }
.bdtc-btn-ebay   { background: transparent; border: 1px solid #ddd; color: #000; }
.bdtc-btn-ebay:hover { background: #f9f9f9; }

@media (max-width: 620px) {
    .bdtc-recenti-card { flex: 0 0 150px; }
    .bdtc-recenti-img  { width: 90px; height: 110px; }
    .bdtc-recenti-name { font-size: 17px; }
}

/* ─── CONFRONTI CORRELATI ────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════
   BLOCCHI CORRELATI: Schede + Confronti
   ═══════════════════════════════════════════════════════════════ */

.bdtc-correlati-wrap {
    margin: 24px 0;
}
.bdtc-correlati-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text, #111318);
    margin-bottom: 14px;
}

/* ── Layout scroll orizzontale ── */
.bdtc-correlati-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    align-items: stretch;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.bdtc-correlati-scroll::-webkit-scrollbar        { height: 4px; }
.bdtc-correlati-scroll::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 4px; }
.bdtc-correlati-scroll::-webkit-scrollbar-thumb  { background: var(--accent, #003483); border-radius: 4px; }

/* ── Layout griglia ── */
.bdtc-correlati-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* ── Layout lista verticale ── */
.bdtc-correlati-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bdtc-correlati-lista .bdtc-correlati-card {
    flex-direction: row;
    align-items: center;
}
.bdtc-correlati-lista .bdtc-correlati-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}
.bdtc-correlati-lista .bdtc-correlati-info {
    flex: 1;
    padding: 0 0 0 10px;
}

/* ── Card base ── */
.bdtc-correlati-card {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    background: var(--card, #fff);
    border: 1px solid var(--border, #e2e4ea);
    border-radius: 10px;
    overflow: hidden !important;
    text-decoration: none;
    transition: box-shadow .2s, transform .15s;
    color: inherit;
    min-width: 0;
}
.bdtc-correlati-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ── Area immagine schede (singola foto prodotto) ── */
.bdtc-correlati-img {
    width: 100%;
    height: 120px;
    background-color: #f0f1f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.bdtc-correlati-card .bdtc-correlati-img img,
.bdtc-correlati-img img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    float: none !important;
}
.bdtc-correlati-noimg-icon {
    font-size: 32px;
    line-height: 1;
}

/* ── Info testo ── */
.bdtc-correlati-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.bdtc-correlati-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text, #111318);
    line-height: 1.35;
    display: block;
}
.bdtc-correlati-views {
    font-size: 11px;
    color: #888;
    margin-top: auto;
}

/* ── Card confronto VS ── */
.bdtc-correlati-card-vs {
    flex: 0 0 250px;
}

/* Contenitore esterno: due metà affiancate + badge overlay */
.bdtc-vs-outer {
    width: 100%;
    height: 120px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    background: #f0f1f4;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Metà sinistra e destra */
.bdtc-vs-half {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 50%;
    flex: 1 1 50%;
    height: 120px;
    min-width: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    overflow: hidden;
    background: #f0f1f4;
}
.bdtc-vs-half img,
.bdtc-correlati-card-vs .bdtc-vs-half img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    float: none !important;
}
.bdtc-vs-half .bdtc-correlati-noimg-icon {
    font-size: 24px;
}

/* Linea divisoria verticale */
.bdtc-vs-outer::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    width: 1px;
    height: 80%;
    background: rgba(0,0,0,.12);
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
}

/* Badge VS centrato assoluto */
.bdtc-vs-badge-wrap {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    -webkit-transform: translate(-50%, -50%) !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10;
    pointer-events: none;
    width: auto;
    height: auto;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}
.bdtc-vs-badge-wrap b {
    display: inline-block;
    background: var(--accent, #003483) !important;
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
    letter-spacing: .5px !important;
    font-style: normal !important;
    text-decoration: none !important;
}

@media (max-width: 620px) {
    .bdtc-correlati-scroll .bdtc-correlati-card     { flex: 0 0 165px; }
    .bdtc-correlati-scroll .bdtc-correlati-card-vs  { flex: 0 0 210px; }
    .bdtc-correlati-griglia { grid-template-columns: repeat(2, 1fr); }
    .bdtc-correlati-title   { font-size: 18px; }
    .bdtc-correlati-img     { height: 100px; }
    .bdtc-vs-outer,
    .bdtc-vs-half           { height: 100px; }
}

/* bd-cf-style */
.bd-cf-form {
	max-width: 700px;
}

.bd-cf-fields-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}

.bd-cf-width-full {
	width: 100%;
}

.bd-cf-width-half,
.bd-cf-width-half_mobile {
	width: calc( 50% - 10px );
}

/* Su schermi stretti, i campi "metà riga" tornano a riga intera per leggibilità.
   I campi impostati su "metà riga (anche su mobile)" restano affiancati anche qui. */
@media ( max-width: 600px ) {
	.bd-cf-width-half {
		width: 100%;
	}
}

.bd-cf-field {
	margin-bottom: 20px;
	box-sizing: border-box;
}

.bd-cf-form .bd-cf-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: var( --bd-cf-text-color, inherit ) !important;
	font-family: var( --bd-cf-font-family, inherit ) !important;
}

.bd-cf-form .bd-cf-field input[type="text"],
.bd-cf-form .bd-cf-field input[type="email"],
.bd-cf-form .bd-cf-field input[type="tel"],
.bd-cf-form .bd-cf-field input[type="number"],
.bd-cf-form .bd-cf-field input[type="date"],
.bd-cf-form .bd-cf-field input[type="url"],
.bd-cf-form .bd-cf-field textarea {
	width: 100%;
	padding: 10px;
	box-sizing: border-box;
	border: 1px solid var( --bd-cf-border-color, #ccc ) !important;
	border-radius: var( --bd-cf-border-radius, 4px ) !important;
	font-size: 15px;
	font-family: var( --bd-cf-font-family, inherit ) !important;
	line-height: normal;
	background-color: var( --bd-cf-bg-color, #fff ) !important;
	color: var( --bd-cf-text-color, inherit ) !important;
}

.bd-cf-heading {
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 700;
	color: var( --bd-cf-text-color, inherit );
	font-family: var( --bd-cf-font-family, inherit );
}

.bd-cf-radio-option,
.bd-cf-checkbox-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: normal;
	margin-bottom: 6px;
	cursor: pointer;
}

.bd-cf-radio-option input,
.bd-cf-checkbox-option input {
	width: auto;
	margin: 0;
}

.bd-cf-recaptcha {
	margin-bottom: 20px;
}

.bd-cf-login-required {
	max-width: 700px;
	padding: 20px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	background: #f6f7f7;
}

.bd-cf-login-required a {
	font-weight: 600;
}

.bd-cf-login-required-custom {
	text-align: center;
}

.bd-cf-form .bd-cf-field select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var( --bd-cf-border-color, #ccc ) !important;
	border-radius: var( --bd-cf-border-radius, 4px ) !important;
	font-size: 15px;
	font-family: var( --bd-cf-font-family, inherit ) !important;
	color: var( --bd-cf-text-color, inherit ) !important;
	background-color: var( --bd-cf-bg-color, #fff ) !important;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	padding-inline-end: 36px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23666'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
}

.bd-cf-field select:focus {
	outline: none;
	border-color: #1d2327;
}

.bd-cf-required {
	color: #d63638;
}

.bd-cf-hint {
	font-size: 13px;
	color: #666;
	margin-top: 4px;
}

.bd-cf-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

.bd-cf-form button.bd-cf-submit[type="submit"] {
	background: var( --bd-cf-button-bg, #1d2327 ) !important;
	color: var( --bd-cf-button-text, #fff ) !important;
	border: none !important;
	padding: 12px 30px;
	border-radius: var( --bd-cf-button-radius, 4px ) !important;
	font-size: 16px;
	font-family: var( --bd-cf-font-family, inherit ) !important;
	cursor: pointer;
}

.bd-cf-form button.bd-cf-submit[type="submit"]:hover {
	opacity: 0.85;
}

.bd-cf-message {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-weight: 600;
}

.bd-cf-success {
	background: #d1e7dd;
	color: #0f5132;
	border: 1px solid #badbcc;
}

.bd-cf-error {
	background: #f8d7da;
	color: #842029;
	border: 1px solid #f5c2c7;
}

/* ==========================================================================
   Dark mode (.custom-dark, BD Dark Mode)
   I colori base dei campi arrivano dalle variabili CSS generate in PHP
   (palette dark di default + eventuali personalizzazioni del form).
   Qui si sistemano gli elementi con colori fissi e i dettagli del browser.
   ========================================================================== */

.custom-dark .bd-cf-form {
	color-scheme: dark; /* date picker, spinner, scrollbar delle textarea in versione scura */
}

.custom-dark .bd-cf-form .bd-cf-field input::placeholder,
.custom-dark .bd-cf-form .bd-cf-field textarea::placeholder {
	color: var( --bd-cf-text-color, #e6e6e6 );
	opacity: 0.55;
}

/* Autocompilazione Chrome/Edge/Safari: evita lo sfondo chiaro forzato dal browser. */
.custom-dark .bd-cf-form .bd-cf-field input:-webkit-autofill,
.custom-dark .bd-cf-form .bd-cf-field input:-webkit-autofill:hover,
.custom-dark .bd-cf-form .bd-cf-field input:-webkit-autofill:focus,
.custom-dark .bd-cf-form .bd-cf-field textarea:-webkit-autofill {
	-webkit-text-fill-color: var( --bd-cf-text-color, #e6e6e6 ) !important;
	-webkit-box-shadow: 0 0 0 1000px var( --bd-cf-bg-color, #1f2124 ) inset !important;
	box-shadow: 0 0 0 1000px var( --bd-cf-bg-color, #1f2124 ) inset !important;
	caret-color: var( --bd-cf-text-color, #e6e6e6 );
	transition: background-color 9999s ease-out 0s;
}

.custom-dark .bd-cf-form .bd-cf-field select {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23bbb'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.custom-dark .bd-cf-form .bd-cf-field select option {
	background-color: var( --bd-cf-bg-color, #1f2124 );
	color: var( --bd-cf-text-color, #e6e6e6 );
}

.custom-dark .bd-cf-form .bd-cf-field input:focus,
.custom-dark .bd-cf-form .bd-cf-field textarea:focus,
.custom-dark .bd-cf-field select:focus {
	border-color: #8a8f98 !important;
}

.custom-dark .bd-cf-radio-option,
.custom-dark .bd-cf-checkbox-option {
	color: var( --bd-cf-text-color, inherit );
}

.custom-dark .bd-cf-hint {
	color: #a7aaad;
}

.custom-dark .bd-cf-required {
	color: #ff6b6d;
}

.custom-dark .bd-cf-login-required {
	background: #1f2124;
	border-color: #3c3f44;
	color: #e6e6e6;
}

.custom-dark .bd-cf-success {
	background: #0f2e22;
	color: #a3dfc0;
	border-color: #1d5c42;
}

.custom-dark .bd-cf-error {
	background: #3a1417;
	color: #f5b5bb;
	border-color: #6e2a30;
}

/* ==========================================================================
   Pulsanti Accedi / Registrati (messaggio personalizzato del blocco)
   ========================================================================== */

.bd-cf-login-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 14px 0 0;
}

.bd-cf-login-required a.bd-cf-login-btn {
	display: inline-block;
	padding: 9px 22px;
	border-radius: 4px;
	border: 1px solid currentColor;
	text-decoration: none;
	font-weight: 600;
}

.bd-cf-login-required a.bd-cf-login-btn-primary {
	background: #1d2327;
	border-color: #1d2327;
	color: #fff;
}

.custom-dark .bd-cf-login-required a.bd-cf-login-btn-primary {
	background: #e6e6e6;
	border-color: #e6e6e6;
	color: #1f2124;
}

/* ==========================================================================
   Popup di esito invio
   ========================================================================== */

html.bd-cf-modal-open {
	overflow: hidden;
}

.bd-cf-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.bd-cf-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	animation: bd-cf-fade-in 0.2s ease;
}

.bd-cf-modal-box {
	position: relative;
	width: 100%;
	max-width: 420px;
	padding: 30px 26px 24px;
	border-radius: 10px;
	background: #fff;
	color: #1d2327;
	text-align: center;
	box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.25 );
	animation: bd-cf-pop-in 0.22s ease;
}

.bd-cf-modal.is-closing .bd-cf-modal-backdrop,
.bd-cf-modal.is-closing .bd-cf-modal-box {
	opacity: 0;
	transition: opacity 0.18s ease;
}

@keyframes bd-cf-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes bd-cf-pop-in {
	from { opacity: 0; transform: translateY( 12px ) scale( 0.98 ); }
	to { opacity: 1; transform: none; }
}

.bd-cf-modal-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
	border-radius: 50%;
}

.bd-cf-modal-success .bd-cf-modal-icon {
	background: #d1e7dd;
	color: #0f5132;
}

.bd-cf-modal-error .bd-cf-modal-icon {
	background: #f8d7da;
	color: #842029;
}

.bd-cf-modal .bd-cf-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: inherit;
}

.bd-cf-modal .bd-cf-modal-text {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.5;
	color: inherit;
}

.bd-cf-modal button.bd-cf-modal-close {
	min-width: 120px;
	padding: 10px 26px;
	border: none;
	border-radius: 4px;
	background: #1d2327;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.bd-cf-modal button.bd-cf-modal-close:hover {
	opacity: 0.85;
}

.bd-cf-modal button.bd-cf-modal-close:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.custom-dark .bd-cf-modal-box {
	background: #1f2124;
	color: #e6e6e6;
	box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.6 );
	border: 1px solid #3c3f44;
}

.custom-dark .bd-cf-modal-backdrop {
	background: rgba( 0, 0, 0, 0.7 );
}

.custom-dark .bd-cf-modal-success .bd-cf-modal-icon {
	background: #0f2e22;
	color: #a3dfc0;
}

.custom-dark .bd-cf-modal-error .bd-cf-modal-icon {
	background: #3a1417;
	color: #f5b5bb;
}

.custom-dark .bd-cf-modal button.bd-cf-modal-close {
	background: #e6e6e6;
	color: #1f2124;
}

@media ( prefers-reduced-motion: reduce ) {
	.bd-cf-modal-backdrop,
	.bd-cf-modal-box {
		animation: none;
		transition: none;
	}
}

/* ==========================================================================
   Widget anti-bot (spazio riservato per evitare salti di layout)
   ========================================================================== */

.bd-cf-recaptcha-widget {
	min-height: 78px;
}

.bd-cf-turnstile {
	max-width: 400px;
}

.bd-cf-turnstile-widget {
	min-height: 65px;
}

/* ==========================================================================
   Invio AJAX: stato "in corso"
   ========================================================================== */

.bd-cf-form.is-sending button.bd-cf-submit[type="submit"] {
	opacity: 0.7 !important;
	cursor: progress;
}

.bd-cf-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	vertical-align: -2px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: bd-cf-spin 0.7s linear infinite;
}

@keyframes bd-cf-spin {
	to { transform: rotate( 360deg ); }
}

/* bd-push */
/* BD Push - invito e campanella. Colori dalla palette del sito (tema BACKdigit o Blocksy), adattati in .custom-dark. */
.bd-push-ui {
	--bdp-bg: var(--bdp-c-bg, var(--theme-palette-color-8, #ffffff));
	--bdp-text: var(--bdp-c-text, var(--theme-palette-color-3, #1f2933));
	--bdp-btn-bg: var(--bdp-c-btn-bg, var(--theme-palette-color-1, #2563eb));
	--bdp-btn-text: var(--bdp-c-btn-text, var(--bdt-on-color-1, #ffffff));
	--bdp-bell-bg: var(--bdp-c-bell-bg, var(--theme-palette-color-1, #2563eb));
	--bdp-bell-icon: var(--bdp-c-bell-icon, var(--bdt-on-color-1, #ffffff));
	--bdp-border: var(--bdp-c-border, rgba(0, 0, 0, 0.1));
	--bdp-alert: var(--bdp-c-alert, #e5484d);
	--bdp-dot-off: var(--bdp-c-dot-off, #e5484d);
	--bdp-dot-on: var(--bdp-c-dot-on, #30a46c);
	--bdp-dot-blocked: var(--bdp-c-dot-blocked, #8b8d98);
	--bdp-btn2-bg: var(--bdp-c-btn2-bg, transparent);
	--bdp-btn2-text: var(--bdp-c-btn2-text, var(--bdp-text));
	--bdp-btn2-border: var(--bdp-c-btn2-border, var(--bdp-border));
	--bdp-tease-bg: var(--bdp-c-tease-bg, var(--bdp-btn-bg));
	--bdp-tease-text: var(--bdp-c-tease-text, var(--bdp-btn-text));
	--bdp-confetti: var(--bdp-c-tease-confetti, );
	--bdp-shadow: var(--bdp-shadow-l, 0 12px 32px rgba(15, 23, 42, 0.18));
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.45;
}
/* 1.4.1: anche dentro un header o un footer "Sempre scuro" del tema BACKdigit (.bdt-hd / .bdt-fd). */
.custom-dark .bd-push-ui,
:is(.bdt-hd, .bdt-fd) .bd-push-ui {
	--bdp-bg: var(--bdp-cd-bg, var(--theme-palette-color-8, #1c2128));
	--bdp-text: var(--bdp-cd-text, var(--theme-palette-color-3, #e6e8eb));
	--bdp-btn-bg: var(--bdp-cd-btn-bg, var(--theme-palette-color-1, #3b82f6));
	/* In scuro l'accento è chiaro: testo e icona nel colore di sfondo della pagina (slot 5). */
	--bdp-btn-text: var(--bdp-cd-btn-text, var(--bdt-on-color-1, var(--theme-palette-color-5, #0e141b)));
	--bdp-bell-bg: var(--bdp-cd-bell-bg, var(--theme-palette-color-1, #3b82f6));
	--bdp-bell-icon: var(--bdp-cd-bell-icon, var(--bdt-on-color-1, var(--theme-palette-color-5, #0e141b)));
	--bdp-border: var(--bdp-cd-border, rgba(255, 255, 255, 0.12));
	--bdp-alert: var(--bdp-cd-alert, #e5484d);
	--bdp-dot-off: var(--bdp-cd-dot-off, #e5484d);
	--bdp-dot-on: var(--bdp-cd-dot-on, #30a46c);
	--bdp-dot-blocked: var(--bdp-cd-dot-blocked, #8b8d98);
	--bdp-btn2-bg: var(--bdp-cd-btn2-bg, transparent);
	--bdp-btn2-text: var(--bdp-cd-btn2-text, var(--bdp-text));
	--bdp-btn2-border: var(--bdp-cd-btn2-border, var(--bdp-border));
	--bdp-tease-bg: var(--bdp-cd-tease-bg, var(--bdp-btn-bg));
	--bdp-tease-text: var(--bdp-cd-tease-text, var(--bdp-btn-text));
	--bdp-confetti: var(--bdp-cd-tease-confetti, );
	--bdp-shadow: var(--bdp-shadow-d, 0 12px 32px rgba(0, 0, 0, 0.5));
}
/* 1.4.1: dentro un header o un footer "Sempre chiaro" del tema BACKdigit restano i colori chiari. */
.custom-dark :is(.bdt-hl, .bdt-fl) .bd-push-ui {
	--bdp-bg: var(--bdp-c-bg, var(--theme-palette-color-8, #ffffff));
	--bdp-text: var(--bdp-c-text, var(--theme-palette-color-3, #1f2933));
	--bdp-btn-bg: var(--bdp-c-btn-bg, var(--theme-palette-color-1, #2563eb));
	--bdp-btn-text: var(--bdp-c-btn-text, var(--bdt-on-color-1, #ffffff));
	--bdp-bell-bg: var(--bdp-c-bell-bg, var(--theme-palette-color-1, #2563eb));
	--bdp-bell-icon: var(--bdp-c-bell-icon, var(--bdt-on-color-1, #ffffff));
	--bdp-border: var(--bdp-c-border, rgba(0, 0, 0, 0.1));
	--bdp-alert: var(--bdp-c-alert, #e5484d);
	--bdp-dot-off: var(--bdp-c-dot-off, #e5484d);
	--bdp-dot-on: var(--bdp-c-dot-on, #30a46c);
	--bdp-dot-blocked: var(--bdp-c-dot-blocked, #8b8d98);
	--bdp-btn2-bg: var(--bdp-c-btn2-bg, transparent);
	--bdp-btn2-text: var(--bdp-c-btn2-text, var(--bdp-text));
	--bdp-btn2-border: var(--bdp-c-btn2-border, var(--bdp-border));
	--bdp-tease-bg: var(--bdp-c-tease-bg, var(--bdp-btn-bg));
	--bdp-tease-text: var(--bdp-c-tease-text, var(--bdp-btn-text));
	--bdp-confetti: var(--bdp-c-tease-confetti, );
	--bdp-shadow: var(--bdp-shadow-l, 0 12px 32px rgba(15, 23, 42, 0.18));
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.45;
}
.bd-push-ui *,
.bd-push-ui *::before,
.bd-push-ui *::after {
	box-sizing: border-box;
}

/* ---------- box ---------- */
.bd-push-box {
	position: fixed;
	z-index: 99990;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	background: var(--bdp-bg);
	color: var(--bdp-text);
	border: 1px solid var(--bdp-border);
	box-shadow: var(--bdp-shadow);
}
.bd-push-pos-top {
	top: var(--bdp-avoid-t, 0px);
	left: 0;
	right: 0;
	max-width: 640px;
	margin: 0 auto;
	border-top: 0;
	border-radius: 0 0 var(--bdp-radius, 14px) var(--bdp-radius, 14px);
}
body.admin-bar .bd-push-pos-top {
	top: calc(32px + var(--bdp-avoid-t, 0px));
}
.bd-push-pos-bottom {
	bottom: var(--bdp-avoid-b, 0px);
	left: 0;
	right: 0;
	max-width: 640px;
	margin: 0 auto;
	border-bottom: 0;
	border-radius: var(--bdp-radius, 14px) var(--bdp-radius, 14px) 0 0;
}
.bd-push-pos-corner-right,
.bd-push-pos-corner-left {
	bottom: calc(var(--bdp-offset, 20px) + var(--bdp-avoid-b, 0px));
	width: 360px;
	max-width: calc(100vw - 24px);
	border-radius: var(--bdp-radius, 14px);
}
.bd-push-pos-corner-right {
	right: var(--bdp-side, 20px);
}
.bd-push-pos-corner-left {
	left: var(--bdp-side, 20px);
}
.bd-push-box.above-bell {
	bottom: calc(var(--bdp-offset, 20px) + var(--bdp-bell-size, 52px) + 14px + var(--bdp-avoid-b, 0px));
}
.bd-push-box-icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bdp-btn-bg);
	color: var(--bdp-btn-text);
}
/* Con un logo il riquadro resta trasparente: il logo si vede come è stato caricato. */
.bd-push-box-icon.has-img {
	background: transparent;
	border-radius: 0;
}
.bd-push-box-icon img {
	width: 44px;
	height: 44px;
	object-fit: contain;
	display: block;
}
.bd-push-box-body {
	flex: 1 1 auto;
	min-width: 0;
}
.bd-push-box-title {
	font-weight: var(--bdp-weight, 700);
	font-size: 16px;
	margin: 0 0 4px;
	color: var(--bdp-text);
}
.bd-push-box-text {
	font-size: 14px;
	margin: 0 0 12px;
	color: var(--bdp-text);
	opacity: 0.88;
}
.bd-push-box-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.bd-push-btn {
	appearance: none;
	border: 1px solid var(--bdp-btn-bg);
	background: var(--bdp-btn-bg);
	color: var(--bdp-btn-text);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 9px 16px;
	border-radius: calc(var(--bdp-radius, 14px) * 0.65);
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
}
.bd-push-btn:hover {
	filter: brightness(1.08);
}
.bd-push-btn:focus-visible,
.bd-push-bell:focus-visible,
.bd-push-pop-close:focus-visible {
	outline: 2px solid var(--bdp-btn-bg);
	outline-offset: 2px;
}
.bd-push-btn:disabled {
	opacity: 0.6;
	cursor: default;
}
.bd-push-btn-ghost {
	background: var(--bdp-btn2-bg);
	color: var(--bdp-btn2-text);
	border-color: var(--bdp-btn2-border);
}

/* ---------- campanella ---------- */
.bd-push-bell {
	--bdp-bell-size: 52px;
	position: fixed;
	z-index: 99989;
	bottom: calc(var(--bdp-offset, 20px) + var(--bdp-avoid-b, 0px));
	width: var(--bdp-bell-size);
	height: var(--bdp-bell-size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bdp-bell-bg);
	color: var(--bdp-bell-icon);
	box-shadow: var(--bdp-shadow);
	cursor: pointer;
	transition: transform 0.15s ease;
}
.bd-push-bell:hover {
	transform: scale(1.06);
}
.bd-push-bell-right {
	right: var(--bdp-side, 20px);
}
.bd-push-bell-left {
	left: var(--bdp-side, 20px);
}
.bd-push-bell svg {
	display: block;
	width: calc(var(--bdp-bell-size) * 0.46);
	height: calc(var(--bdp-bell-size) * 0.46);
}
.bd-push-bell.bd-push-bell-small {
	--bdp-bell-size: 42px;
}
.bd-push-bell.bd-push-bell-large {
	--bdp-bell-size: 60px;
}
.bd-push-bell.bd-push-bell-outline {
	background: var(--bdp-bg);
	color: var(--bdp-bell-bg);
	border: 2px solid var(--bdp-bell-bg);
}
.bd-push-bell.bd-push-bell-neutral {
	background: var(--bdp-bg);
	color: var(--bdp-text);
	border: 1px solid var(--bdp-border);
}
.bd-push-bell.is-hidden {
	display: none;
}
.bd-push-bell.no-dot .bd-push-dot {
	display: none;
}
.bd-push-dot {
	position: absolute;
	top: calc(var(--bdp-bell-size) * 0.17);
	right: calc(var(--bdp-bell-size) * 0.19);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--bdp-dot-off);
	border: 2px solid var(--bdp-bell-bg);
}
.bd-push-bell-outline .bd-push-dot,
.bd-push-bell-neutral .bd-push-dot {
	border-color: var(--bdp-bg);
}
.bd-push-bell.is-on .bd-push-dot {
	background: var(--bdp-dot-on);
}
.bd-push-bell.is-denied {
	opacity: 0.75;
}
.bd-push-bell.is-denied .bd-push-dot {
	background: var(--bdp-dot-blocked);
}

/* ---------- pannello della campanella ---------- */
.bd-push-pop {
	position: fixed;
	z-index: 99991;
	bottom: calc(var(--bdp-offset, 20px) + var(--bdp-pop-gap, 64px) + var(--bdp-avoid-b, 0px));
	width: 300px;
	max-width: calc(100vw - 24px);
	padding: 16px 18px;
	background: var(--bdp-bg);
	color: var(--bdp-text);
	border: 1px solid var(--bdp-border);
	border-radius: var(--bdp-radius, 14px);
	box-shadow: var(--bdp-shadow);
	display: none;
}
.bd-push-pop.is-open {
	display: block;
}
.bd-push-pop-right {
	right: var(--bdp-side, 20px);
}
.bd-push-pop-left {
	left: var(--bdp-side, 20px);
}
.bd-push-pop {
	width: 320px;
}
/* Messaggio di notifiche bloccate: bordo di richiamo. */
.bd-push-box.is-alert,
.bd-push-pop.is-alert {
	border-left: 4px solid var(--bdp-alert);
}
.bd-push-pop .bd-push-box-title {
	padding-right: 24px;
}
.bd-push-pop-close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--bdp-text);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
}

/* ---------- mobile ---------- */
@media (max-width: 600px) {
	.bd-push-pos-corner-right,
	.bd-push-pos-corner-left {
		left: var(--bdp-side-m, 12px);
		right: var(--bdp-side-m, 12px);
		width: auto;
		bottom: calc(var(--bdp-offset-m, 20px) + var(--bdp-avoid-b, 0px));
	}
	.bd-push-box.above-bell {
		bottom: calc(var(--bdp-offset-m, 20px) + var(--bdp-bell-size, 48px) + 14px + var(--bdp-avoid-b, 0px));
	}
	.bd-push-bell {
		bottom: calc(var(--bdp-offset-m, 20px) + var(--bdp-avoid-b, 0px));
	}
	.bd-push-bell-right,
	.bd-push-pop-right {
		right: var(--bdp-side-m, 12px);
	}
	.bd-push-bell-left,
	.bd-push-pop-left {
		left: var(--bdp-side-m, 12px);
	}
	.bd-push-pop {
		bottom: calc(var(--bdp-offset-m, 20px) + var(--bdp-pop-gap, 60px) + var(--bdp-avoid-b, 0px));
	}
	.bd-push-box {
		padding: 14px;
	}
}
@media (max-width: 782px) {
	body.admin-bar .bd-push-pos-top {
		top: calc(46px + var(--bdp-avoid-t, 0px));
	}
}
@media (prefers-reduced-motion: reduce) {
	.bd-push-box,
	.bd-push-bell {
		transition: none;
	}
}
@media print {
	.bd-push-ui {
		display: none !important;
	}
}

/* ---------- anteprima in dashboard ---------- */
.bd-push-preview .bd-push-box,
.bd-push-preview .bd-push-bell {
	position: relative;
	inset: auto;
	opacity: 1;
	transform: none;
	margin: 0;
}
.bd-push-preview .bd-push-box {
	max-width: 420px;
	border: 1px solid var(--bdp-border);
	border-radius: var(--bdp-radius, 14px);
}
.bd-push-preview .bd-push-box.is-alert {
	border-left: 4px solid var(--bdp-alert);
}

/* ---------- animazioni ---------- */
@keyframes bdp-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bdp-in-down { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes bdp-in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bdp-in-zoom { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes bdp-in-bounce-up {
	0% { opacity: 0; transform: translateY(40px); }
	60% { opacity: 1; transform: translateY(-8px); }
	80% { transform: translateY(3px); }
	100% { opacity: 1; transform: none; }
}
@keyframes bdp-in-bounce-down {
	0% { opacity: 0; transform: translateY(-40px); }
	60% { opacity: 1; transform: translateY(8px); }
	80% { transform: translateY(-3px); }
	100% { opacity: 1; transform: none; }
}
@keyframes bdp-out-down { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(24px); } }
@keyframes bdp-out-up { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-24px); } }
@keyframes bdp-out-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes bdp-out-zoom { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(0.86); } }
@keyframes bdp-bell-pop {
	0% { opacity: 0; transform: scale(0.3); }
	70% { opacity: 1; transform: scale(1.1); }
	100% { opacity: 1; transform: scale(1); }
}
@keyframes bdp-ring {
	0%, 100% { transform: rotate(0); }
	12% { transform: rotate(16deg); }
	26% { transform: rotate(-14deg); }
	40% { transform: rotate(10deg); }
	54% { transform: rotate(-7deg); }
	68% { transform: rotate(4deg); }
	82% { transform: rotate(-2deg); }
}
.bd-push-bell.is-ringing svg {
	transform-origin: 50% 12%;
	animation: bdp-ring 1s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
	.bd-push-ui,
	.bd-push-ui svg {
		animation: none !important;
	}
}

/* Anteprima in dashboard: pannello e tre stati della campanella */
.bd-push-preview .bd-push-pop {
	position: relative;
	inset: auto;
	display: block;
	width: 100%;
	max-width: 320px;
}
.bd-push-preview-bells {
	display: flex;
	gap: 18px;
	align-self: stretch;
	justify-content: center;
	margin: 0;
}
.bd-push-preview-bells figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}
.bd-push-preview-bells figcaption {
	font-size: 12px;
	opacity: 0.75;
}
.bd-push-preview .bd-push-custom-dark-text,
.custom-dark .bd-push-preview-bells figcaption {
	color: #e6e8eb;
}

/* ---------- fumetto della campanella ---------- */
.bd-push-tease {
	position: fixed;
	z-index: 99992;
	max-width: 240px;
	padding: 9px 14px;
	background: var(--bdp-tease-bg);
	color: var(--bdp-tease-text);
	border-radius: var(--bdp-radius, 14px);
	box-shadow: var(--bdp-shadow);
	font-size: 14px;
	font-weight: calc(var(--bdp-weight, 700) - 100);
	line-height: 1.3;
	cursor: pointer;
	user-select: none;
}
.bd-push-tease.has-close {
	padding-right: 32px;
}
.bd-push-tease::after {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	background: inherit;
	transform: rotate(45deg);
	border-radius: 2px;
}
.bd-push-tease.is-left::after {
	right: -5px;
	top: 50%;
	margin-top: -6px;
}
.bd-push-tease.is-right::after {
	left: -5px;
	top: 50%;
	margin-top: -6px;
}
.bd-push-tease.is-above::after {
	bottom: -5px;
}
.bd-push-tease.is-above.arrow-right::after {
	right: var(--bdp-arrow-x, 20px);
}
.bd-push-tease.is-above.arrow-left::after {
	left: var(--bdp-arrow-x, 20px);
}
.bd-push-tease-text {
	position: relative;
	z-index: 1;
	white-space: nowrap;
}
.bd-push-tease-close {
	position: absolute;
	z-index: 2;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 17px;
	line-height: 22px;
	cursor: pointer;
	opacity: 0.75;
}
.bd-push-tease-close:hover {
	opacity: 1;
}
.bd-push-confetti {
	position: fixed;
	z-index: 99993;
	pointer-events: none;
	animation: bdp-confetti 800ms cubic-bezier(0.15, 0.7, 0.35, 1) forwards;
}
@keyframes bdp-tease-pop {
	0% { opacity: 0; transform: scale(0.2); }
	60% { opacity: 1; transform: scale(1.08); }
	80% { transform: scale(0.97); }
	100% { opacity: 1; transform: scale(1); }
}
@keyframes bdp-tease-slide-l { from { opacity: 0; transform: translateX(18px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes bdp-tease-slide-r { from { opacity: 0; transform: translateX(-18px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes bdp-tease-swing {
	0% { opacity: 0; transform: rotate(-14deg) scale(0.6); }
	30% { opacity: 1; transform: rotate(10deg) scale(1); }
	50% { transform: rotate(-7deg); }
	70% { transform: rotate(4deg); }
	85% { transform: rotate(-2deg); }
	100% { opacity: 1; transform: none; }
}
@keyframes bdp-tease-burst {
	0% { opacity: 1; transform: scale(1); }
	45% { opacity: 1; transform: scale(1.18); }
	100% { opacity: 0; transform: scale(0.15); }
}
@keyframes bdp-tease-puff {
	from { opacity: 1; transform: none; filter: blur(0); }
	to { opacity: 0; transform: scale(1.35); filter: blur(6px); }
}
@keyframes bdp-tease-back {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: scale(0); }
}
@keyframes bdp-confetti {
	0% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
	70% { opacity: 1; }
	100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); }
}

/* Spostamento morbido quando compare o sparisce un annuncio ancorato. */
.bd-push-box,
.bd-push-pop,
.bd-push-tease {
	transition: bottom 0.3s ease, top 0.3s ease;
}
.bd-push-bell {
	transition: transform 0.15s ease, bottom 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
	.bd-push-box,
	.bd-push-pop,
	.bd-push-tease,
	.bd-push-bell {
		transition: none;
	}
}

/* Effetto vetro (temi) */
.bdp-glass .bd-push-box,
.bdp-glass .bd-push-pop {
	background: color-mix(in srgb, var(--bdp-bg) 72%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(1.5);
	backdrop-filter: blur(14px) saturate(1.5);
}
.bdp-glass .bd-push-tease {
	background: color-mix(in srgb, var(--bdp-tease-bg) 82%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.bdp-glass .bd-push-bell-filled {
	background: color-mix(in srgb, var(--bdp-bell-bg) 78%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

/* ---------- 1.1.2: passaggio del mouse ----------
   I temi danno a tutti i <button> un :hover con sfondo e testo propri (nel tema BACKdigit "button:hover":
   colore 2 della palette e testo bianco), che vinceva su quello del plugin: con certe palette il testo
   diventava dello stesso colore dello sfondo. Qui ogni pulsante tiene i suoi colori anche al passaggio. */
.bd-push-ui .bd-push-btn:hover,
.bd-push-ui .bd-push-btn:focus,
.bd-push-ui .bd-push-btn:active {
	background: var(--bdp-btn-bg);
	color: var(--bdp-btn-text);
	border-color: var(--bdp-btn-bg);
}
.bd-push-ui .bd-push-btn.bd-push-btn-ghost:hover,
.bd-push-ui .bd-push-btn.bd-push-btn-ghost:focus,
.bd-push-ui .bd-push-btn.bd-push-btn-ghost:active {
	background: var(--bdp-btn2-bg);
	color: var(--bdp-btn2-text);
	border-color: var(--bdp-btn2-border);
	filter: none;
	opacity: 0.85;
}
.bd-push-ui.bd-push-bell:hover,
.bd-push-ui.bd-push-bell:focus,
.bd-push-ui.bd-push-bell:active {
	background: var(--bdp-bell-bg);
	color: var(--bdp-bell-icon);
}
.bd-push-ui .bd-push-pop-close:hover,
.bd-push-ui .bd-push-pop-close:focus {
	background: transparent;
	color: var(--bdp-text);
}
.bd-push-ui .bd-push-tease-close:hover,
.bd-push-ui .bd-push-tease-close:focus {
	background: transparent;
	color: inherit;
}

/* ---------- 1.2.0: ingressi "Installa l'app" ---------- */
/* Nascosti finché il browser non può installare (classe messa dallo script) e dentro l'app. */
html:not(.bdp-can-install) .bdp-install-wrap,
html.bdp-in-app .bdp-install-wrap {
	display: none !important;
}
.bdp-install-ico {
	display: inline-block;
	vertical-align: -3px;
	margin-right: 6px;
	flex: 0 0 auto;
}
.bdp-install-btn,
.bdp-install-theme,
.bdp-install-box .bd-push-btn {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}
.bdp-install-link {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
}
.bdp-install-box {
	display: block;
	max-width: 460px;
	padding: 16px 18px;
	background: var(--bdp-bg);
	color: var(--bdp-text);
	border: 1px solid var(--bdp-border);
	border-radius: var(--bdp-radius, 14px);
	box-shadow: var(--bdp-shadow);
}
.bd-push-pop .bdp-pop-install {
	margin-top: 8px;
	margin-left: 6px;
}

/* Verifica installazione (solo amministratore) */
.bd-push-box.bdp-appcheck {
	top: calc(20px + var(--bdp-avoid-t, 0px));
	right: 20px;
	bottom: auto;
	left: auto;
	width: 440px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 40px);
	overflow: auto;
	border-radius: var(--bdp-radius, 14px);
	z-index: 2147483000;
}
body.admin-bar .bd-push-box.bdp-appcheck {
	top: 52px;
}
.bdp-appcheck-list {
	list-style: none;
	margin: 8px 0;
	padding: 0;
	font-size: 13px;
}
.bdp-appcheck-list li {
	margin: 0 0 8px;
	padding-left: 18px;
	position: relative;
}
.bdp-appcheck-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 5px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #8b8d98;
}
.bdp-appcheck-list li.is-ok::before { background: #30a46c; }
.bdp-appcheck-list li.is-warn::before { background: #dba617; }
.bdp-appcheck-list li.is-error::before { background: #e5484d; }
.bdp-appcheck-list strong,
.bdp-appcheck-list span {
	display: block;
}
.bdp-appcheck-list span {
	opacity: 0.8;
}

/* 1.3.0: box "Installa l'app" del blocco */
.bdp-install-box .bd-push-box-title,
.bdp-install-box .bd-push-box-text {
	display: block;
}
.bdp-install-box .bd-push-box-text {
	margin: 0 0 12px;
}

