/*
 * TS - Cookie Consent — banner. Colours and buttons come from the Flatsome theme
 * (CLAUDE_template.md, "Front-end styling"). Looks tried on the live UK site (Leo, 2026-11-10):
 *   1.0.0 white full-width bar — "too light, almost missed it";
 *   1.0.2 dark full-width bar  — "too dark", still "un-noticeable", and Reject vanished:
 *                                Flatsome's `.button.primary.is-outline` out-ranks a plugin
 *                                recolour. Never put the theme's outline buttons on a dark fill.
 *   1.0.3 floating card        — a bar on the bottom edge reads as browser chrome whatever its
 *                                colour; a card lifted off the edge, over the products, with a
 *                                theme-blue border, a deep shadow and a slide-up, is seen.
 *                                Desktop: bottom-right corner, 400px, text above the buttons
 *                                (Leo: like WPConsent's corner pop-up). Phone: full-width card.
 * Buttons stay the theme's: Accept `button alt` (wider), Reject `button primary is-outline`.
 */

@keyframes ts-cc-up {
	from {
		transform: translateY(120%);
		opacity: 0;
	}
	to {
		transform: none;
		opacity: 1;
	}
}

.ts-cc-banner {
	position: fixed;
	right: 24px;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	box-sizing: border-box;
	width: 400px;
	max-width: calc(100vw - 48px);
	background: #fff;
	border: 2px solid var(--fs-color-secondary, #3e6ae1);
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
	color: var(--fs-color-primary, #171a20);
	font-size: 15px;
	line-height: 1.5;
	padding: 20px;
	animation: ts-cc-up 0.45s ease-out both;
}

.ts-cc-banner[hidden] {
	display: none;
}

.ts-cc-inner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
}

.ts-cc-text p {
	margin: 0;
}

.ts-cc-more p {
	margin-top: 8px;
}

.ts-cc-banner a,
.ts-cc-banner .ts-cc-more-toggle {
	color: var(--fs-color-secondary, #3e6ae1);
	text-decoration: underline;
}

.ts-cc-links span {
	margin: 0 6px;
}

.ts-cc-more-toggle {
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 0 4px;
	min-height: 0;
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.ts-cc-buttons {
	display: flex;
	gap: 10px;
}

.ts-cc-buttons .button {
	margin: 0;
	min-height: 46px;
}

.ts-cc-reject {
	flex: 2;
	background: #fff; /* Only the fill behind the outline; colours stay the theme's. */
}

.ts-cc-accept {
	flex: 3; /* The bigger tap target (Leo, 2026-11-10). */
}

@media (max-width: 849px) {
	.ts-cc-banner {
		right: 10px;
		left: 10px;
		bottom: calc(10px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: none;
		padding: 16px;
	}

	.ts-cc-buttons .button {
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ts-cc-banner {
		animation: none;
	}
}
