/*
 * FC Bookings — native ad units.
 *
 * Everything inherits the theme: font family, text colour, link colour and
 * border radius. Only spacing, a hairline border and a soft tint are added, so
 * the unit reads like an in-feed Google native ad rather than a pasted banner.
 */

.fc-ad {
	--fc-ad-accent: currentColor;
	--fc-ad-radius: 14px;
	--fc-ad-line: color-mix(in srgb, currentColor 14%, transparent);
	--fc-ad-tint: color-mix(in srgb, currentColor 4%, transparent);
	--fc-ad-muted: color-mix(in srgb, currentColor 62%, transparent);

	display: block;
	position: relative;
	clear: both;
	margin: 2rem 0;
	font: inherit;
	color: inherit;
	container-type: inline-size;
}

.fc-ad__label {
	display: inline-block;
	margin-bottom: 0.4rem;
	font-size: 0.68em;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--fc-ad-muted);
}

/* ---- Link / card shell ------------------------------------------------ */

.fc-ad__link {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem;
	border: 1px solid var(--fc-ad-line);
	border-radius: var(--fc-ad-radius);
	background: var(--fc-ad-tint);
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.fc-ad__link:hover,
.fc-ad__link:focus-visible {
	border-color: color-mix(in srgb, var(--fc-ad-accent) 45%, var(--fc-ad-line));
	background: color-mix(in srgb, var(--fc-ad-accent) 6%, transparent);
	transform: translateY(-1px);
	text-decoration: none;
}

.fc-ad__link:focus-visible {
	outline: 2px solid var(--fc-ad-accent);
	outline-offset: 2px;
}

/* ---- Media ------------------------------------------------------------ */

.fc-ad__media {
	flex: 0 0 auto;
	display: block;
	width: 116px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: calc(var(--fc-ad-radius) - 6px);
	background: var(--fc-ad-tint);
}

.fc-ad__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: inherit;
}

/* ---- Text ------------------------------------------------------------- */

.fc-ad__body {
	display: block;
	min-width: 0;
}

.fc-ad__brand {
	display: block;
	margin-bottom: 0.15rem;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--fc-ad-muted);
}

.fc-ad__title {
	display: block;
	font-size: 1.02em;
	font-weight: 700;
	line-height: 1.3;
}

.fc-ad__text {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.9em;
	line-height: 1.5;
	color: var(--fc-ad-muted);
}

.fc-ad__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-top: 0.6rem;
	font-size: 0.86em;
	font-weight: 600;
	color: var(--fc-ad-accent);
}

.fc-ad__cta::after {
	content: "\2192";
	transition: transform 0.18s ease;
}

.fc-ad__link:hover .fc-ad__cta::after {
	transform: translateX(3px);
}

/* ---- Variants --------------------------------------------------------- */

.fc-ad--flat .fc-ad__link {
	padding: 0.8rem 0;
	border-width: 1px 0;
	border-radius: 0;
	background: transparent;
}

.fc-ad--flat .fc-ad__link:hover {
	background: transparent;
	transform: none;
}

.fc-ad--banner .fc-ad__link {
	flex-direction: column;
	align-items: stretch;
	gap: 0.85rem;
	padding: 0;
	overflow: hidden;
}

.fc-ad--banner .fc-ad__media {
	width: 100%;
	aspect-ratio: 16 / 6;
	border-radius: 0;
}

.fc-ad--banner .fc-ad__body {
	padding: 0 1.1rem 1.1rem;
}

.fc-ad--sidebar .fc-ad__link {
	flex-direction: column;
	align-items: stretch;
	text-align: left;
}

.fc-ad--sidebar .fc-ad__media {
	width: 100%;
	aspect-ratio: 16 / 9;
}

/* ---- AdSense unit ---------------------------------------------------- */

.fc-ad__unit {
	display: block;
	width: 100%;
	min-height: 90px;
	overflow: hidden;
	border-radius: var(--fc-ad-radius);
}

/* ---- Narrow containers ------------------------------------------------ */

@container (max-width: 420px) {
	.fc-ad__link {
		flex-direction: column;
		align-items: stretch;
	}

	.fc-ad__media {
		width: 100%;
		aspect-ratio: 16 / 9;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fc-ad__link,
	.fc-ad__cta::after {
		transition: none;
	}

	.fc-ad__link:hover {
		transform: none;
	}
}

/* ---- Floating sticky card (landing page) ------------------------------ */

.fc-ad-float {
	--fc-ad-accent: currentColor;
	--fc-ad-float-bg: Canvas;
	--fc-ad-float-text: CanvasText;
	--fc-ad-float-line: color-mix(in srgb, CanvasText 10%, transparent);
	--fc-ad-float-muted: color-mix(in srgb, CanvasText 60%, transparent);

	position: fixed;
	bottom: 1.25rem;
	right: 1.25rem;
	z-index: 99990;
	width: min(340px, calc(100vw - 2.5rem));
	padding: 1rem;
	border: 1px solid var(--fc-ad-float-line);
	border-radius: 18px;
	background: var(--fc-ad-float-bg);
	color: var(--fc-ad-float-text);
	box-shadow:
		0 1px 2px color-mix(in srgb, CanvasText 6%, transparent),
		0 12px 32px -8px color-mix(in srgb, CanvasText 22%, transparent);
	font: inherit;
	opacity: 0;
	transform: translateY(16px) scale(0.97);
	transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fc-ad-float--bottom-left {
	right: auto;
	left: 1.25rem;
}

.fc-ad-float.is-visible {
	opacity: 1;
	transform: none;
}

.fc-ad-float.is-leaving {
	opacity: 0;
	transform: translateY(12px) scale(0.97);
	pointer-events: none;
}

.fc-ad-float__label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fc-ad-float-muted);
}

.fc-ad-float__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--fc-ad-float-muted);
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.fc-ad-float__close:hover,
.fc-ad-float__close:focus-visible {
	background: color-mix(in srgb, CanvasText 8%, transparent);
	color: var(--fc-ad-float-text);
}

.fc-ad-float__close:focus-visible {
	outline: 2px solid var(--fc-ad-accent);
	outline-offset: 2px;
}

.fc-ad-float__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.fc-ad-float__media {
	display: block;
	margin-bottom: 0.75rem;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: color-mix(in srgb, CanvasText 6%, transparent);
}

.fc-ad-float__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.fc-ad-float__body {
	display: block;
	padding-right: 1.5rem;
}

.fc-ad-float__brand {
	display: block;
	margin-bottom: 0.15rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--fc-ad-float-muted);
}

.fc-ad-float__title {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
}

.fc-ad-float__text {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--fc-ad-float-muted);
}

.fc-ad-float__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	margin-top: 0.75rem;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background: var(--fc-ad-accent);
	color: var(--fc-ad-float-bg);
	font-size: 0.85rem;
	font-weight: 600;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fc-ad-float__link:hover .fc-ad-float__cta {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px -6px color-mix(in srgb, CanvasText 35%, transparent);
}

.fc-ad-float .fc-ad__unit {
	margin-top: 0.25rem;
}

@media (max-width: 480px) {
	.fc-ad-float,
	.fc-ad-float--bottom-left {
		right: 0.75rem;
		left: 0.75rem;
		bottom: 0.75rem;
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fc-ad-float,
	.fc-ad-float__close,
	.fc-ad-float__cta {
		transition: none;
	}

	.fc-ad-float {
		transform: none;
	}
}
