/* ==========================================================================
   Forms (built-in lead forms, see inc/forms.php + template-parts/components/form-*.php)
   UI kit: 54px fields, 12px radius, Field background, Ink focus ring on Sand.
   ========================================================================== */

.jdc-form { display: grid; gap: 24px; font-family: var(--jdc-font-body); }
.jdc-form[hidden] { display: none; }
.jdc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.jdc-field { grid-column: 1 / -1; display: grid; align-content: start; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.jdc-field--half { grid-column: span 1; }
@media (max-width: 560px) { .jdc-field--half { grid-column: 1 / -1; } }

.jdc-field__label { padding: 0; font-size: 14px; font-weight: 500; color: var(--jdc-ink); }
.jdc-field__optional { font-weight: 400; color: var(--jdc-muted); }
.jdc-field__help { font-size: 13px; color: var(--jdc-muted); }
.jdc-field__error { font-size: 13px; color: var(--jdc-crimson); }

.jdc-input {
	width: 100%;
	height: 54px;
	padding: 0 18px;
	border: 1px solid var(--jdc-rule-strong);
	border-radius: var(--jdc-r-field);
	background: var(--jdc-field);
	color: var(--jdc-ink);
	font-size: 16px;
	outline: none;
	transition: border-color .2s, background .2s, box-shadow .2s;
	-webkit-appearance: none;
	appearance: none;
}
textarea.jdc-input { height: auto; min-height: 120px; padding: 14px 18px; line-height: 1.5; resize: vertical; }
select.jdc-input {
	padding-right: 48px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A6530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 20px;
}
.jdc-input::placeholder { color: #9A9189; }
.jdc-input:focus { border-color: var(--jdc-ink); background-color: var(--jdc-white); box-shadow: 0 0 0 4px var(--jdc-sand); }
.jdc-field.has-error .jdc-input { border-color: var(--jdc-crimson); background-color: var(--jdc-white); }

/* Radios (visually hidden input, styled label) */
.jdc-choice__option input,
.jdc-topic input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* Time: pills (booking form) */
.jdc-choice__options { display: flex; flex-wrap: wrap; gap: 8px; }
.jdc-choice__option { position: relative; }
.jdc-choice__option span {
	display: inline-flex; align-items: center; justify-content: center;
	height: 46px; padding: 0 22px;
	border: 1px solid var(--jdc-rule-strong); border-radius: var(--jdc-r-pill);
	background: var(--jdc-white); color: var(--jdc-ink); font-size: 15px;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.jdc-choice__option span:hover { border-color: var(--jdc-ink); }
.jdc-choice__option input:checked + span { background: var(--jdc-ink); border-color: var(--jdc-ink); color: var(--jdc-marble); }
@media (max-width: 480px) {
	.jdc-choice--pills .jdc-choice__options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.jdc-choice--pills .jdc-choice__option span { width: 100%; padding: 0 8px; }
}
.jdc-choice__option input:focus-visible + span { outline: var(--jdc-focus); outline-offset: 3px; }

/* Time: segmented track (contact form) */
.jdc-choice--track .jdc-choice__options {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
	padding: 6px; border-radius: var(--jdc-r-pill); background: var(--jdc-sand);
}
.jdc-choice--track .jdc-choice__option span { width: 100%; height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--jdc-muted); font-weight: 500; }
.jdc-choice--track .jdc-choice__option input:checked + span { background: var(--jdc-white); color: var(--jdc-ink); box-shadow: 0 4px 12px -4px rgba(42, 33, 24, .25); }

/* Topic cards (contact form: "How can we help?") */
.jdc-topics { margin: 0; padding: 0; border: 0; min-width: 0; }
.jdc-topics__title {
	padding: 0; margin-bottom: 26px;
	font-family: var(--jdc-font-heading); font-size: clamp(32px, 3.2vw, 46px); font-weight: 500; line-height: 1.06; color: var(--jdc-ink);
}
.jdc-topics__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .jdc-topics__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.jdc-topic { position: relative; display: flex; }
.jdc-topic__card {
	display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%;
	padding: 16px; border: 1px solid var(--jdc-rule); border-radius: var(--jdc-r-tile);
	background: var(--jdc-field); color: var(--jdc-ink);
	font-size: 15px; font-weight: 500; line-height: 1.3; cursor: pointer; transition: all .2s;
}
.jdc-topic__card:hover { border-color: var(--jdc-gold); }
.jdc-topic__icon {
	width: 44px; height: 44px; border-radius: var(--jdc-r-field);
	background: var(--jdc-sand); color: var(--jdc-gold-text);
	display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s;
}
.jdc-topic__icon .jdc-icon { width: 24px; height: 24px; }
.jdc-topic input:checked + .jdc-topic__card { background: var(--jdc-ink); border-color: var(--jdc-ink); color: var(--jdc-marble); }
.jdc-topic input:checked + .jdc-topic__card .jdc-topic__icon { background: var(--jdc-gold); color: var(--jdc-ink); }
.jdc-topic input:focus-visible + .jdc-topic__card { outline: var(--jdc-focus); outline-offset: 3px; }

/* Honeypot */
.jdc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Submit + messages */
.jdc-form__submit { margin-top: 6px; }
.jdc-form__submit .jdc-icon { width: 20px; height: 20px; }
.jdc-form__submit[disabled] { opacity: .75; cursor: progress; }
.jdc-form__privacy {
	margin-top: -10px;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	font-size: 13px; line-height: 1.5; color: var(--jdc-muted); text-align: center;
}
.jdc-form__privacy .jdc-icon { width: 16px; height: 16px; }
.jdc-form__alert { padding: 14px 18px; border-radius: 14px; background: var(--jdc-crimson-tint); color: var(--jdc-crimson); font-size: 15px; }
.jdc-form__alert[hidden] { display: none; }

/* Thank-you */
.jdc-form-thanks {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; padding: 32px 0; outline: none; animation: jdcRise .5s var(--jdc-ease) both;
}
.jdc-form-thanks[hidden] { display: none; }
.jdc-form-thanks h3 { margin-top: 24px; font-size: clamp(30px, 3vw, 42px); line-height: 1.1; }
.jdc-form-thanks p { margin: 12px auto 0; max-width: 24em; font-size: 18px; line-height: 1.7; color: var(--jdc-text); }
.jdc-form-thanks .jdc-form-thanks__note { font-size: 14px; color: var(--jdc-muted); }
.jdc-form-thanks .jdc-btn { margin-top: 24px; }
