/**
 * HOLY DOG — Kontakt (/kontakt/) + Contact Form 7.
 * See docs/contact-form-7-setup.md
 *
 * @package HolydogChild
 */

/* ══════════════════════════════════════════════════════════════
   4. KONTAKT
   ══════════════════════════════════════════════════════════════ */

.hd-kontakt__split {
	align-items: start;
	row-gap: var(--hd-space-7);
}

.hd-kontakt__aside {
	padding: var(--hd-space-5);
	background-color: var(--hd-surface-sunken);
	border: 1px solid var(--hd-border-color);
	border-radius: var(--hd-radius-card);
}

.hd-kontakt__aside-title {
	font-size: var(--hd-text-xl);
	margin: 0 0 var(--hd-space-4);
}

.hd-contact-list {
	display: flex;
	flex-direction: column;
	gap: var(--hd-space-3);
	margin: 0 0 var(--hd-space-5);
}

.hd-contact-list__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--hd-space-2);
	padding-block-end: var(--hd-space-3);
	border-block-end: 1px solid var(--hd-border-color);
}

.hd-contact-list__row:last-child {
	border-block-end: none;
	padding-block-end: 0;
}

.hd-contact-list dt {
	font-weight: var(--hd-fw-medium);
	color: var(--hd-text-primary);
	margin: 0;
}

.hd-contact-list dd {
	margin: 0;
}

.hd-contact-list a {
	font-variant-numeric: tabular-nums;
	/* 44px hit area without inflating the visible text */
	display: inline-flex;
	align-items: center;
	min-height: var(--hd-touch-min);
}

.hd-kontakt__aside-note {
	font-size: var(--hd-text-sm);
	color: var(--hd-text-secondary);
	margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   5. FAQ
   Native <details>, so it works without JavaScript and is
   keyboard-operable by default.
   ══════════════════════════════════════════════════════════════ */

.hd-faq {
	border-block-start: 1px solid var(--hd-border-color);
}

.hd-faq__item {
	border-block-end: 1px solid var(--hd-border-color);
}

.hd-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hd-space-4);
	min-height: var(--hd-touch-min);
	padding-block: var(--hd-space-4);
	font-size: var(--hd-text-lg);
	font-weight: var(--hd-fw-medium);
	color: var(--hd-text-primary);
	cursor: pointer;
	list-style: none;
}

.hd-faq__q::-webkit-details-marker {
	display: none;
}

.hd-faq__q::after {
	content: "";
	flex: none;
	width: 0.7em;
	height: 0.7em;
	border-right: 2px solid var(--hd-brand-700);
	border-bottom: 2px solid var(--hd-brand-700);
	transform: rotate(45deg) translate(-0.15em, -0.15em);
	transition: transform var(--hd-transition);
}

.hd-faq__item[open] .hd-faq__q::after {
	transform: rotate(225deg) translate(-0.15em, -0.15em);
}

.hd-faq__q:hover {
	color: var(--hd-text-link);
}

.hd-faq__a {
	padding-block-end: var(--hd-space-5);
}

.hd-faq__a p {
	max-width: var(--hd-measure);
	color: var(--hd-text-secondary);
	margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   7. CONTACT FORM 7
   CF7 outputs minimal markup, so this defines the whole look.
   Fields are labelled in the form definition (see
   docs/contact-form-7-setup.md) — the old form had none at all.
   ══════════════════════════════════════════════════════════════ */

.wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: var(--hd-space-5);
}

.hd-field {
	display: flex;
	flex-direction: column;
	gap: var(--hd-space-2);
}

.hd-field > label,
.wpcf7-form label {
	font-size: var(--hd-text-base);
	font-weight: var(--hd-fw-medium);
	color: var(--hd-text-primary);
}

.hd-field__hint {
	font-size: var(--hd-text-sm);
	color: var(--hd-text-secondary);
}

/* Control shape, size, border and placeholder colour come from
   base.css — the same definition the checkout uses. Only the
   full-width behaviour is specific to this form layout. */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
	width: 100%;
}

/* Radio / checkbox groups */
.wpcf7-form .wpcf7-radio,
.wpcf7-form .wpcf7-checkbox,
.wpcf7-form .wpcf7-acceptance {
	display: flex;
	flex-wrap: wrap;
	gap: var(--hd-space-3);
}

.wpcf7-form .wpcf7-list-item {
	margin: 0;
}

.wpcf7-form .wpcf7-list-item label {
	display: flex;
	align-items: center;
	gap: var(--hd-space-2);
	min-height: var(--hd-touch-min);
	cursor: pointer;
	font-weight: var(--hd-fw-regular);
}

/* Size and accent colour come from base.css. */
.wpcf7-form input[type="radio"],
.wpcf7-form input[type="checkbox"] {
	flex: none;
	margin: 0;
}

.wpcf7-form .wpcf7-acceptance .wpcf7-list-item label {
	align-items: flex-start;
	gap: var(--hd-space-3);
}

.wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label {
	font-size: var(--hd-text-sm);
	color: var(--hd-text-secondary);
	line-height: var(--hd-leading-normal);
}

/* Submit */
.wpcf7-form .wpcf7-submit {
	align-self: flex-start;
	min-height: var(--hd-control-h);
	padding: var(--hd-space-3) var(--hd-space-7);
	background-color: var(--hd-brand-500);
	color: var(--hd-text-on-brand);
	border: 2px solid var(--hd-brand-500);
	border-radius: var(--hd-radius-pill);
	font-family: var(--hd-font-body);
	font-size: var(--hd-text-base);
	font-weight: var(--hd-fw-medium);
	cursor: pointer;
	transition: background-color var(--hd-transition), border-color var(--hd-transition);
}

.wpcf7-form .wpcf7-submit:hover {
	background-color: var(--hd-brand-600);
	border-color: var(--hd-brand-600);
}

.wpcf7-form .wpcf7-submit:disabled {
	background-color: var(--hd-brand-300);
	border-color: var(--hd-brand-300);
	cursor: not-allowed;
}

/* Validation + response messages.
   CF7 defaults to a thin coloured border that is easy to miss; these
   use the semantic tokens and read as proper messages. */
.wpcf7-not-valid-tip {
	font-size: var(--hd-text-sm);
	color: var(--hd-error);
}

.wpcf7-form input.wpcf7-not-valid,
.wpcf7-form select.wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid {
	border-color: var(--hd-error);
	border-width: 2px;
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: var(--hd-space-4) var(--hd-space-5);
	border: 1px solid;
	border-radius: var(--hd-radius-card);
	font-size: var(--hd-text-base);
}

.wpcf7 form.sent .wpcf7-response-output {
	background-color: var(--hd-success-bg);
	border-color: var(--hd-success);
	color: var(--hd-success);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
	background-color: var(--hd-warning-bg);
	border-color: var(--hd-warning);
	color: var(--hd-warning);
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
	background-color: var(--hd-error-bg);
	border-color: var(--hd-error);
	color: var(--hd-error);
}

.wpcf7-spinner {
	margin-inline-start: var(--hd-space-3);
}


/* ══════════════════════════════════════════════════════════════
   7b. CF7 — Elementor contact card (.hd-form-wrap)
   Chip / pet UI from the old Web3Forms HTML; CF7 radios underneath.
   See docs/contact-form-7-setup.md
   ══════════════════════════════════════════════════════════════ */

/* Form column ↔ Standort column (Elementor flex parent has gap:0). */
.e-con.e-parent.e-flex:has(.hd-form-wrap) {
	gap: 28px;
	column-gap: 28px;
}

.hd-form-wrap {
	--hd-cf7-hon: #1e5fd8;
	--hd-cf7-honl: #3b7bf0;
	--hd-cf7-car: #1a4eb0;
	--hd-cf7-nos: #111111;
	--hd-cf7-tm: #2b2b2b;
	--hd-cf7-tl: #8a8a8a;
	--hd-cf7-fl: #f4f7fd;
	--hd-cf7-fw2: #dde6f5;
	--hd-cf7-fs: #b9ccf0;
	--hd-cf7-r-md: 20px;
	--hd-cf7-r-lg: 28px;
	--hd-cf7-r-pill: 999px;

	box-sizing: border-box;
	width: 100%;
	/* !important: leftover Web3Forms HTML embed still sets max-width: 680px */
	max-width: none !important;
	margin-inline: 0;
	font-family: var(--hd-font-body);
	font-size: 15px;
	line-height: 1.6;
	color: var(--hd-cf7-nos);
}

.hd-form-wrap *,
.hd-form-wrap *::before,
.hd-form-wrap *::after {
	box-sizing: border-box;
}

.hd-form-wrap .hd-card {
	background: #fff;
	border-radius: var(--hd-cf7-r-lg);
	border: 2px solid var(--hd-cf7-fw2);
	/* !important: Elementor HTML embed resets .hd-form-wrap * { padding: 0 } at 0,1,1 */
	padding: 40px 44px !important;
	box-shadow: 0 2px 14px rgba(10, 20, 50, 0.07);
	overflow: visible;
	max-width: 100%;
}

.hd-form-wrap .hd-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 28px;
	min-width: 0;
	max-width: 100%;
}

.hd-form-wrap .hd-header-text {
	min-width: 0;
	flex: 1 1 auto;
}

.hd-form-wrap .hd-paw-icon {
	width: 48px;
	height: 48px;
	background: var(--hd-cf7-hon);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 14px rgba(30, 95, 216, 0.38);
	position: relative;
	color: #fff;
}

/* Inline SVG kept for a11y/fallback; visible glyph is the theme asset via mask. */
.hd-form-wrap .hd-paw-icon svg {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.hd-form-wrap .hd-paw-icon::after {
	content: "";
	display: block;
	width: 24px;
	height: 24px;
	background: #fff;
	-webkit-mask: url("../images/hd-paw.svg") center / contain no-repeat;
	mask: url("../images/hd-paw.svg") center / contain no-repeat;
}

.hd-form-wrap .hd-header-eyebrow {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--hd-cf7-hon);
	margin-bottom: 3px;
}

.hd-form-wrap .hd-header-title {
	font-family: var(--hd-font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--hd-cf7-nos);
	line-height: 1.15;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.hd-form-wrap .hd-divider {
	height: 2px;
	background: var(--hd-cf7-fw2);
	border-radius: var(--hd-cf7-r-pill);
	margin-bottom: 26px;
}

.hd-form-wrap .hd-section-label {
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--hd-cf7-nos);
	margin-bottom: 10px;
}

.hd-form-wrap .hd-label {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--hd-cf7-nos);
}

.hd-form-wrap .hd-label .req {
	color: var(--hd-cf7-hon);
}

.hd-form-wrap .hd-optional {
	font-weight: 400;
	color: var(--hd-cf7-tl);
}

/* CF7 wraps our markup: form > .hd-form-wrap > .hd-card */
.wpcf7-form:has(.hd-form-wrap) {
	display: block;
	gap: 0;
}

.hd-form-wrap .hd-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}

.hd-form-wrap .hd-row--full {
	grid-template-columns: 1fr;
}

.hd-form-wrap .hd-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 0;
}

.hd-form-wrap .hd-input,
.hd-form-wrap input.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.hd-form-wrap .hd-textarea,
.hd-form-wrap textarea.wpcf7-form-control {
	height: 50px;
	padding: 0 16px;
	background: var(--hd-cf7-fl);
	border: 2px solid var(--hd-cf7-fw2);
	border-radius: var(--hd-cf7-r-md);
	font-family: inherit;
	font-size: 14.5px;
	color: var(--hd-cf7-nos);
	outline: none;
	width: 100%;
	transition: border-color 0.22s, box-shadow 0.22s;
	-webkit-appearance: none;
	appearance: none;
}

.hd-form-wrap .hd-textarea,
.hd-form-wrap textarea.wpcf7-form-control {
	height: 130px;
	padding: 14px 16px;
	resize: vertical;
	line-height: 1.65;
}

.hd-form-wrap .hd-input::placeholder,
.hd-form-wrap .hd-textarea::placeholder,
.hd-form-wrap input.wpcf7-form-control::placeholder,
.hd-form-wrap textarea.wpcf7-form-control::placeholder {
	color: var(--hd-cf7-tl);
}

.hd-form-wrap .hd-input:focus,
.hd-form-wrap .hd-textarea:focus,
.hd-form-wrap input.wpcf7-form-control:focus,
.hd-form-wrap textarea.wpcf7-form-control:focus {
	border-color: var(--hd-cf7-hon);
	box-shadow: 0 0 0 4px rgba(30, 95, 216, 0.12);
	background: #fff;
}

.hd-form-wrap .wpcf7-not-valid {
	border-color: #d84040 !important;
}

/* Topic chips */
.hd-form-wrap .hd-chips,
.hd-form-wrap .wpcf7-radio.hd-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
}

.hd-form-wrap .hd-chips .wpcf7-list-item {
	margin: 0;
}

.hd-form-wrap .hd-chips .wpcf7-list-item label {
	display: block;
	padding: 8px 16px;
	border-radius: var(--hd-cf7-r-pill);
	border: 2px solid var(--hd-cf7-fw2);
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: var(--hd-cf7-tm);
	cursor: pointer;
	transition: border-color 0.22s, background 0.22s, color 0.22s;
	min-height: 0;
	gap: 0;
}

.hd-form-wrap .hd-chips .wpcf7-list-item label:hover {
	border-color: var(--hd-cf7-fs);
	color: var(--hd-cf7-car);
}

.hd-form-wrap .hd-chips .wpcf7-list-item label:has(input:checked) {
	border-color: var(--hd-cf7-hon);
	background: rgba(30, 95, 216, 0.08);
	color: var(--hd-cf7-hon);
}

.hd-form-wrap .hd-chips input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

/* Pet cards */
.hd-form-wrap .hd-pets,
.hd-form-wrap .wpcf7-radio.hd-pets {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
	margin-bottom: 24px;
}

.hd-form-wrap .hd-pets .wpcf7-list-item {
	margin: 0;
}

.hd-form-wrap .hd-pets .wpcf7-list-item label {
	display: block;
	border: 2px solid var(--hd-cf7-fw2);
	border-radius: var(--hd-cf7-r-md);
	padding: 14px 10px;
	text-align: center;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.22s, background 0.22s;
	min-height: 0;
	gap: 0;
	font-weight: 700;
	font-size: 12.5px;
	color: var(--hd-cf7-nos);
}

.hd-form-wrap .hd-pets .wpcf7-list-item label:hover {
	border-color: var(--hd-cf7-fs);
}

.hd-form-wrap .hd-pets .wpcf7-list-item label:has(input:checked) {
	border-color: var(--hd-cf7-hon);
	background: rgba(30, 95, 216, 0.07);
}

.hd-form-wrap .hd-pets input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.hd-form-wrap .hd-pets .wpcf7-list-item-label::before {
	content: "";
	display: block;
	width: 28px;
	height: 28px;
	margin: 0 auto 5px;
	background: center / contain no-repeat;
}

/* WP Twemoji SVGs — native CSS emoji often misreads as mouse on some fonts */
.hd-form-wrap .hd-pets .wpcf7-list-item:nth-child(1) .wpcf7-list-item-label::before {
	background-image: url("https://s.w.org/images/core/emoji/17.0.2/svg/1f436.svg"); /* dog */
}

.hd-form-wrap .hd-pets .wpcf7-list-item:nth-child(2) .wpcf7-list-item-label::before {
	background-image: url("https://s.w.org/images/core/emoji/17.0.2/svg/1f431.svg"); /* cat */
}

.hd-form-wrap .hd-pets .wpcf7-list-item:nth-child(3) .wpcf7-list-item-label::before {
	background-image: url("https://s.w.org/images/core/emoji/17.0.2/svg/1f43e.svg"); /* paws */
}

/* Privacy */
.hd-form-wrap .wpcf7-form-control-wrap:has(.wpcf7-acceptance),
.hd-form-wrap .wpcf7-acceptance.hd-privacy,
.hd-form-wrap .hd-privacy {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 18px 0 32px;
	min-width: 0;
	max-width: 100%;
}

.hd-form-wrap .hd-privacy .wpcf7-list-item {
	margin: 0;
	min-width: 0;
	flex: 1 1 auto;
}

.hd-form-wrap .hd-privacy .wpcf7-list-item label,
.hd-form-wrap .hd-privacy > label {
	display: block;
	min-width: 0;
	flex: 1 1 auto;
	font-size: 12.5px;
	font-weight: 400;
	color: var(--hd-cf7-tm);
	line-height: 1.6;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.hd-form-wrap .hd-privacy input[type="checkbox"] {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 1px;
	accent-color: var(--hd-cf7-hon);
	cursor: pointer;
	opacity: 1;
	position: static;
	pointer-events: auto;
}

/* Darker + underline: #1E5FD8 alone is weak at 12.5px on white */
.hd-form-wrap .hd-privacy a,
.hd-form-wrap .hd-privacy a:link,
.hd-form-wrap .hd-privacy a:visited {
	color: #163956 !important;
	text-decoration: underline !important;
	text-underline-offset: 0.15em;
	font-weight: 700;
}

.hd-form-wrap .hd-privacy a:hover,
.hd-form-wrap .hd-privacy a:focus {
	color: #10293e !important;
	text-decoration: underline !important;
}

/* Submit */
.hd-form-wrap .hd-submit,
.hd-form-wrap input.wpcf7-submit.hd-submit {
	width: 100%;
	align-self: stretch;
	height: 54px;
	min-height: 54px;
	margin-top: 8px;
	padding: 0 24px;
	background: var(--hd-cf7-hon);
	color: #fff;
	border: none;
	border-radius: var(--hd-cf7-r-pill);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(30, 95, 216, 0.45);
	transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
}

.hd-form-wrap .hd-submit:hover,
.hd-form-wrap input.wpcf7-submit.hd-submit:hover {
	background: var(--hd-cf7-honl);
	border-color: transparent;
	transform: translateY(-2px);
	box-shadow: 0 10px 32px rgba(30, 95, 216, 0.5);
}

.hd-form-wrap .hd-submit:disabled,
.hd-form-wrap input.wpcf7-submit.hd-submit:disabled {
	opacity: 0.75;
	cursor: not-allowed;
	transform: none;
	background: var(--hd-cf7-hon);
}

.hd-form-wrap .wpcf7-spinner {
	margin-inline-start: 0;
	position: absolute;
}

.hd-form-wrap .wpcf7-form-control-wrap {
	position: relative;
}

.hd-form-wrap .wpcf7-not-valid-tip {
	font-size: 12px;
	color: #d84040;
	margin-top: 4px;
}

/* Response sits after .hd-form-wrap (CF7 injects it at form end) */
.wpcf7-form:has(.hd-form-wrap) .wpcf7-response-output {
	max-width: none;
	width: 100%;
	margin: 14px 0 0;
	border-radius: 20px;
	padding: 14px 18px;
	font-size: 13.5px;
	line-height: 1.65;
}

@media (max-width: 520px) {
	.hd-form-wrap .hd-card {
		padding: 28px 22px !important;
	}

	.hd-form-wrap .hd-row {
		grid-template-columns: 1fr;
	}

	.hd-form-wrap .hd-header-title {
		font-size: 22px;
	}
}

/* ══════════════════════════════════════════════════════════════
   Elementor Standort-Karten (icon-box + icon-list) — right clip
   (This stylesheet only loads on /kontakt/.)
   ══════════════════════════════════════════════════════════════ */

.elementor-widget-icon-box .elementor-icon-box-wrapper,
.elementor-widget-icon-box .elementor-icon-box-content {
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-description,
.elementor-icon-list-text {
	overflow-wrap: anywhere;
	word-break: break-word;
	max-width: 100%;
}

.elementor-widget-icon-box .elementor-icon-box-content {
	padding-inline: 2px 14px;
}

.elementor-widget-icon-list .elementor-icon-list-items,
.elementor-widget-icon-list .elementor-icon-list-item {
	max-width: 100%;
	padding-inline-end: 14px;
	box-sizing: border-box;
}

