/* =====================================================================
   Colonial Hunting — Booking Enquiry
   Everything is scoped to .chb / .chb-wrap. Selectors are written to
   out-rank Hello Elementor's reset.css (button:hover pink, input borders)
   without using !important.
   Palette: Parchment #F3EBD9 · Khaki #C7B58A · Leather #6B4423
            Olive #556B45 · Brass #A7854A · Charcoal #2B2B2B
   ===================================================================== */

.chb-wrap,
.chb {
	--_ink: var(--chb-ink, #3A3329);
	--_heading: var(--chb-heading, #2B2B2B);
	--_leather: var(--chb-leather, #6B4423);
	--_brass: var(--chb-brass, #A7854A);
	--_olive: var(--chb-olive, #556B45);
	--_field: var(--chb-field, #FFFDF7);
	--_paper: var(--chb-paper, #F3EBD9);
	--_line: rgba(107, 68, 35, 0.28);
	--_err: #9B2C1F;
}

.chb-wrap,
.chb {
	font-family: "Lora", Georgia, serif;
	color: var(--_ink);
}
.chb-wrap {
	box-sizing: border-box;
	max-width: 920px;
	margin: 0 auto;
	padding: 0;
	font-family: "Lora", Georgia, serif;
	color: var(--_ink);
}
.chb-panel-yes .chb-wrap,
.chb {
	font-family: "Lora", Georgia, serif;
	color: var(--_ink);
}
.chb-wrap {
	padding: clamp(24px, 5vw, 56px) clamp(18px, 5vw, 60px);
	background-color: var(--_paper);
	background-image: radial-gradient(ellipse at center, rgba(255, 253, 247, 0.65) 0%, rgba(199, 181, 138, 0.18) 100%);
	border: 1px solid rgba(167, 133, 74, 0.45);
	box-shadow: 0 18px 40px rgba(40, 28, 12, 0.18), inset 0 0 60px rgba(167, 133, 74, 0.12);
	border-radius: 3px;
}
.chb-wrap *,
.chb * { box-sizing: border-box; }

/* ---------- Header ---------- */
.chb-wrap .chb-head { text-align: center; margin: 0 0 clamp(20px, 4vw, 36px); }
.chb-wrap .chb-title {
	margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 500;
	font-size: clamp(30px, 6vw, 52px); line-height: 1.05; text-transform: uppercase;
	letter-spacing: 0.5px; color: var(--_heading);
}
.chb-wrap .chb-sub {
	margin: 4px 0 0; font-family: "Caveat", cursive; font-size: clamp(22px, 4vw, 30px);
	line-height: 1.2; color: var(--_leather);
}
.chb-wrap .chb-intro { max-width: 640px; margin: 14px auto 0; font-size: 16px; line-height: 1.7; }

/* ---------- Form structure ---------- */
.chb .chb-form { margin: 0; }
.chb .chb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chb [hidden] { display: none !important; }

.chb .chb-step {
	margin: 0 0 clamp(22px, 4vw, 32px); padding: 0; border: 0; min-width: 0;
}
.chb .chb-legend {
	display: flex; align-items: center; gap: 12px; width: 100%;
	margin: 0 0 16px; padding: 0 0 10px;
	font-family: "Playfair Display", Georgia, serif; font-size: clamp(18px, 3.4vw, 22px); font-weight: 600;
	letter-spacing: 1px; text-transform: uppercase; color: var(--_heading);
	border-bottom: 1px solid var(--_line);
}
.chb .chb-num {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 34px; height: 34px; border: 1px solid var(--_brass); border-radius: 50%;
	font-size: 13px; letter-spacing: 0; color: var(--_leather); background: rgba(255, 253, 247, 0.6);
}

.chb .chb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 16px; }
.chb .chb-field { display: flex; flex-direction: column; min-width: 0; margin-bottom: 16px; }
.chb .chb-grid .chb-field { margin-bottom: 0; }
.chb .chb-field--half { max-width: calc(50% - 10px); }

.chb .chb-label {
	display: block; margin: 0 0 6px; font-family: "Lora", Georgia, serif;
	font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--_leather);
}
.chb .chb-req { color: var(--_err); }
.chb .chb-opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: #7a6c55; }

/* Inputs — 16px text stops iOS Safari zooming the page on focus. */
.chb .chb-input {
	display: block; width: 100%; min-height: 48px; margin: 0;
	padding: 11px 14px;
	font-family: "Lora", Georgia, serif; font-size: 16px; line-height: 1.4; color: var(--_ink);
	background-color: var(--_field);
	border: 1px solid rgba(107, 68, 35, 0.35); border-radius: 3px;
	box-shadow: inset 0 1px 3px rgba(40, 28, 12, 0.08);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none; appearance: none;
}
.chb textarea.chb-input { min-height: 120px; resize: vertical; }
.chb select.chb-input {
	padding-right: 40px; cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--_leather) 50%), linear-gradient(135deg, var(--_leather) 50%, transparent 50%);
	background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
	background-size: 6px 6px; background-repeat: no-repeat;
}
.chb input[type="date"].chb-input { min-width: 0; }
.chb input[type="date"].chb-input::-webkit-date-and-time-value { text-align: left; }
.chb .chb-input::placeholder { color: #9d8f76; opacity: 1; }
.chb .chb-input:focus {
	outline: none; border-color: var(--_brass);
	box-shadow: 0 0 0 3px rgba(167, 133, 74, 0.25);
}
.chb .chb-input:focus-visible { outline: 2px solid var(--_leather); outline-offset: 1px; }
.chb .is-invalid .chb-input,
.chb .chb-input.is-invalid { border-color: var(--_err); box-shadow: 0 0 0 3px rgba(155, 44, 31, 0.14); }

/* ---------- Hunt cards (radio) ---------- */
.chb .chb-hunts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.chb .chb-hunt { position: relative; display: block; margin: 0; cursor: pointer; }
.chb .chb-hunt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chb .chb-hunt-card {
	display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 84px;
	padding: 14px 16px 14px 44px; position: relative;
	background: rgba(255, 253, 247, 0.7); border: 1px solid rgba(107, 68, 35, 0.3); border-radius: 3px;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.chb .chb-hunt-card::before {
	content: ""; position: absolute; left: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
	border: 1px solid var(--_leather); border-radius: 50%; background: #fff;
	transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.chb .chb-hunt-title {
	font-family: "Playfair Display", Georgia, serif; font-size: 17px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; color: var(--_heading);
}
.chb .chb-hunt-region { margin-top: 3px; font-size: 13px; line-height: 1.35; color: #6a5c46; }
.chb .chb-hunt:hover .chb-hunt-card { border-color: var(--_brass); }
.chb .chb-hunt input:checked + .chb-hunt-card {
	border-color: var(--_leather); background: #fffaf0;
	box-shadow: 0 6px 16px rgba(40, 28, 12, 0.12), inset 0 0 0 1px var(--_leather);
}
.chb .chb-hunt input:checked + .chb-hunt-card::before { background: var(--_leather); box-shadow: inset 0 0 0 3px #fff; }
.chb .chb-hunt input:focus-visible + .chb-hunt-card { outline: 2px solid var(--_leather); outline-offset: 2px; }
.chb .is-invalid .chb-hunt-card { border-color: var(--_err); }

/* ---------- Species chips ---------- */
.chb .chb-species { margin-top: 18px; }
.chb.chb-js .chb-species { display: none; }
.chb.chb-js .chb-species.is-active { display: block; animation: chbFade 0.3s ease; }
.chb .chb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chb .chb-chip { position: relative; margin: 0; cursor: pointer; }
.chb .chb-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chb .chb-chip span {
	display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
	font-size: 14px; line-height: 1.2; color: var(--_ink);
	background: rgba(255, 253, 247, 0.7); border: 1px solid rgba(107, 68, 35, 0.3); border-radius: 999px;
	transition: all 0.2s ease;
}
.chb .chb-chip input:checked + span { background: var(--_leather); border-color: var(--_leather); color: #F3EBD9; }
.chb .chb-chip input:focus-visible + span { outline: 2px solid var(--_leather); outline-offset: 2px; }

/* ---------- Checkboxes ---------- */
.chb .chb-check { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 0; font-size: 15px; line-height: 1.5; cursor: pointer; }
.chb .chb-check input {
	flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--_leather); cursor: pointer;
}
.chb .chb-check a { color: var(--_leather); text-decoration: underline; border: 0; padding: 0; }
.chb .chb-consent { margin: 0 0 22px; padding: 14px 16px; background: rgba(255, 253, 247, 0.55); border: 1px dashed rgba(107, 68, 35, 0.35); border-radius: 3px; }
.chb .chb-consent.is-invalid { border-color: var(--_err); border-style: solid; }

/* ---------- Submit (out-ranks Hello's button:hover) ---------- */
.chb .chb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.chb button.chb-submit,
.chb button.chb-submit:focus {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 54px; padding: 14px 38px; margin: 0;
	font-family: "Playfair Display", Georgia, serif; font-size: 16px; font-weight: 600;
	letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.2; white-space: normal;
	color: #F3EBD9; background-color: var(--_olive);
	border: 1px solid var(--_brass); border-radius: 3px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 14px rgba(40, 28, 12, 0.18);
	cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.chb button.chb-submit:hover { background-color: var(--_brass); color: #2B2B2B; border-color: var(--_brass); }
.chb button.chb-submit:focus-visible { outline: 2px solid var(--_leather); outline-offset: 3px; }
.chb button.chb-submit:active { transform: translateY(1px); }
.chb button.chb-submit[disabled] { opacity: 0.75; cursor: progress; }
.chb .chb-submit.is-loading::before {
	content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent;
	border-radius: 50%; animation: chbSpin 0.8s linear infinite;
}
.chb .chb-note { flex: 1 1 240px; margin: 0; font-size: 13px; line-height: 1.5; color: #6a5c46; font-style: italic; }

/* ---------- Messages ---------- */
.chb .chb-alert {
	margin: 0 0 20px; padding: 12px 16px; font-size: 15px; line-height: 1.5;
	color: var(--_err); background: #fbeeea; border: 1px solid rgba(155, 44, 31, 0.35); border-left-width: 4px; border-radius: 3px;
}
.chb .chb-done {
	padding: clamp(24px, 5vw, 40px); text-align: center;
	background: rgba(255, 253, 247, 0.75); border: 1px solid var(--_brass); border-radius: 3px;
	animation: chbFade 0.4s ease;
}
.chb .chb-done:focus { outline: none; }
.chb .chb-done-title {
	margin: 0 0 10px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(24px, 5vw, 32px);
	text-transform: uppercase; color: var(--_heading);
}
.chb .chb-done p { margin: 0 0 8px; font-size: 16px; line-height: 1.7; }
.chb .chb-done-ref { font-family: "Caveat", cursive; font-size: 24px; color: var(--_leather); }

@keyframes chbSpin { to { transform: rotate(360deg); } }
@keyframes chbFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.chb .chb-grid { grid-template-columns: 1fr; gap: 14px; }
	.chb .chb-field--half { max-width: none; }
	.chb .chb-hunts { grid-template-columns: 1fr; gap: 10px; }
	.chb .chb-hunt-card { min-height: 64px; }
	.chb .chb-actions { flex-direction: column; align-items: stretch; }
	.chb button.chb-submit { width: 100%; padding-left: 20px; padding-right: 20px; }
	.chb .chb-note { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.chb *, .chb *::before { animation: none !important; transition: none !important; }
}
