/* ---------------------------------------
   GLOBAL RESETS / HIDES
---------------------------------------- */

#jivo-iframe-container,
iframe[src*="jivosite"],
iframe[src*="jivochat"],
jdiv {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.planner-step[data-step="9"] .planner-formidable-wrap {
	position: absolute;
	left: -99999px;
	top: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.planner-step[data-step="9"] .planner-formidable-wrap .frm_submit,
.planner-step[data-step="9"] .planner-formidable-wrap .frm_button_submit,
.planner-step[data-step="9"] .planner-formidable-wrap button[type="submit"].frm_button_submit {
	display: none !important;
}

html,
body {
	height: 100%;
}

body {
	overflow-x: hidden;
}

.archive #main-content,
.site-main {
	padding: 0 !important;
}

body.page.admin-bar {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.page.admin-bar #wpadminbar {
	position: fixed;
	top: 0;
}


/* ---------------------------------------
   PLANNER LAYOUT
---------------------------------------- */

.planner-page {
	min-height: 100vh;
	padding: 0;
	background: #fff;
}

body.page.admin-bar .planner-page {
	min-height: calc(100vh - 32px);
}

:root {
	--planner-accent: rgb(240, 205, 129);
	--planner-accent-strong: #d7ab57;
	--planner-accent-soft: rgba(240, 205, 129, 0.18);
	--planner-ink: #1f1f1f;
	--planner-muted: #747474;
	--planner-line: #ebe6dc;
	--planner-surface: #f8f5ef;
	--planner-safe-bottom: max(18px, env(safe-area-inset-bottom));
	--planner-action-bar-height: 140px;
}


.planner-shell {
	position: relative;
	margin: 0 auto;
	padding: 24px 20px 0;
	background: #fff;
}

.planner-close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 60;
	border: 0;
	background: none;
	color: #222;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}


/* ---------------------------------------
   HEADER / BRAND / PROGRESS
---------------------------------------- */

.planner-header {
	width: 100%;
	max-width: 560px;
	margin: 0 auto 18px;
	text-align: center;
}

.planner-brand img {
	width: auto;
	height: 70px;
	margin: 0 auto 18px;
}

.planner-progress-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.planner-progress-bar {
	position: relative;
	width: min(100%, 220px);
	height: 8px;
	overflow: hidden;
	background: #ece9e2;
	border-radius: 999px;
}

.planner-progress-bar span {
	display: block;
	width: 12.5%;
	height: 100%;
	background: var(--planner-accent);
	border-radius: 999px;
	transition: width 0.25s ease;
}

.planner-progress-text {
	color: #6a6a6a;
	font-size: 14px;
	font-weight: 500;
}


/* ---------------------------------------
   STEPS
---------------------------------------- */

.planner-steps {
	padding-bottom: calc(var(--planner-action-bar-height) + var(--planner-safe-bottom) + 28px);
}

.planner-step {
	position: relative;
	display: none;
	margin: 0 auto;
}

.planner-step.is-active {
	display: block;
}

.planner-step-intro {
	margin-bottom: 14px;
	text-align: center;
}

.planner-step-intro h2 {
	margin: 0 0 12px;
	color: var(--planner-ink);
	font-family: "Marcellus SC", serif;
	font-size: 30px;
	line-height: 1.18;
	letter-spacing: 0.01em;
	text-transform: none;
}

.planner-step-intro p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

.planner-step-hint {
	margin-top: 16px;
	padding: 16px 18px;
	border: 1px solid #efe8d8;
	border-radius: 16px;
	background: #fcfaf5;
	color: #5e5a52;
	font-size: 14px;
	line-height: 1.55;
}

.planner-step-scroll {
	position: relative;
}


/* ---------------------------------------
   OPTION CARDS
---------------------------------------- */

.planner-options-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	padding-bottom: 14px;
	padding-top: 2px;
}

.planner-card-option {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	min-height: 88px;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--planner-line);
	border-radius: 18px;
	background: var(--planner-surface);
	color: #222;
	text-align: center;
	font-weight: 500;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		transform 0.2s ease;
}

.planner-card-option:hover {
	border-color: var(--planner-accent-strong);
	transform: translateY(-1px);
}

.planner-card-option input {
	position: absolute;
	inset: 0;
	z-index: 2;
	opacity: 0;
	cursor: pointer;
}

.planner-card-option:has(input:checked) {
	border-color: var(--planner-accent-strong);
	background: #f8e8bd;
	color: #1f1f1f;
}

.planner-card-option-media {
	display: block;
	width: 100%;
}

.planner-card-option-media img {
	display: block;
	width: 100%;
	height: 132px;
	object-fit: cover;
}

.planner-card-option > span:last-child {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding: 14px 12px;
}


/* ---------------------------------------
   FIELDS
---------------------------------------- */

.planner-date-block p,
.planner-field-block {
	margin: 0 0 14px;
}

.planner-field-label {
	display: block;
	margin-bottom: 8px;
	color: #555;
	font-size: 14px;
	font-weight: 500;
}

.planner-date-block input[type="date"],
.planner-field-block input,
.planner-field-block textarea,
.planner-child-dob input {
	width: 100%;
	padding: 15px 16px;
	border: 1px solid #e7e2d8;
	border-radius: 16px;
	background: #fff;
	color: #222;
	font-size: 16px;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
}

.planner-date-block input[type="date"]:focus,
.planner-field-block input:focus,
.planner-field-block textarea:focus,
.planner-child-dob input:focus {
	outline: none;
	border-color: var(--planner-accent-strong);
	box-shadow: 0 0 0 3px var(--planner-accent-soft);
}

.planner-date-block input[type="date"]:disabled {
	background: #f7f3ea;
	color: #9a9488;
	cursor: not-allowed;
}

.planner-field-block textarea {
	min-height: 130px;
	resize: vertical;
}

.planner-inline-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #444;
	font-size: 15px;
	cursor: pointer;
}


/* ---------------------------------------
   DATE RANGE
---------------------------------------- */

.planner-date-range-block {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
	gap: 16px;
}

.planner-date-range-block .planner-inline-check {
	grid-column: 1 / -1;
	margin-top: 4px;
}


/* ---------------------------------------
   DURATION
---------------------------------------- */

.planner-duration-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding-top: 2px;
}

.planner-duration-option {
	min-height: 108px;
	padding: 20px;
	border: 1px solid var(--planner-line);
	border-radius: 24px;
	background: var(--planner-surface);
	color: #2a2a2a;
	font-size: 16px;
	font-weight: 500;
	text-align: center;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		transform 0.2s ease;
}

.planner-duration-option:hover {
	border-color: var(--planner-accent-strong);
	transform: translateY(-1px);
}

.planner-duration-option.is-active {
	border-color: var(--planner-accent-strong);
	background: #f8e8bd;
	color: #1f1f1f;
}


/* ---------------------------------------
   COUNTERS
---------------------------------------- */

.planner-counter-group {
	display: grid;
	gap: 16px;
}

.planner-counter-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px;
	border: 1px solid var(--planner-line);
	border-radius: 18px;
	background: var(--planner-surface);
}

.planner-counter-label {
	color: #1f1f1f;
	font-size: 16px;
	font-weight: 500;
}

.planner-counter {
	display: flex;
	align-items: center;
	gap: 12px;
}

.counter-btn {
	width: 42px;
	height: 42px;
	border: 1px solid var(--planner-accent);
	border-radius: 12px;
	background: #f8e8bd;
	color: #1f1f1f;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease;
}

.counter-btn:hover {
	border-color: var(--planner-accent-strong);
	background: var(--planner-accent);
}

#planner-adults-count,
#planner-children-count {
	min-width: 20px;
	color: #1f1f1f;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
}

#planner-children-dobs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 18px;
}

.planner-child-dob label {
	display: block;
	margin-bottom: 8px;
	color: #555;
	font-size: 14px;
}


/* ---------------------------------------
   BUDGET FIELD
---------------------------------------- */

.planner-budget-field {
	position: relative;
}

.planner-budget-prefix {
	position: absolute;
	top: 50%;
	left: 16px;
	z-index: 2;
	transform: translateY(-50%);
	color: #555;
	pointer-events: none;
}

.planner-budget-field input {
	padding-left: 64px !important;
}


/* ---------------------------------------
   GLOBAL NAVIGATION BAR
---------------------------------------- */

.planner-nav-global {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid #ece6da;
	box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.06);
}


#planner-global-next,
#planner-global-prev {
	width: 100%;
	max-width: 620px;
	margin: 0 auto;
	border: 0;
	appearance: none;
	cursor: pointer;
	transition:
		background-color 0.18s ease,
		color 0.18s ease,
		opacity 0.18s ease,
		transform 0.18s ease;
}

#planner-global-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 16px 20px;
	border: 1px solid var(--planner-accent);
	border-radius: 16px;
	background: var(--planner-accent);
	color: var(--planner-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

#planner-global-next:hover:not([disabled]),
#planner-global-next:focus-visible:not([disabled]) {
	border-color: #ebc16a;
	background: #ebc16a;
}

#planner-global-next:active {
	transform: translateY(1px);
}

#planner-global-next[disabled],
#planner-global-next.is-disabled {
	border-color: #f2efe9;
	background: #f2efe9;
	color: #b3ada2;
	cursor: not-allowed;
	opacity: 1;
	transform: none;
}

#planner-global-prev {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	min-height: 24px;
	padding: 0;
	background: transparent;
	color: #666;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	margin-top: 8px;
}

#planner-global-prev:hover,
#planner-global-prev:focus-visible {
	color: #111;
}

#planner-global-prev .planner-prev-icon {
	font-size: 18px;
	line-height: 1;
}


/* ---------------------------------------
   STEP WIDTH HELPERS
---------------------------------------- */

.planner-step[data-step="4"] .planner-step-hint,
.planner-step[data-step="4"] .planner-date-range-block,
.planner-step[data-step="4"] .planner-step-4-option-wrap,
.planner-step[data-step="6"],
.planner-step[data-step="7"],
.planner-step[data-step="8"],
.planner-step[data-step="9"] {
	width: min(100%, 620px);
	margin-left: auto;
	margin-right: auto;
}


/* ---------------------------------------
   STEP 4
---------------------------------------- */

.planner-step[data-step="4"] .planner-date-range-block {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: end;
	column-gap: 24px;
	row-gap: 18px;
	margin-bottom: 14px;
}

.planner-step[data-step="4"] .planner-date-range-block > p {
	width: 100%;
	margin: 0;
}

.planner-step[data-step="4"] .planner-date-range-block > p input[type="date"] {
	width: 100%;
	min-height: 52px;
}

.planner-step[data-step="4"] .planner-step-4-option-wrap {
	margin-top: 4px;
}

.planner-step[data-step="4"] .planner-card-option--textonly {
	min-height: 82px;
	padding: 0;
	border: 1px solid var(--planner-line);
	border-radius: 18px;
	background: var(--planner-surface);
}

.planner-step[data-step="4"] .planner-card-option--textonly > span:last-child {
	min-height: 82px;
	padding: 18px 20px;
	color: #1f1f1f;
	font-size: 16px;
	font-weight: 500;
}

.planner-step[data-step="4"] .planner-card-option--textonly:hover {
	border-color: var(--planner-accent-strong);
	transform: translateY(-1px);
}

.planner-step[data-step="4"] .planner-card-option--textonly:has(input:checked) {
	border-color: var(--planner-accent-strong);
	background: #f8e8bd;
	color: #1f1f1f;
}

.planner-step[data-step="4"] .planner-date-block input[type="date"]:disabled {
	border-color: #e1ddd4;
	background: #f3f1ec;
	color: #9a9488;
	cursor: not-allowed;
	box-shadow: none;
}

.planner-step[data-step="4"] .planner-date-block input[type="date"]:disabled::-webkit-calendar-picker-indicator {
	opacity: 0.35;
}


/* ---------------------------------------
   STEP 9
---------------------------------------- */

.planner-step[data-step="9"] .planner-form-row--checkbox {
	margin-top: 8px;
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: #4f4a42;
	font-size: 14px;
	line-height: 1.55;
	cursor: pointer;
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check input[type="checkbox"] {
	position: relative;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	border: 1.5px solid #b8b1a4;
	border-radius: 4px;
	background: #fff;
	appearance: none;
	-webkit-appearance: none;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check input[type="checkbox"]:checked {
	border-color: var(--planner-accent-strong);
	background: var(--planner-accent);
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 5px;
	width: 5px;
	height: 10px;
	border: solid #1f1f1f;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check input[type="checkbox"]:focus-visible {
	outline: none;
	border-color: var(--planner-accent-strong);
	box-shadow: 0 0 0 3px var(--planner-accent-soft);
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check span {
	display: block;
	flex: 1 1 auto;
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check a {
	color: #1f1f1f;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check a:hover,
.planner-step[data-step="9"] .planner-form-row--checkbox .planner-inline-check a:focus-visible {
	color: var(--planner-accent-strong);
	text-decoration-thickness: 2px;
}

.planner-step[data-step="9"] input[type="email"]:not(:placeholder-shown):invalid {
	border-color: #d64545;
	box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.14);
}

.planner-step[data-step="9"] input[type="email"]:not(:placeholder-shown):valid {
	border-color: #2e9b57;
	box-shadow: 0 0 0 3px rgba(46, 155, 87, 0.14);
}

.planner-step[data-step="9"] input[type="email"]:focus {
	outline: none;
}

.planner-step[data-step="9"] input[type="email"]:focus:invalid {
	border-color: #d64545;
	box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.14);
}

.planner-step[data-step="9"] input[type="email"]:focus:valid {
	border-color: #2e9b57;
	box-shadow: 0 0 0 3px rgba(46, 155, 87, 0.14);
}

.planner-step[data-step="4"],
.planner-step[data-step="5"],
.planner-step[data-step="6"],
.planner-step[data-step="7"],
.planner-step[data-step="8"],
.planner-step[data-step="9"] {
	padding-bottom: 14px;
}


/* ---------------------------------------
   RESPONSIVE DESKTOP / TABLET
---------------------------------------- */

@media (min-width: 768px) {
	html,
	body {
		height: 100%;
		overflow: hidden;
	}

	.planner-page {
		height: 100vh;
		height: 100dvh;
		min-height: 0;
		overflow: hidden;
		padding: 32px 20px 0;
	}

	body.page.admin-bar .planner-page {
		height: calc(100vh - 32px);
		height: calc(100dvh - 32px);
		min-height: 0;
	}

	.planner-shell {
		display: flex;
		flex-direction: column;
		height: 100%;
		min-height: 0;
		padding: 0 20px;
		overflow: hidden;
	}

	.planner-header {
		flex: 0 0 auto;
		width: 100%;
		max-width: 620px;
		margin-bottom: 18px;
	}

	.planner-steps {
		flex: 1 1 auto;
		min-height: 0;
		padding-bottom: 0;
		overflow: hidden;
	}

	.planner-step {
		width: 100%;
		max-width: 920px;
		height: 100%;
	}

	.planner-step.is-active {
		display: flex;
		flex-direction: column;
		min-height: 0;
		height: 100%;
	}

	.planner-step-scroll {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		overflow-x: hidden;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-y: contain;
		padding: 0 0 calc(var(--planner-action-bar-height) + 20px);
	}

	.planner-nav-global {
		padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
	}
}


/* ---------------------------------------
   RESPONSIVE MOBILE
---------------------------------------- */

@media (max-width: 767px) {
	html,
	body {
		height: auto;
		overflow-x: hidden;
		overflow-y: auto;
	}

	body .wrap,
	.site-main {
		padding-left: 0;
		padding-right: 0;
	}

	.planner-page {
		height: auto;
		min-height: 100vh;
		overflow: visible;
		padding: 24px 14px 0;
	}

	body.page.admin-bar .planner-page {
		height: auto;
		min-height: calc(100vh - 32px);
	}

	.planner-shell {
		display: block;
		height: auto;
		min-height: 0;
		overflow: visible;
		padding: 0 10px;
		--planner-action-bar-height: 96px;
	}

	.planner-header {
		margin-bottom: 12px;
	}

	.planner-steps {
		height: auto;
		min-height: 0;
		overflow: visible;
		padding-bottom: calc(var(--planner-action-bar-height) + var(--planner-safe-bottom) + 24px);
	}

	.planner-step,
	.planner-step.is-active {
		height: auto;
		min-height: 0;
		overflow: visible;
		padding-bottom: 0;
	}

	.planner-step-scroll {
		overflow: visible;
		padding-bottom: 0;
	}

    .planner-nav-global {
    	position: fixed;
    	left: 0;
    	right: 0;
    	bottom: 0;
    	z-index: 99999;
    	display: flex;
    	flex-direction: column;
    	justify-content: flex-end;
    	gap: 10px;
    	padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    	background: #fff;
    	border-top: 1px solid #ece6da;
    	box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.06);
    	-webkit-backdrop-filter: none;
    	backdrop-filter: none;
    	transform: none;
    	will-change: auto;
    }


	.planner-options-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.planner-duration-grid,
	#planner-children-dobs,
	.planner-date-range-block,
	.planner-step[data-step="4"] .planner-date-range-block {
		grid-template-columns: 1fr;
	}

	.planner-card-option-media img {
		height: 120px;
	}

	.planner-step-intro h2 {
		font-size: 26px;
	}
}

@media (max-width: 640px) {
	.planner-page {
		padding: 0;
	}

	.planner-shell {
		padding: 24px 10px 0;
	}

	#planner-children-dobs,
	.planner-date-range-block {
		grid-template-columns: 1fr;
	}

	.planner-card-option-media img {
		height: 120px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.planner-card-option,
	.planner-duration-option,
	.counter-btn,
	#planner-global-next,
	#planner-global-prev,
	.planner-progress-bar span {
		transition: none;
	}
}

@media (max-width: 767px) {
	.planner-page,
	.planner-shell,
	.planner-steps,
	.planner-step,
	.planner-step.is-active,
	.planner-step-scroll {
		transform: none !important;
		filter: none !important;
		perspective: none !important;
		contain: none !important;
	}
	
	.planner-date-range-block,
	.planner-step[data-step="4"] .planner-date-range-block,
	.planner-date-range-block > p,
	.planner-step[data-step="4"] .planner-date-range-block > p {
		min-width: 0;
		width: 100%;
	}

	.planner-date-block input[type="date"],
	.planner-step[data-step="4"] .planner-date-range-block input[type="date"] {
		width: 100%;
		min-width: 0;
		max-width: 100%;
		box-sizing: border-box;
	}
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}