/**
 * GBP Advanced CTA Widget Styles
 *
 * Responsive CTA banner with headline, button, and circular badge image.
 */

/* ======================
   Container
   ====================== */
.gbp-advanced-cta {
	position: relative;
	overflow: visible;
}

.gbp-advanced-cta__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

/* ======================
   Content Area
   ====================== */
.gbp-advanced-cta__content {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	flex: 1;
	min-width: 0;
}

/* ======================
   Headline
   ====================== */
.gbp-advanced-cta__headline {
	margin: 0;
	font-weight: 600;
	line-height: 1.3;
	flex-shrink: 1;
	flex-grow: 0;
}

/* ======================
   Button
   ====================== */
.gbp-advanced-cta__button-wrapper {
	flex-grow: 1;
}

.gbp-advanced-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.gbp-advanced-cta__button:hover,
.gbp-advanced-cta__button:focus-visible {
	text-decoration: none;
}

/* ======================
   Badge (Image Only - Floating)
   ====================== */
.gbp-advanced-cta__badge {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 50%;
	overflow: visible;
	z-index: 10;
}

.gbp-advanced-cta__badge img {
	display: block;
	object-fit: cover;
	border-radius: 50%;
}

/* ======================
   Mobile Responsive
   ====================== */
@media (max-width: 767px) {
	.gbp-advanced-cta__inner {
		flex-wrap: wrap;
		padding-right: 0;
	}

	.gbp-advanced-cta__content {
		flex-direction: column;
		align-items: flex-start;
		width: 100%;
	}

	.gbp-advanced-cta__button-wrapper {
		width: 100%;
	}

	/* Layout: Headline + Badge on top row, Button below */
	.gbp-advanced-cta--mobile-headline-badge-button .gbp-advanced-cta__inner {
		flex-direction: row;
		flex-wrap: wrap;
		padding-right: 60px; /* Space for floating badge */
	}

	.gbp-advanced-cta--mobile-headline-badge-button .gbp-advanced-cta__content {
		flex-direction: column;
		width: 100%;
	}

	.gbp-advanced-cta--mobile-headline-badge-button .gbp-advanced-cta__headline {
		flex: 1;
		min-width: 0;
	}

	.gbp-advanced-cta--mobile-headline-badge-button .gbp-advanced-cta__button {
		justify-content: flex-start;
	}

	/* Badge stays floating on mobile for this layout */
	.gbp-advanced-cta--mobile-headline-badge-button .gbp-advanced-cta__badge {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
	}

	/* Layout: Headline → Button → Badge (full stack) */
	.gbp-advanced-cta--mobile-headline-button-badge .gbp-advanced-cta__inner {
		flex-direction: column;
		align-items: center;
		padding-right: 0;
	}

	.gbp-advanced-cta--mobile-headline-button-badge .gbp-advanced-cta__content {
		width: 100%;
		align-items: center;
		text-align: center;
	}

	.gbp-advanced-cta--mobile-headline-button-badge .gbp-advanced-cta__headline {
		text-align: center;
		width: 100%;
	}

	.gbp-advanced-cta--mobile-headline-button-badge .gbp-advanced-cta__button {
		margin-top: 16px;
	}

	/* Badge becomes inline for stacked layout */
	.gbp-advanced-cta--mobile-headline-button-badge .gbp-advanced-cta__badge {
		position: relative;
		top: auto;
		right: auto !important;
		transform: none;
		margin-top: 24px;
	}
}

/* ======================
   Tablet Adjustments
   ====================== */
@media (min-width: 768px) and (max-width: 1024px) {
	.gbp-advanced-cta__content {
		gap: 20px;
	}
}

/* ======================
   Editor Preview Fixes
   ====================== */
.elementor-editor-active .gbp-advanced-cta {
	overflow: visible;
}
