/* Badge verifica host + tooltip (unico su profilo venditore ed esperienze) */

.tbp-venditore-foto,
.single-venditori .info-venditore .container .foto,
.single-esperienze .venditore .info .foto {
	position: relative;
	overflow: visible;
	flex-shrink: 0;
	box-sizing: border-box;
}

.tbp-venditore-foto__img,
.single-venditori .info-venditore .container .foto > .tbp-venditore-foto__img,
.single-esperienze .venditore .info .foto > .tbp-venditore-foto__img {
	display: block;
	box-sizing: border-box;
	max-width: 100%;
	object-fit: cover;
	object-position: center;
}

/* Logo piattaforma: contain nel cerchio (non crop ritratto) */
.tbp-venditore-foto--platform > .tbp-venditore-foto__img,
.tbp-venditore-foto--platform > .tbp-profile-image.tbp-venditore-foto__img {
	object-fit: contain;
	object-position: center;
	background: var(--tbp-beige, #f4f7f5);
	padding: 12%;
}

/* Vecchio overlay PNG (img.verificato): non più usato */
.tbp-venditore-foto > img.verificato,
.single-venditori .info-venditore .container .foto > img.verificato,
.single-esperienze .venditore .info .foto > img.verificato {
	display: none !important;
}

.tbp-venditore-badge {
	position: absolute;
	display: block;
	line-height: 0;
	pointer-events: auto;
	cursor: help;
	z-index: 12;
	outline: none;
}

/* Copre eventuale badge grafico ancora presente dentro la foto caricata */
.tbp-venditore-badge__backdrop {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 118%;
	height: 118%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 50%;
	z-index: 0;
	box-shadow: 0 0 0 2px #fff;
}

.tbp-venditore-badge__icon {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
}

/* Tooltip a destra del badge (lettura LTR) */
.tbp-venditore-badge__tooltip {
	position: absolute;
	left: calc(100% + 12px);
	right: auto;
	top: 50%;
	bottom: auto;
	width: max-content;
	max-width: min(280px, calc(100vw - 24px));
	padding: 14px 18px;
	background: #f4f7f5;
	border: 1px solid #084828;
	border-radius: 20px;
	color: #084828;
	font-size: 0.8125rem;
	line-height: 1.45;
	text-align: left;
	box-shadow: 0 10px 28px rgba(8, 72, 40, 0.12);
	visibility: hidden;
	opacity: 0;
	transform: translateY(-50%) translateX(-8px);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease,
		visibility 0.2s ease;
	pointer-events: none;
	z-index: 20;
}

.tbp-venditore-badge__tooltip::before {
	content: '';
	position: absolute;
	top: 50%;
	left: -8px;
	right: auto;
	bottom: auto;
	transform: translateY(-50%);
	border: 8px solid transparent;
	border-right-color: #084828;
}

.tbp-venditore-badge__tooltip::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -7px;
	right: auto;
	bottom: auto;
	transform: translateY(-50%);
	border: 7px solid transparent;
	border-right-color: #f4f7f5;
}

.tbp-venditore-badge__tooltip-title {
	display: block;
	font-weight: 700;
	font-size: 0.9375rem;
	letter-spacing: -0.02em;
	margin-bottom: 6px;
	color: #084828;
}

.tbp-venditore-badge__tooltip-text {
	display: block;
	font-weight: 400;
}

.tbp-venditore-badge:hover .tbp-venditore-badge__tooltip,
.tbp-venditore-badge:focus-visible .tbp-venditore-badge__tooltip,
.tbp-venditore-badge:focus-within .tbp-venditore-badge__tooltip {
	visibility: visible;
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

.tbp-venditore-badge:focus-visible {
	outline: 2px solid #084828;
	outline-offset: 3px;
	border-radius: 50%;
}

.tbp-venditore-badge__tooltip.tbp-venditore-badge__tooltip--fixed {
	position: fixed;
	margin: 0;
	transform: none !important;
	z-index: 100000;
}

.tbp-venditore-badge__tooltip--fixed.tbp-venditore-badge__tooltip--visible {
	visibility: visible;
	opacity: 1;
}

/* Pagina profilo venditore */
.single-venditori .info-venditore .container .foto.tbp-venditore-foto,
.single-venditori .info-venditore .container .tbp-venditore-foto {
	width: 155px;
	height: 155px;
	max-width: 155px;
	margin: 0 auto 17px;
	border-radius: 50%;
}

.single-venditori .info-venditore .container .foto.tbp-venditore-foto .tbp-venditore-badge,
.single-venditori .info-venditore .container .tbp-venditore-foto .tbp-venditore-badge {
	width: 38px;
	height: 38px;
	top: 8px;
	right: -6px;
}

.single-venditori .info-venditore .container .foto > .tbp-venditore-foto__img,
.single-venditori .info-venditore .container .tbp-venditore-foto > .tbp-venditore-foto__img,
.single-venditori .info-venditore .container .foto > .tbp-profile-image-placeholder,
.single-venditori .info-venditore .container .tbp-venditore-foto > .tbp-profile-image-placeholder {
	width: 155px;
	height: 155px;
	max-width: 155px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center;
}

.single-venditori .info-venditore .container .tbp-venditore-foto--platform > .tbp-venditore-foto__img {
	object-fit: contain;
}

/* Blocco host in singola esperienza */
.single-esperienze .venditore .info .foto.tbp-venditore-foto,
.single-esperienze .venditore .info .tbp-venditore-foto {
	width: 105px;
	height: 105px;
	border-radius: 50%;
}

.single-esperienze .venditore .info .foto.tbp-venditore-foto .tbp-venditore-badge,
.single-esperienze .venditore .info .tbp-venditore-foto .tbp-venditore-badge {
	top: 0;
	right: 0;
	width: 32px;
	height: 32px;
}

.single-esperienze .venditore .info .foto > .tbp-venditore-foto__img,
.single-esperienze .venditore .info .tbp-venditore-foto > .tbp-venditore-foto__img,
.single-esperienze .venditore .info .foto > .tbp-profile-image-placeholder,
.single-esperienze .venditore .info .tbp-venditore-foto > .tbp-profile-image-placeholder {
	width: 105px;
	height: 105px;
	max-width: 105px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center;
}

.single-esperienze .venditore .info .tbp-venditore-foto--platform > .tbp-venditore-foto__img {
	object-fit: contain;
}

/* Card fornitore — checkout sidebar */
.woocommerce-checkout .tbp-vendor-public-card--checkout .tbp-venditore-foto .tbp-venditore-badge {
	top: -2px;
	right: -4px;
	width: 24px;
	height: 24px;
}

.woocommerce-checkout .tbp-vendor-public-card--checkout .tbp-venditore-foto .tbp-venditore-badge__backdrop {
	width: 112%;
	height: 112%;
	box-shadow: 0 0 0 1.5px #fff;
}

.woocommerce-checkout .tbp-vendor-public-card--checkout .tbp-venditore-foto .tbp-venditore-badge__tooltip {
	display: none;
}
