/* Irish Homecare – Eircode office finder. Override the custom properties to re-theme. */
.ihc-finder {
	--ihc-bg: #2d0a4e;
	--ihc-text: #ffffff;
	--ihc-accent: #d4f57a;
	--ihc-accent-text: #2d0a4e;
	--ihc-card: #ffffff;
	--ihc-card-text: #2d0a4e;
	--ihc-error: #ffb4b4;
	--ihc-heading-font: inherit;

	box-sizing: border-box;
	background: var(--ihc-bg);
	color: var(--ihc-text);
	padding: 32px 20px;
	border-radius: 8px;
	text-align: center;
	max-width: 420px;
	margin: 0 auto;
}

.ihc-finder *,
.ihc-finder *::before,
.ihc-finder *::after {
	box-sizing: inherit;
}

.ihc-finder .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ihc-finder__title {
	font-family: var(--ihc-heading-font);
	font-size: clamp(2rem, 8vw, 2.6rem);
	line-height: 1.1;
	font-weight: 500;
	margin: 0 0 16px;
	color: inherit;
}

.ihc-finder__intro {
	margin: 0 0 24px;
	font-size: 1rem;
	line-height: 1.4;
}

.ihc-finder__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ihc-finder__input,
.ihc-finder__submit {
	width: 100%;
	min-height: 48px;
	border-radius: 999px;
	border: 0;
	font: inherit;
	font-size: 1rem;
	text-align: center;
	padding: 12px 20px;
}

.ihc-finder__input {
	background: #ffffff;
	color: var(--ihc-card-text);
}

.ihc-finder__input::placeholder {
	color: var(--ihc-card-text);
	opacity: 1;
}

.ihc-finder__input:focus::placeholder {
	opacity: 0.4;
}

.ihc-finder__input[aria-invalid="true"] {
	outline: 2px solid var(--ihc-error);
	outline-offset: 2px;
}

.ihc-finder__submit {
	background: var(--ihc-accent);
	color: var(--ihc-accent-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: filter 0.15s ease;
}

.ihc-finder__submit:hover {
	filter: brightness(0.95);
}

.ihc-finder__input:focus-visible,
.ihc-finder__submit:focus-visible,
.ihc-finder__call:focus-visible,
.ihc-finder__phone:focus-visible {
	outline: 3px solid var(--ihc-accent);
	outline-offset: 3px;
}

.ihc-finder__error {
	margin: -4px 0 0;
	color: var(--ihc-error);
	font-size: 0.9rem;
}

.ihc-finder__result {
	margin-top: 24px;
	background: var(--ihc-card);
	color: var(--ihc-card-text);
	border-radius: 8px;
	padding: 20px;
	text-align: left;
}

.ihc-finder__result[hidden],
.ihc-finder__error[hidden],
.ihc-finder__note[hidden] {
	display: none;
}

.ihc-finder__label {
	display: block;
	font-size: 0.9rem;
	padding-bottom: 8px;
	border-bottom: 1px solid #e3dde9;
	margin-bottom: 10px;
}

.ihc-finder__address {
	font-size: 0.85rem;
	line-height: 1.4;
	margin: -14px 0 20px;
}

.ihc-finder__office,
.ihc-finder__phone {
	font-family: var(--ihc-heading-font);
	font-size: 1.4rem;
	margin: 0 0 20px;
	color: inherit;
}

.ihc-finder__phone {
	display: inline-block;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ihc-finder__note {
	font-size: 0.85rem;
	margin: -8px 0 16px;
}

.ihc-finder__call {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	border-radius: 999px;
	background: var(--ihc-bg);
	color: var(--ihc-text);
	text-decoration: none;
}

.ihc-finder__call:hover {
	color: var(--ihc-text);
	filter: brightness(1.2);
}

.ihc-finder svg {
	flex-shrink: 0;
}

/* ==========================================================================
   Overrides (staging update): button states, autofill, desktop error layout,
   fonts. Selectors are deliberately more specific than the Elementor kit
   custom CSS (post-6.css), which also targets .ihc-finder.
   ========================================================================== */

/* Fonts: existing media-library files, registered for this plugin only. */
@font-face {
	font-family: "Sohne";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../../uploads/2026/10/soehne-buch.woff2") format("woff2");
}
@font-face {
	font-family: "Sohne";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../../uploads/2026/10/soehne-kraftig.woff2") format("woff2");
}
@font-face {
	font-family: "Sohne";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../../../uploads/2026/10/soehne-halbfett.woff2") format("woff2");
}
@font-face {
	font-family: "Tiempos Headline";
	font-style: normal;
	font-weight: 400 500;
	font-display: swap;
	src: url("../../../uploads/2026/10/tiempos-text-medium.woff2") format("woff2");
}

body .ihc-finder.ihc-finder {
	--ihc-heading-font: "Tiempos Headline", Georgia, serif;
	--ihc-of-sans: "Sohne", Arial, sans-serif;
	font-family: var(--ihc-of-sans);
}

body .ihc-finder .ihc-finder__title,
body .ihc-finder .ihc-finder__office,
body .ihc-finder .ihc-finder__phone {
	font-family: "Tiempos Headline", Georgia, serif;
}

body .ihc-finder .ihc-finder__intro,
body .ihc-finder .ihc-finder__input,
body .ihc-finder .ihc-finder__error,
body .ihc-finder .ihc-finder__label,
body .ihc-finder .ihc-finder__address,
body .ihc-finder .ihc-finder__note,
body .ihc-finder .ihc-finder__call {
	font-family: var(--ihc-of-sans);
}

body .ihc-finder .ihc-finder__form .ihc-finder__submit {
	font-family: var(--ihc-of-sans);
	font-weight: 500;
}

/* "Find care" button: lime by default, focus and after a search. */
body .ihc-finder .ihc-finder__form .ihc-finder__submit,
body .ihc-finder .ihc-finder__form .ihc-finder__submit:focus,
body .ihc-finder .ihc-finder__form .ihc-finder__submit:focus-visible {
	background: var(--ihc-accent);
	color: var(--ihc-accent-text);
	filter: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

/* Purple + white only while hovering (mouse) or pressing (touch), so a tap
   never leaves the button stuck in the hover state. */
body .ihc-finder .ihc-finder__form .ihc-finder__submit:active {
	background: #2e0e4e;
	color: #ffffff;
	filter: none;
}

@media (hover: hover) and (pointer: fine) {
	body .ihc-finder .ihc-finder__form .ihc-finder__submit:hover {
		background: #2e0e4e;
		color: #ffffff;
		filter: none;
	}
}

/* Icon follows the button text colour. */
body .ihc-finder .ihc-finder__submit svg {
	width: 18px;
	height: 18px;
	color: inherit;
}

/* Input: keep the white pill look, including browser autofill. */
body .ihc-finder .ihc-finder__input:focus {
	background: #ffffff;
	box-shadow: none;
}

body .ihc-finder .ihc-finder__input:-webkit-autofill,
body .ihc-finder .ihc-finder__input:-webkit-autofill:hover,
body .ihc-finder .ihc-finder__input:-webkit-autofill:focus,
body .ihc-finder .ihc-finder__input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
	box-shadow: 0 0 0 1000px #ffffff inset !important;
	-webkit-text-fill-color: var(--ihc-card-text);
	caret-color: var(--ihc-card-text);
	background-clip: padding-box;
	transition: background-color 600000s 0s, color 600000s 0s;
}

body .ihc-finder .ihc-finder__input:autofill {
	box-shadow: 0 0 0 1000px #ffffff inset !important;
	-webkit-text-fill-color: var(--ihc-card-text);
	caret-color: var(--ihc-card-text);
}

/* Desktop: input + button stay side by side; the error sits under the pill. */
@media (min-width: 1025px) {
	body .ihc-finder .ihc-finder__form {
		position: relative;
		flex-wrap: nowrap;
		align-items: stretch;
	}

	body .ihc-finder .ihc-finder__form .ihc-finder__error {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: 12px 0 0;
		margin: 0;
		text-align: center;
	}

	body .ihc-finder .ihc-finder__form:has(.ihc-finder__error:not([hidden])) {
		margin-bottom: 44px;
	}
}

/* Address link (Google Maps): looks like the plain-text address, plus an always-on underline in the text colour.
   Underline matches the other Contact page links (.ihc-underline a in the Elementor kit CSS: 1px, 3px offset).
   Same in every state, so there is no hover effect; the browser's default focus outline is left alone. */
body .ihc-finder .ihc-finder__address a,
body .ihc-finder .ihc-finder__address a:hover,
body .ihc-finder .ihc-finder__address a:visited,
body .ihc-finder .ihc-finder__address a:active,
body .ihc-finder .ihc-finder__address a:focus {
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: currentColor;
	background: none;
}
