/**
 * Burger Connect — stili minimi.
 *
 * Volutamente scarni e neutri: il plugin gira su temi che non conosciamo, e
 * l'interfaccia vera sta dentro l'iframe. Qui solo il contenitore, il bottone
 * e la lightbox. Tutto sotto .bc- per non collidere col tema del cliente
 * (nessuna classe generica tipo .button o .modal).
 */

.bc-embed { margin: 0 0 1em; }

/* ⚠️ Gli !important qui NON sono pigrizia: questo plugin gira su temi che non
   conosciamo, e molti (Hello Elementor in testa) hanno reset che colorano
   qualunque <button> — arrivando a renderlo illeggibile. Senza forzatura il
   pulsante di prenotazione di un cliente può diventare rosso o trasparente
   sul suo sito, e ce ne accorgeremmo per ultimi. Le proprietà forzate sono
   solo quelle di colore/bordo; dimensioni e tipografia restano scavalcabili. */
.bc-btn.bc-btn {
	display: inline-block;
	padding: 12px 22px;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--bc-accent, #7c3aed) !important;
	background-image: none !important;
	color: #fff !important;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none !important;
	cursor: pointer;
	transition: filter .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.bc-btn.bc-btn:hover,
.bc-btn.bc-btn:focus,
.bc-btn.bc-btn:active {
	filter: brightness(1.08);
	background: var(--bc-accent, #7c3aed) !important;
	color: #fff !important;
	border: 0 !important;
}
.bc-btn.bc-btn:focus-visible { outline: 3px solid rgba(124, 58, 237, .35); outline-offset: 2px; }

.bc-embed--card .bc-embed__frame {
	display: block;
	width: 100%;
	border: 0;
	background: transparent;
}

.bc-notice {
	padding: 10px 14px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
	color: #475569;
	font-size: 14px;
}

/* Lightbox */
.bc-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity .2s ease;
}
.bc-lb.is-visible { opacity: 1; }
.bc-lb[hidden] { display: none; }
.bc-lb__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }

/* ⚠️ overflow:hidden e NON auto: il pannello non deve avere una barra propria.
   L'unico scorrimento consentito è quello DENTRO l'iframe, così non si vedono
   mai due barre sovrapposte. L'altezza la detta il contenuto, comunicata via
   postMessage e applicata dal JS entro il tetto qui sotto. */
.bc-lb__panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	height: 620px;              /* valore iniziale, poi lo corregge il contenuto */
	max-height: calc(100vh - 32px);
	overflow: hidden;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, .28);
	transform: translateY(8px);
	transition: transform .2s ease, height .18s ease;
}
.bc-lb.is-visible .bc-lb__panel { transform: none; }
.bc-lb__frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
/* 0.3.3 — Caricamento: il popup si apre subito, il modulo arriva un istante dopo. */
.bc-lb__panel.bc-lb--carica::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid #e2e8f0;
	border-top-color: var(--bc-accent, #0f4c81);
	border-radius: 50%;
	animation: bc-gira .8s linear infinite;
	pointer-events: none;
}
@keyframes bc-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bc-lb__panel.bc-lb--carica::after { animation-duration: 2s; } }
.bc-lb__x {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
	border: 0 !important;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92) !important;
	color: #334155 !important;
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
}
.bc-lb__x:hover { background: #fff !important; color: #0f172a !important; }
/* 0.3.2 — La × deve restare ancorata anche da PREMUTA. Molti temi hanno
   button:active { position: relative; top: 1px !important } (laundrysys.it,
   15/10/2026): la × saltava nel flusso del pannello alla pressione, il rilascio
   cadeva sul pannello e il clic non chiudeva. Doppia classe + !important
   battono button:active (0,2,0 contro 0,1,1). */
.bc-lb .bc-lb__x,
.bc-lb .bc-lb__x:hover,
.bc-lb .bc-lb__x:focus,
.bc-lb .bc-lb__x:active {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	left: auto !important;
	bottom: auto !important;
	transform: none !important;
	margin: 0 !important;
}

/* Blocco dello scorrimento della pagina ospite mentre il popup è aperto.
   ⚠️ Il solo overflow:hidden sul body NON basta: molti temi mettono
   overflow-y sull'elemento <html>, e la pagina continua a scorrere dietro il
   popup — è da lì che nasceva la seconda barra. Si blocca quindi anche <html>,
   e il body va in position:fixed (unico modo affidabile su iOS). La posizione
   di scorrimento viene salvata dal JS e ripristinata alla chiusura. */
html.bc-lb-open,
html.bc-lb-open body { overflow: hidden !important; overscroll-behavior: none; }
html.bc-lb-open body { position: fixed; width: 100%; }

/* Modalità a schermo intero (attributo fullscreen="1" o sotto i 640px):
   il popup occupa tutta la finestra, senza margini né angoli arrotondati. */
.bc-lb--full { padding: 0; }
.bc-lb--full .bc-lb__panel {
	max-width: none;
	width: 100%;
	height: 100% !important;
	max-height: 100%;
	border-radius: 0;
}

/* Su telefono il popup occupa SEMPRE tutto lo schermo: un pannello a metà
   altezza, con il sito che si intravede sotto, su uno schermo piccolo è
   scomodo da usare e fa perdere il filo. La × resta in alto a destra,
   dentro l'area sicura (notch degli iPhone). */
@media (max-width: 640px) {
	.bc-lb { padding: 0; }
	.bc-lb__panel {
		max-width: none;
		width: 100%;
		height: 100% !important;
		max-height: 100%;
		border-radius: 0;
	}
	.bc-lb .bc-lb__x,
	.bc-lb .bc-lb__x:hover,
	.bc-lb .bc-lb__x:focus,
	.bc-lb .bc-lb__x:active {
		top: calc(8px + env(safe-area-inset-top, 0px)) !important;
		right: calc(8px + env(safe-area-inset-right, 0px)) !important;
	}
	.bc-lb__x {
		width: 40px;
		height: 40px;
		font-size: 26px;
	}
}

/* Modulo mostrato direttamente in pagina: nessuna cornice nostra, si adatta
   al contenitore del cliente (colonna Elementor compresa). */
.bc-embed--form { width: 100%; }
.bc-embed--form .bc-embed__frame { min-height: 320px; }

/* Allineamento del contenitore. Senza queste classi il pulsante resta
   incollato a sinistra qualunque cosa faccia il tema, e non c'è modo di
   spostarlo dallo shortcode. */
.bc-embed.bc-align-left   { text-align: left; }
.bc-embed.bc-align-center { text-align: center; }
.bc-embed.bc-align-right  { text-align: right; }
.bc-embed.bc-align-full .bc-btn { display: block; width: 100%; }

/* Scheda: si adatta alla colonna che la ospita (Elementor, colonne del tema). */
.bc-embed--card { width: 100%; }

/* 0.2.0 — Pulsante fisso in un angolo (Impostazioni → Pulsante fisso).
   z-index sotto la lightbox (999999) ma sopra quasi tutto il resto del tema. */
.bc-embed--floating {
	position: fixed;
	bottom: calc(var(--bc-bottom, 20px) + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	margin: 0;
	max-width: calc(100vw - 40px);
}
.bc-floating--right { right: 20px; }
.bc-floating--left  { left: 20px; }
.bc-embed--floating .bc-btn.bc-btn {
	border-radius: 999px !important;
	padding: 14px 22px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .28) !important;
	white-space: normal;
	text-align: left;
}
@media (max-width: 640px) {
	.bc-embed--floating { bottom: calc(var(--bc-bottom-m, 14px) + env(safe-area-inset-bottom, 0px)); }
	.bc-floating--right { right: 14px; }
	.bc-floating--left  { left: 14px; }
	.bc-embed--floating .bc-btn.bc-btn { font-size: 15px; padding: 12px 18px; }
	.bc-floating--no-mobile { display: none !important; }
}
/* Quando il popup è aperto il pulsante non serve (e su telefono coprirebbe il modulo). */
html.bc-lb-open .bc-embed--floating { display: none; }

/* 0.3.0 — Pulsante con il logo dello studio partner (versione con marchio).
   Il logo sta in una targhetta bianca: resta leggibile su qualunque colore. */
.bc-btn.bc-btn.bc-btn--logo { display: inline-flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; text-align: left; }
.bc-btn__logo { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 84px; height: 42px; padding: 4px 8px; border-radius: 8px; background: #fff; }
.bc-embed--floating .bc-btn__logo { border-radius: 999px; }
.bc-btn__logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bc-btn__txt { display: flex; flex-direction: column; line-height: 1.2; }
.bc-btn__badge { font-size: 12px; font-weight: 500; opacity: .9; margin-top: 2px; }
@media (max-width: 640px) {
	.bc-btn__logo { width: 68px; height: 36px; }
	.bc-btn.bc-btn.bc-btn--logo { gap: 10px; padding: 6px 14px 6px 6px; }
}

/* ------------------------------------------------------------------------
   0.4.0 — ASPETTO DEL PULSANTE FISSO DECISO DAL SERVIZIO
   Le classi le mette il PHP (e le rimette il JS quando la dashboard cambia
   qualcosa): bc-size--s|m|l, bc-phone--button|bar|hide, bc-pulse.
   «m» è il pulsante di sempre: nessuna regola, solo le misure sopra.
   ------------------------------------------------------------------------ */
/* Niente spazio sotto il pulsante (linea di base): l'onda deve combaciare. */
.bc-embed--floating .bc-btn.bc-btn { vertical-align: top; }
.bc-embed--floating.bc-size--s .bc-btn.bc-btn { font-size: 14px; padding: 10px 16px; }
.bc-embed--floating.bc-size--l .bc-btn.bc-btn { font-size: 19px; padding: 18px 30px; }

/* Icona davanti al testo: maschera colorata col colore del testo. */
.bc-btn .bc-ico {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	margin: 0 .5em 0 -.15em;
	vertical-align: -.25em;
	background-color: currentColor;
	/* Proprietà separate, non la scorciatoia «mask»: azzererebbe l'immagine
	   dell'icona (stessa specificità) e resterebbe un quadrato pieno. */
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}
.bc-btn .bc-ico--euro { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 6.2A7 7 0 1 0 17.5 17.8'/%3E%3Cpath d='M4 10h9M4 14h9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 6.2A7 7 0 1 0 17.5 17.8'/%3E%3Cpath d='M4 10h9M4 14h9'/%3E%3C/svg%3E"); }
.bc-btn .bc-ico--razzo { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E"); }
.bc-btn .bc-ico--scintilla { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M10 2.5l1.9 5.6 5.6 1.9-5.6 1.9L10 17.5l-1.9-5.6L2.5 10l5.6-1.9z'/%3E%3Cpath d='M18.5 13.5l1 2.8 2.8 1-2.8 1-1 2.8-1-2.8-2.8-1 2.8-1z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M10 2.5l1.9 5.6 5.6 1.9-5.6 1.9L10 17.5l-1.9-5.6L2.5 10l5.6-1.9z'/%3E%3Cpath d='M18.5 13.5l1 2.8 2.8 1-2.8 1-1 2.8-1-2.8-2.8-1 2.8-1z'/%3E%3C/svg%3E"); }
.bc-btn .bc-ico--chat { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H10l-6 4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H10l-6 4z'/%3E%3C/svg%3E"); }
.bc-btn .bc-ico--freccia { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }

/* Animazione: un'onda del colore del pulsante ogni 7 secondi. Sta sul
   contenitore (::before) perché l'ombra del pulsante è forzata con
   !important e un'animazione non potrebbe toccarla. */
.bc-embed--floating.bc-pulse::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 999px;
	background: var(--bc-accent, #7c3aed);
	opacity: 0;
	pointer-events: none;
	animation: bc-onda 7s ease-out 2s infinite;
}
.bc-embed--floating.bc-pulse .bc-btn.bc-btn { animation: bc-respiro 7s ease-in-out 2s infinite; }
@keyframes bc-onda {
	0%, 78% { opacity: 0; transform: scale(1); }
	80%     { opacity: .45; transform: scale(1); }
	100%    { opacity: 0; transform: scale(1.18, 1.6); }
}
@keyframes bc-respiro {
	0%, 76%, 100% { transform: scale(1); }
	82%           { transform: scale(1.06); }
	88%           { transform: scale(.98); }
	94%           { transform: scale(1.02); }
}

/* Fumetto d'invito sopra il pulsante (una volta per visitatore, vedi JS). */
.bc-bubble {
	position: absolute;
	bottom: calc(100% + 12px);
	width: max-content;
	max-width: min(300px, calc(100vw - 40px));
	padding: 12px 34px 12px 14px;
	border-radius: 14px;
	background: #fff;
	color: #1e293b;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .22);
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .3s ease, transform .3s ease;
}
.bc-bubble.is-visible { opacity: 1; transform: none; }
.bc-floating--right .bc-bubble { right: 0; }
.bc-floating--left .bc-bubble  { left: 0; }
.bc-bubble::after {
	content: "";
	position: absolute;
	top: 100%;
	border: 8px solid transparent;
	border-top-color: #fff;
}
.bc-floating--right .bc-bubble::after { right: 26px; }
.bc-floating--left .bc-bubble::after  { left: 26px; }
.bc-bubble .bc-bubble__x.bc-bubble__x {
	position: absolute !important;
	top: 4px !important;
	right: 4px !important;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #64748b !important;
	font-size: 18px;
	line-height: 26px;
	text-align: center;
	box-shadow: none !important;
	transform: none !important;
	cursor: pointer;
}
.bc-bubble .bc-bubble__x.bc-bubble__x:hover { background: #f1f5f9 !important; color: #0f172a !important; }

@media (max-width: 640px) {
	.bc-embed--floating.bc-size--s .bc-btn.bc-btn { font-size: 13px; padding: 9px 14px; }
	.bc-embed--floating.bc-size--l .bc-btn.bc-btn { font-size: 17px; padding: 15px 22px; }
	.bc-embed--floating.bc-phone--hide { display: none !important; }
	/* 0.4.2 — Largo: dal bordo fino a lasciare --bc-reserve-m px dall'altro lato
	   (lo spazio di WhatsApp). Testo su una riga: si rimpicciolisce di poco sui
	   telefoni stretti invece di andare a capo. */
	.bc-embed--floating.bc-phone--wide { max-width: none; }
	.bc-embed--floating.bc-floating--left.bc-phone--wide  { left: 14px; right: var(--bc-reserve-m, 14px); }
	.bc-embed--floating.bc-floating--right.bc-phone--wide { right: 14px; left: var(--bc-reserve-m, 14px); }
	.bc-embed--floating.bc-phone--wide .bc-btn.bc-btn { display: block; width: 100%; padding-left: 12px; padding-right: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.bc-embed--floating.bc-phone--wide.bc-size--s .bc-btn.bc-btn { font-size: min(13px, 3.4vw); }
	.bc-embed--floating.bc-phone--wide.bc-size--m .bc-btn.bc-btn { font-size: min(15px, 3.9vw); }
	.bc-embed--floating.bc-phone--wide.bc-size--l .bc-btn.bc-btn { font-size: min(16px, 4.1vw); }
	/* Barra a tutta larghezza in fondo allo schermo. */
	.bc-embed--floating.bc-phone--bar { left: 0; right: 0; bottom: 0; max-width: none; }
	.bc-embed--floating.bc-phone--bar .bc-btn.bc-btn {
		display: block;
		width: 100%;
		border-radius: 0 !important;
		padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		text-align: center;
		box-shadow: 0 -6px 20px rgba(15, 23, 42, .18) !important;
	}
	.bc-embed--floating.bc-phone--bar::before { display: none; }
	.bc-embed--floating.bc-phone--bar .bc-bubble { left: 16px; right: auto; }
	.bc-embed--floating.bc-phone--bar .bc-bubble::after { left: 26px; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.bc-embed--floating.bc-pulse::before,
	.bc-embed--floating.bc-pulse .bc-btn.bc-btn { animation: none; }
	.bc-bubble { transition: none; }
}
