/* BB Ads Manager - frontend */

.gptslot.bb-ad-disabled,
.gptslot.bb-ad-empty {
	display: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.gptslot.bb-ad-filled {
	text-align: center;
	margin: 20px auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.bb-ad-label {
	display: block;
	font-size: 10px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9a9a9a;
	margin-bottom: 4px;
}

.bb-ad-inner {
	display: inline-block;
	max-width: 100%;
}

.bb-ad-inner img {
	max-width: 100%;
	height: auto;
	display: block;
}

.bb-ad-inner a.bb-ad-link {
	display: inline-block;
}

/* Friendly iframe per i tag terzi/DCM: nessun bordo, centrata. */
.bb-ad-frame {
	display: block;
	border: 0;
	margin: 0 auto;
	max-width: 100% !important;
}

/* Dimensioni per formato. Servono a VINCERE sulle regole iframe del tema
 * (molti temi/Elementor hanno "iframe{width:100%}" che schiaccia l'attributo
 * width dell'iframe e lo fa collassare a ~300px). Specificita di classe +
 * !important: l'iframe usa la dimensione reale della creativita. */
.bb-ad-frame.bb-size-970x250 { width: 970px !important; height: 250px !important; }
.bb-ad-frame.bb-size-970x90  { width: 970px !important; height: 90px !important; }
.bb-ad-frame.bb-size-728x90  { width: 728px !important; height: 90px !important; }
.bb-ad-frame.bb-size-468x60  { width: 468px !important; height: 60px !important; }
.bb-ad-frame.bb-size-300x250 { width: 300px !important; height: 250px !important; }
.bb-ad-frame.bb-size-336x280 { width: 336px !important; height: 280px !important; }
.bb-ad-frame.bb-size-300x600 { width: 300px !important; height: 600px !important; }
.bb-ad-frame.bb-size-160x600 { width: 160px !important; height: 600px !important; }
.bb-ad-frame.bb-size-320x100 { width: 320px !important; height: 100px !important; }
.bb-ad-frame.bb-size-320x50  { width: 320px !important; height: 50px !important; }
.bb-ad-frame.bb-size-250x250 { width: 250px !important; height: 250px !important; }

/* slot inseriti automaticamente nell'articolo:
 * riserviamo l'altezza prima del fill per ridurre il Cumulative Layout Shift.
 * Gli slot vuoti collassano (regola .bb-ad-empty sopra). Gli slot fissi del tema
 * (masthead/infeed/sidebar) mantengono i min-height definiti dal tema FYTUR. */
.gptslot.bb-incontent {
	min-height: 280px;
	margin: 25px auto;
}

.gptslot.bb-incontent.bb-ad-filled {
	margin: 25px auto;
}

/* -------------------------------------------------------------------------
 *  Modalita anteprima (?bbads_preview=...): bordo tratteggiato + badge sullo
 *  slot e barra fissa in alto. Niente di tutto cio appare in erogazione reale.
 * ---------------------------------------------------------------------- */
.gptslot.bb-ad-preview {
	position: relative;
	outline: 2px dashed #e0612e;
	outline-offset: 2px;
}

.bb-ad-preview-badge {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 5;
	display: inline-block;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.3px;
	color: #fff;
	background: #e0612e;
	border-bottom-right-radius: 4px;
	pointer-events: none;
}

#bb-ads-preview-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	padding: 8px 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-align: center;
	color: #fff;
	background: #1d1d1f;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

body.bb-ads-preview-active {
	padding-top: 38px;
}
