/* ==========================================================================
   Workshop reservation page - Strefa Artysty
   File: assets/css/reservation.css
   ========================================================================== */

.reservation-page {
	background:
		linear-gradient(
			180deg,
			#ffffff 0%,
			#fbf8ff 24%,
			#fbf8ff 82%,
			#ffffff 100%
		);
}

.reservation-page__section {
	padding: clamp(42px, 5vw, 68px) 0 clamp(56px, 7vw, 90px);
}

.reservation-page__container {
	width: min(calc(100% - clamp(32px, 5vw, 96px)), 1280px);
	margin-right: auto;
	margin-left: auto;
}

.reservation-page__header {
	display: grid;
	justify-items: center;
	max-width: 920px;
	margin: 0 auto clamp(14px, 3vw, 16px);
	text-align: center;
}

.reservation-page__title {
	max-width: 900px;
	margin: 0;
	color: var(--pm-color-heading);
	font-size: clamp(34px, 4.3vw, 52px);
	font-weight: 920;
	line-height: 1.06;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.reservation-page__lead {
	max-width: 780px;
	margin: 14px auto 0;
	color: var(--pm-color-text);
	font-size: clamp(15.5px, 1.18vw, 18px);
	line-height: 1.6;
}

/*
 * Formularz jest celowo węższy niż wcześniej.
 * 960 px daje lepsze skupienie uwagi i ogranicza pustą przestrzeń.
 */
.reservation-page__form-card {
	width: min(100%, 960px);
	margin: 0 auto;
	padding: clamp(22px, 2.8vw, 32px);
	border: 1px solid rgba(139, 53, 246, 0.10);
	border-radius: 26px;
	background: #ffffff;
	box-shadow: 0 18px 45px rgba(93, 40, 160, 0.09);
}

/* ==========================================================================
   CF7 form
   ========================================================================== */

.reservation-form {
	display: grid;
	gap: 12px;
}

/*
 * CF7/HTML hidden attribute must always win over display rules.
 */
.reservation-form [hidden] {
	display: none !important;
}

/* ==========================================================================
   Selected workshop + term
   ========================================================================== */

.reservation-form__workshop {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.reservation-form__workshop-label {
	color: var(--pm-color-text);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
}

.reservation-form__workshop-title {
	color: var(--pm-color-heading);
	font-size: 15px;
	font-weight: 900;
	line-height: 1.4;
}

/*
 * Termin jest wizualnie związany z nazwą warsztatu,
 * ale bez dodatkowego fioletowego boxa.
 */
.reservation-form__term-row {
	width: 100%;
	margin: -2px 0 2px;
	padding: 0 0 14px;
	border-bottom: 1px solid rgba(139, 53, 246, 0.10);
}

.reservation-form__term-value {
	display: block;
	width: 100%;
	min-height: 0;
	padding: 0;
	color: var(--pm-color-heading);
	background: transparent;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.45;
}

.reservation-form__term-select,
.reservation-form__term-select .wpcf7-form-control-wrap,
.reservation-form__term-select select {
	display: block;
	width: 100%;
	max-width: none;
}

/* ==========================================================================
   Main 50/50 layout
   ========================================================================== */

.reservation-form__columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.reservation-form__left {
	display: grid;
	gap: 9px;
}

.reservation-form__right {
	display: grid;
	align-content: start;
}

/*
 * Pole dodatkowej informacji pozostaje wyraźnie opcjonalne
 * i nie dominuje nad głównymi polami rezerwacji.
 */
.reservation-form__right textarea {
	height: 166px;
	min-height: 166px;
	max-height: 220px;
}

/* ==========================================================================
   Fields
   ========================================================================== */

.reservation-form__field {
	display: grid;
	gap: 4px;
	margin: 0;
	color: var(--pm-color-heading);
	font-size: 13px;
	font-weight: 850;
	line-height: 1.3;
}

.reservation-form__field .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
}

.reservation-form input[type="text"],
.reservation-form input[type="number"],
.reservation-form input[type="tel"],
.reservation-form input[type="email"],
.reservation-form select,
.reservation-form textarea {
	display: block;
	width: 100%;
	min-width: 0;
	min-height: 40px;
	margin: 0;
	padding: 7px 11px;
	border: 1px solid rgba(139, 53, 246, 0.18);
	border-radius: var(--pm-radius-md, 12px);
	outline: 0;
	color: var(--pm-color-heading);
	background: #ffffff;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		background-color 180ms ease;
}

.reservation-form textarea {
	resize: vertical;
}

.reservation-form input::placeholder,
.reservation-form textarea::placeholder {
	color: #8b8494;
	opacity: 1;
}

.reservation-form input:focus,
.reservation-form select:focus,
.reservation-form textarea:focus {
	border-color: var(--pm-color-primary);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(139, 53, 246, 0.09);
}

/* ==========================================================================
   CF7 validation
   ========================================================================== */

.reservation-form .wpcf7-not-valid {
	border-color: #c83d3d !important;
}

.reservation-form .wpcf7-not-valid-tip {
	margin-top: 4px;
	color: #b42318;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
}

.reservation-form .wpcf7-response-output {
	margin: 2px 0 0 !important;
	padding: 11px 13px !important;
	border: 1px solid rgba(139, 53, 246, 0.16) !important;
	border-radius: var(--pm-radius-md, 13px);
	color: var(--pm-color-heading);
	background: #fbf8ff;
	font-size: 13px;
	line-height: 1.45;
}

/* ==========================================================================
   Privacy
   ========================================================================== */

.reservation-form__privacy {
	margin: 2px 0 -2px;
	color: var(--pm-color-text);
	font-size: 11.5px;
	line-height: 1.45;
}

.reservation-form__privacy a {
	color: var(--pm-color-primary);
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.reservation-form__privacy a:hover,
.reservation-form__privacy a:focus {
	color: var(--pm-color-primary-hover);
}

/* ==========================================================================
   Submit
   ========================================================================== */

/*
 * Jedno mocne CTA na końcu formularza.
 * Pełna szerokość zwiększa widoczność i domyka ścieżkę rezerwacji.
 */
.reservation-form input[type="submit"],
.reservation-form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	min-height: 48px;
	margin: 0;
	padding: 13px 22px;
	border: 1px solid var(--pm-color-primary);
	border-radius: var(--pm-radius-pill, 999px);
	color: #ffffff;
	background: var(--pm-color-primary);
	box-shadow: 0 12px 28px rgba(139, 53, 246, 0.18);
	font-size: 14px;
	font-weight: 900;
	line-height: 1.1;
	text-align: center;
	cursor: pointer;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease;
}

.reservation-form input[type="submit"]:hover,
.reservation-form input[type="submit"]:focus,
.reservation-form button[type="submit"]:hover,
.reservation-form button[type="submit"]:focus {
	background: var(--pm-color-primary-hover);
	border-color: var(--pm-color-primary-hover);
	box-shadow: 0 14px 32px rgba(139, 53, 246, 0.22);
	transform: translateY(-1px);
}

.reservation-form .wpcf7-spinner {
	display: block;
	margin: 8px auto 0;
}

/* Legacy CF7 ajax loader */

div.wpcf7 .ajax-loader {
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 700px) {
	.reservation-page__section {
		padding: 34px 0 52px;
	}

	.reservation-page__container {
		width: min(calc(100% - 28px), 100%);
	}

	.reservation-page__header {
		margin-bottom: 22px;
	}

	.reservation-page__title {
		font-size: clamp(31px, 9vw, 40px);
	}

	.reservation-page__lead {
		margin-top: 12px;
		font-size: 15.5px;
		line-height: 1.58;
	}

	.reservation-page__form-card {
		padding: 18px;
		border-radius: 22px;
	}

	.reservation-form {
		gap: 12px;
	}

	.reservation-form__workshop {
		display: grid;
		gap: 3px;
	}

	.reservation-form__term-row {
		padding-bottom: 12px;
	}

	.reservation-form__columns {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.reservation-form__left {
		gap: 9px;
	}

	.reservation-form input[type="text"],
	.reservation-form input[type="number"],
	.reservation-form input[type="tel"],
	.reservation-form input[type="email"],
	.reservation-form select,
	.reservation-form textarea {
		min-height: 44px;
		font-size: 16px;
	}

	.reservation-form__right textarea {
		height: 88px;
		min-height: 88px;
		max-height: 160px;
	}

	.reservation-form input[type="submit"],
	.reservation-form button[type="submit"] {
		min-height: 48px;
	}
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.reservation-page *,
	.reservation-page *::before,
	.reservation-page *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
