/*
 * TakeUSicily Booking
 * Tutte le classi sono prefissate .tks- per non entrare in conflitto
 * con Elementor o con il tema.
 */

.tks-hero,
.tks-booking-standalone {
	--tks-green: #0b3d2e;
	--tks-green-dark: #072a20;
	--tks-gold: #c8a24a;
	--tks-ink: #1c1c1c;
	--tks-muted: #6b7280;
	--tks-line: #e2e5e1;
	--tks-radius: 14px;
	--tks-hero-image: none;

	box-sizing: border-box;
	font-family: inherit;
}

.tks-hero *,
.tks-booking-standalone * {
	box-sizing: border-box;
}

/* ============================== HERO ============================== */

.tks-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 88vh;
	padding: 80px 20px;
	background-color: var(--tks-green-dark);
	background-image: var(--tks-hero-image);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

/* Velo scuro: tiene il testo leggibile su qualsiasi foto. */
.tks-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(7, 42, 32, 0.92) 0%,
		rgba(7, 42, 32, 0.75) 45%,
		rgba(7, 42, 32, 0.45) 100%
	);
}

.tks-hero--plain::before {
	background: radial-gradient(circle at 20% 20%, #14513d 0%, #072a20 70%);
}

.tks-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 56px;
	align-items: center;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.tks-hero__copy {
	color: #fff;
}

.tks-hero__eyebrow {
	margin: 0 0 14px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tks-gold);
}

.tks-hero__title {
	margin: 0 0 18px;
	font-size: clamp(2rem, 4.2vw, 3.35rem);
	line-height: 1.1;
	font-weight: 700;
	color: #fff;
}

.tks-hero__subtitle {
	margin: 0 0 28px;
	max-width: 46ch;
	font-size: clamp(1rem, 1.4vw, 1.14rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

.tks-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tks-hero__badges li {
	position: relative;
	padding-left: 26px;
	font-size: 0.94rem;
	color: rgba(255, 255, 255, 0.92);
}

.tks-hero__badges li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: -1px;
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--tks-gold);
	color: var(--tks-green-dark);
	font-size: 11px;
	font-weight: 700;
}

/* ============================== FORM ============================== */

.tks-form {
	position: relative;
	padding: 30px;
	background: #fff;
	border-radius: var(--tks-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	color: var(--tks-ink);
}

.tks-booking-standalone .tks-form {
	max-width: 560px;
	margin-inline: auto;
	border: 1px solid var(--tks-line);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.tks-form__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}

.tks-form__title {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--tks-green);
}

.tks-form__steps {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	flex-shrink: 0;
}

.tks-form__step {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--tks-line);
	color: var(--tks-muted);
	font-size: 12px;
	font-weight: 700;
	transition: background 0.2s, color 0.2s;
}

.tks-form__step.is-active {
	background: var(--tks-green);
	color: #fff;
}

.tks-form__step-line {
	width: 20px;
	height: 2px;
	background: var(--tks-line);
}

/* --- step --- */

.tks-step {
	display: none;
}

.tks-step.is-active {
	display: block;
	animation: tks-in 0.22s ease-out;
}

@keyframes tks-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tks-step.is-active { animation: none; }
}

/* --- campi --- */

.tks-field {
	margin-bottom: 16px;
}

.tks-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.tks-row[hidden] {
	display: none;
}

.tks-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--tks-muted);
}

.tks-optional {
	font-weight: 400;
	text-transform: none;
}

.tks-input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--tks-line);
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.35;
	color: var(--tks-ink);
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}

select.tks-input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
}

.tks-input:focus {
	outline: none;
	border-color: var(--tks-green);
	box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.13);
}

.tks-input.has-error {
	border-color: #d1414a;
}

.tks-error {
	display: none;
	margin-top: 5px;
	font-size: 0.8rem;
	color: #d1414a;
}

.tks-error.is-visible {
	display: block;
}

/* --- andata / ritorno --- */

.tks-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	padding: 4px;
	background: #f3f5f2;
	border-radius: 10px;
}

.tks-toggle__opt {
	position: relative;
	margin: 0;
	cursor: pointer;
}

/*
 * I radio restano nell'albero di accessibilita e raggiungibili da tastiera:
 * li nascondiamo con la tecnica "clip", non con width/height a zero.
 */
.tks-toggle__opt input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.tks-toggle__opt span {
	display: block;
	padding: 9px 8px;
	border-radius: 7px;
	text-align: center;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--tks-muted);
	transition: background 0.18s, color 0.18s;
}

.tks-toggle__opt input:checked + span {
	background: #fff;
	color: var(--tks-green);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.tks-toggle__opt input:focus-visible + span {
	outline: 2px solid var(--tks-green);
	outline-offset: 1px;
}

/* --- consenso --- */

.tks-consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 0.84rem;
	line-height: 1.45;
	color: var(--tks-muted);
	cursor: pointer;
}

.tks-consent input {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	accent-color: var(--tks-green);
}

.tks-consent a {
	color: var(--tks-green);
	text-decoration: underline;
}

/* --- honeypot: nascosto senza display:none, cosi i bot lo compilano --- */

.tks-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- pulsanti --- */

.tks-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	border: 1.5px solid transparent;
	border-radius: 9px;
	background: var(--tks-green);
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s, transform 0.08s, opacity 0.18s;
}

.tks-btn:hover {
	background: var(--tks-green-dark);
}

.tks-btn:active {
	transform: translateY(1px);
}

.tks-btn:focus-visible {
	outline: 3px solid rgba(11, 61, 46, 0.35);
	outline-offset: 2px;
}

.tks-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.tks-btn--next,
.tks-btn--submit {
	width: 100%;
}

.tks-btn--ghost {
	flex-shrink: 0;
	width: auto;
	padding-inline: 18px;
	background: transparent;
	border-color: var(--tks-line);
	color: var(--tks-muted);
	font-weight: 600;
}

.tks-btn--ghost:hover {
	background: #f3f5f2;
	color: var(--tks-ink);
}

.tks-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.tks-actions .tks-btn--submit {
	flex: 1;
}

/* --- riepilogo step 2 --- */

.tks-recap {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-left: 3px solid var(--tks-gold);
	border-radius: 0 8px 8px 0;
	background: #f7f8f6;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--tks-ink);
}

.tks-alt {
	margin: 14px 0 0;
	text-align: center;
	font-size: 0.85rem;
	color: var(--tks-muted);
}

.tks-alt a {
	color: var(--tks-green);
	font-weight: 600;
}

/* --- esito --- */

.tks-done {
	text-align: center;
	padding: 26px 6px;
}

.tks-done__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: #e6f4ec;
	color: #1a7f37;
	font-size: 28px;
}

.tks-done__title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	color: var(--tks-green);
}

.tks-done__text {
	margin: 0;
	color: var(--tks-muted);
	line-height: 1.55;
}

.tks-form__error {
	margin: 16px 0 0;
	padding: 11px 14px;
	border-radius: 8px;
	background: #fdeced;
	color: #a3272f;
	font-size: 0.87rem;
	line-height: 1.45;
}

.tks-form__error[hidden] {
	display: none;
}

/* ============================ RESPONSIVE ============================ */

@media (max-width: 1024px) {
	.tks-hero__inner {
		grid-template-columns: 1fr;
		gap: 36px;
		max-width: 620px;
	}

	.tks-hero {
		min-height: 0;
		padding: 64px 20px;
	}
}

@media (max-width: 600px) {
	.tks-hero {
		padding: 48px 16px;
	}

	.tks-hero__inner {
		gap: 28px;
	}

	.tks-form {
		padding: 22px 18px;
	}

	.tks-form__title {
		font-size: 1.15rem;
	}

	.tks-hero__badges {
		gap: 8px 16px;
	}

	.tks-hero__badges li {
		font-size: 0.87rem;
	}

	/* Su iOS un font < 16px fa zoomare la pagina al focus. */
	.tks-input {
		font-size: 16px;
	}
}
