/* SWDS "Plan your home" planner. Uses theme tokens with fallbacks. */
.swds-planner {
	--p-accent: var(--swds-accent, #CA8A04);
	--p-black: var(--swds-black, #171717);
	--p-surface: var(--swds-surface, #F2F0EC);
	--p-line: rgba(23, 23, 23, 0.1);
	--p-ease: cubic-bezier(.2, .7, .2, 1);
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}
.swds-planner__main { min-width: 0; padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid var(--p-line); border-radius: 28px; background: #fff; box-shadow: 0 30px 70px -45px rgba(23, 23, 23, 0.4); }
.swds-planner h2 { margin: 0 0 1.5rem; font-size: clamp(1.6rem, 3vw, 2.25rem); outline: none; }

/* Progress */
.swds-planner__progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin: 0 0 2rem; padding: 0; list-style: none; counter-reset: none; }
.swds-planner__progress li { position: relative; padding-top: 0.9rem; color: rgba(23, 23, 23, 0.62); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.swds-planner__progress li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--p-line); transition: background-color .4s; }
.swds-planner__progress li span { display: none; }
.swds-planner__progress li.is-done,
.swds-planner__progress li.is-current { color: var(--p-black); }
.swds-planner__progress li.is-done::before,
.swds-planner__progress li.is-current::before { background: var(--p-accent); }

/* Steps animate in */
.swds-planner__step:not([hidden]) { animation: swds-pl-in .5s var(--p-ease) both; }
@keyframes swds-pl-in { from { opacity: 0; transform: translateX(24px); } }

/* Choice cards */
.swds-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.swds-choices.is-row { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.swds-choices.is-multi { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.swds-choice {
	position: relative;
	display: grid;
	gap: 0.15rem;
	padding: 1rem 1.1rem;
	border: 1.5px solid var(--p-line);
	border-radius: 18px;
	background: #fff;
	color: var(--p-black);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .2s, background-color .2s, transform .2s var(--p-ease), box-shadow .2s;
}
.swds-choice strong { font-family: var(--wp--preset--font-family--display, inherit); font-size: 1rem; font-weight: 500; }
.swds-choice span { color: #6b6d69; font-size: 0.8125rem; }
.swds-choice:hover { border-color: rgba(202, 138, 4, 0.7); transform: translateY(-2px); }
.swds-choice:focus-visible { outline: 3px solid var(--p-accent); outline-offset: 2px; }
.swds-choice.is-on { border-color: var(--p-black); background: var(--p-black); color: #fff; box-shadow: 0 14px 30px -18px rgba(23, 23, 23, 0.7); }
.swds-choice.is-on span { color: rgba(255, 255, 255, 0.65); }
.swds-choice.is-on::after { content: "✓"; position: absolute; top: 0.7rem; right: 0.8rem; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--p-accent); color: var(--p-black); font-size: 0.75rem; font-weight: 900; animation: swds-pl-pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes swds-pl-pop { from { transform: scale(0); } }

.swds-planner__q { margin: 1.5rem 0 0.6rem !important; color: var(--p-black) !important; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.swds-planner__step > .swds-planner__q:first-of-type { margin-top: 0 !important; }
.swds-planner__label { display: grid; gap: 0.4rem; margin-top: 1.5rem; color: var(--p-black); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.swds-planner input[type="text"],
.swds-planner input[type="tel"],
.swds-planner input[type="email"],
.swds-planner input[type="number"] {
	box-sizing: border-box;
	width: 100%;
	max-width: 22rem;
	padding: 0.85rem 1rem;
	border: 1.5px solid var(--p-line);
	border-radius: 14px;
	background: #fff;
	color: var(--p-black);
	font: inherit;
	font-size: 1rem;
	letter-spacing: 0;
	text-transform: none;
}
.swds-planner input:focus { border-color: var(--p-accent); outline: none; box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.22); }
.swds-planner__custom { margin: 1rem 0 0 !important; }
.swds-planner__custom label { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; font-weight: 600; }
.swds-planner__custom input { width: 9rem !important; }

.swds-planner__inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 1.75rem; }
.swds-switch { display: inline-flex; gap: 0.75rem; align-items: center; font-weight: 600; cursor: pointer; }
.swds-switch input { position: absolute; opacity: 0; }
.swds-switch span { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--p-line); transition: background-color .25s; }
.swds-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform .3s var(--p-ease); }
.swds-switch input:checked + span { background: var(--p-accent); }
.swds-switch input:checked + span::after { transform: translateX(20px); }
.swds-switch input:focus-visible + span { outline: 3px solid var(--p-accent); outline-offset: 2px; }
.swds-stepper { display: inline-flex; gap: 0.6rem; align-items: center; }
.swds-stepper .swds-planner__q { margin: 0 0.4rem 0 0 !important; }
.swds-stepper button { width: 40px; height: 40px; border: 1.5px solid var(--p-line); border-radius: 50%; background: #fff; color: var(--p-black); font: inherit; font-size: 1.25rem; cursor: pointer; transition: background-color .2s, border-color .2s; }
.swds-stepper button:hover { border-color: var(--p-accent); background: var(--p-accent); }
.swds-stepper output { min-width: 2ch; font-family: var(--wp--preset--font-family--display, inherit); font-size: 1.5rem; font-weight: 500; text-align: center; }

/* Nav */
.swds-planner__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--p-line); }
.swds-planner__nav button,
.swds-planner__primary {
	padding: 0.95em 1.7em;
	border: 0;
	border-radius: 999px;
	background: var(--p-accent);
	color: var(--p-black);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .25s, color .25s, opacity .25s, transform .25s var(--p-ease);
}
.swds-planner__nav button:hover:not(:disabled),
.swds-planner__primary:hover:not(:disabled) { background: var(--p-black); color: #fff; transform: translateY(-2px); }
.swds-planner__nav button:disabled { cursor: not-allowed; opacity: 0.4; }
.swds-planner__back { background: transparent !important; color: var(--p-black) !important; }
.swds-planner__next { margin-left: auto; }
.swds-planner[data-step="4"] .swds-planner__nav { margin-top: 1rem; padding-top: 0; border: 0; }

/* Results */
.swds-planner__result { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0.75rem; }
.swds-planner__result > div { padding: 1.4rem; border-radius: 20px; background: var(--p-black); color: #fff; }
.swds-planner__time { background: var(--p-accent) !important; color: var(--p-black) !important; }
.swds-planner__result p { margin: 0 0 0.4rem !important; color: inherit !important; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; opacity: 0.7; text-transform: uppercase; }
.swds-planner__result strong { display: block; font-family: var(--wp--preset--font-family--display, inherit); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.swds-planner__area strong { color: var(--p-accent); }
.swds-planner__result span { display: block; margin-top: 0.4rem; font-size: 0.8125rem; opacity: 0.7; }

/* Timeline chart */
.swds-gantt { margin: 1.25rem 0 0; padding: 1.25rem; border-radius: 20px; background: var(--p-surface); }
.swds-gantt__row { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; align-items: center; padding: 0.45rem 0; }
.swds-gantt__label { font-size: 0.875rem; font-weight: 700; }
.swds-gantt__label small { display: block; color: #6b6d69; font-size: 0.75rem; font-weight: 500; }
.swds-gantt__track { position: relative; height: 14px; border-radius: 999px; background: rgba(23, 23, 23, 0.06); }
.swds-gantt__bar { position: absolute; top: 0; bottom: 0; left: var(--start); width: 0; border-radius: 999px; background: var(--p-black); transition: width 1s var(--p-ease) calc(var(--i, 0) * .18s + .2s); }
.swds-gantt__row { --i: 0; }
.swds-gantt.is-in .swds-gantt__bar { width: var(--width); }
.swds-gantt__bar.is-design { background: #6b6d69; }
.swds-gantt__bar.is-grey { background: #8a8780; }
.swds-gantt__bar.is-finish { background: var(--p-accent); }
.swds-gantt__bar.is-landscape { background: #4d6a3a; }
.swds-gantt__axis { display: flex; justify-content: space-between; margin: 0.4rem 0 0 12rem; color: #6b6d69; font-size: 0.75rem; }
.swds-planner__disclaimer { margin: 0.9rem 0 0 !important; font-size: 0.8125rem; }

/* Send */
.swds-planner__send { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--p-line); }
.swds-planner__send h3 { margin: 0 0 1rem; font-size: 1.25rem; }
.swds-planner__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; }
.swds-planner__fields label { display: grid; gap: 0.35rem; font-size: 0.8125rem; font-weight: 700; }
.swds-planner__fields input { max-width: none !important; }
.swds-planner .swds-hp { position: absolute; left: -9999px; }
.swds-planner__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.25rem; }
.swds-planner__wa { padding: 0.95em 1.5em; border: 1.5px solid #25D366; border-radius: 999px; color: #128C7E; font-weight: 700; text-decoration: none; transition: background-color .2s, color .2s; }
.swds-planner__wa:hover { background: #25D366; color: #fff; }
.swds-planner__msg { margin: 1rem 0 0 !important; font-weight: 600; }
.swds-planner__msg:empty { display: none; }
.swds-planner__msg.is-success { padding: 0.9rem 1.1rem; border-radius: 14px; background: #ecfdf3; color: #05603a !important; }
.swds-planner__msg.is-error { padding: 0.9rem 1.1rem; border-radius: 14px; background: #fef3f2; color: #b42318 !important; }
.swds-planner__send.is-sent .swds-planner__fields { opacity: 0.5; pointer-events: none; }

/* Live sketch */
.swds-planner__visual { position: sticky; top: 110px; padding: 1.25rem; border-radius: 28px; background: var(--p-black) radial-gradient(circle at 50% 40%, rgba(202, 138, 4, 0.12), transparent 60%); color: #fff; }
.swds-iso { display: block; width: 100%; height: auto; overflow: visible; }
.swds-iso .plot { fill: rgba(255, 255, 255, 0.03); stroke: rgba(255, 255, 255, 0.25); stroke-width: 1.2; stroke-dasharray: 5 5; transition: all .5s var(--p-ease); }
.swds-iso .plot.is-set { fill: rgba(202, 138, 4, 0.07); stroke: var(--p-accent); stroke-dasharray: none; }
.swds-iso .plot-cover { fill: rgba(23, 23, 23, 0.55); stroke: var(--p-accent); stroke-width: 1.2; }
.swds-iso .face { stroke: rgba(23, 23, 23, 0.6); stroke-width: 0.8; stroke-linejoin: round; }
.swds-iso .face.is-left { fill: #3b3c37; }
.swds-iso .face.is-right { fill: #2a2b27; }
.swds-iso .face.is-top { fill: #55564f; stroke: var(--p-accent); stroke-width: 1.2; }
.swds-iso .win { fill: rgba(202, 138, 4, 0.85); stroke: none; }
.swds-iso .level.is-basement .face { fill: #1d1e1b; stroke: rgba(202, 138, 4, 0.6); stroke-dasharray: 3 3; }
.swds-iso .level.is-basement .win { fill: rgba(202, 138, 4, 0.3); }
.swds-iso .level.is-new { animation: swds-iso-drop .7s cubic-bezier(.3, 1.4, .5, 1) calc(var(--i, 0) * .12s) both; }
@keyframes swds-iso-drop { from { opacity: 0; transform: translateY(-46px); } }
.swds-iso .tree { fill: #4d6a3a; stroke: #6d8f55; stroke-width: 1; transform-box: fill-box; transform-origin: center bottom; animation: swds-tree .6s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i, 0) * .1s) both; }
@keyframes swds-tree { from { transform: scale(0); } }
.swds-planner__summary { display: grid; gap: 0.55rem; margin: 0.75rem 0 0; padding: 1rem 0 0; border-top: 1px solid rgba(255, 255, 255, 0.12); list-style: none; font-size: 0.875rem; }
.swds-planner__summary li { color: rgba(255, 255, 255, 0.85); }
.swds-planner__summary li span { display: block; color: var(--p-accent); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

@media (max-width: 960px) {
	.swds-planner { grid-template-columns: 1fr; }
	.swds-planner__visual { position: static; order: -1; display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; align-items: center; padding: 1rem; }
	.swds-planner__summary { margin: 0; padding: 0; border: 0; font-size: 0.8125rem; }
}
@media (max-width: 560px) {
	.swds-planner__visual { grid-template-columns: 8rem 1fr; }
	.swds-planner__result { grid-template-columns: 1fr; }
	.swds-gantt__row { grid-template-columns: 1fr; gap: 0.3rem; }
	.swds-gantt__axis { margin-left: 0; }
	.swds-choices { grid-template-columns: 1fr 1fr; }
	.swds-choices.is-row,
	.swds-choices.is-multi { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.swds-planner *,
	.swds-planner *::after { animation: none !important; transition: none !important; }
}
