/* Independent Vet — Clinic Search
   Brand orange: #f6931d  (override with --ivs-orange on .ivs-wrap if needed) */

.ivs-wrap {
	--ivs-orange: #f6931d;
	--ivs-orange-dark: #d97a08;
	--ivs-green: #f6931d; /* tick uses brand orange per spec */
	--ivs-red: #e0533d;
	--ivs-ink: #222;
	--ivs-muted: #6b7280;
	--ivs-border: #e3e6ea;
	--ivs-radius: 12px;
	max-width: 640px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--ivs-ink);
	box-sizing: border-box;
}

.ivs-wrap *,
.ivs-wrap *::before,
.ivs-wrap *::after {
	box-sizing: border-box;
}

/* Inherit the theme's typeface AND size for every control inside the widget.
   !important is used throughout this file to win against the theme's own
   form/button styling (Beaver Builder + theme reset both target bare inputs). */
.ivs-wrap input,
.ivs-wrap button,
.ivs-wrap textarea,
.ivs-wrap select {
	font-family: inherit !important;
	font-size: inherit !important;
}

/* Heading inherits the theme's h3 look (size, weight, colour). */
.ivs-wrap .ivs-heading {
	margin: 0 0 .6em !important;
	line-height: 1.3;
}

/* ---- Search field ---- */
.ivs-field {
	position: relative;
	display: flex;
	align-items: center;
}

.ivs-search-icon {
	position: absolute;
	left: 20px;
	width: 21px;
	height: 21px;
	color: var(--ivs-muted);
	pointer-events: none;
	z-index: 2;
}

.ivs-wrap .ivs-input {
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	padding: 17px 56px 17px 54px !important;
	font-size: inherit !important;
	line-height: 1.4 !important;
	color: var(--ivs-ink) !important;
	background: #fff !important;
	border: 2px solid var(--ivs-border) !important;
	border-radius: 99px !important;
	outline: none !important;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ivs-wrap .ivs-input::placeholder {
	color: #6a6f76 !important;
	opacity: 1 !important;
}

.ivs-wrap .ivs-input:focus {
	border-color: var(--ivs-orange) !important;
	box-shadow: 0 0 0 3px rgba(246, 147, 29, .18) !important;
}

.ivs-wrap .ivs-clear {
	position: absolute;
	right: 12px;
	width: 30px !important;
	height: 30px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--ivs-orange) !important;
	color: #fff !important;
	font-size: 20px !important;
	line-height: 1 !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease;
}

/* Only show the clear button when there is text (JS toggles [hidden]).
   Forced because the theme sets display on bare <button> elements. */
.ivs-wrap .ivs-clear[hidden] {
	display: none !important;
}

.ivs-wrap .ivs-clear:hover {
	background: var(--ivs-orange-dark) !important;
	color: #fff !important;
}

/* ---- Results ---- */
.ivs-results {
	margin-top: 12px;
}

.ivs-results:empty {
	display: none;
}

.ivs-loading {
	padding: 10px 4px;
	color: var(--ivs-muted);
	font-size: .95rem;
}

.ivs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ivs-border);
	border-radius: var(--ivs-radius);
	overflow: hidden;
}

.ivs-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 16px;
	border-top: 1px solid var(--ivs-border);
	text-decoration: none;
	color: var(--ivs-ink);
	background: #fff;
	transition: background .12s ease;
}

.ivs-item:first-child {
	border-top: 0;
}

.ivs-item:hover,
.ivs-item:focus {
	background: #fff8f0;
}

.ivs-badge {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ivs-badge svg {
	width: 26px;
	height: 26px;
}

.ivs-name {
	flex: 1 1 auto;
	font-weight: 600;
	line-height: 1.3;
}

.ivs-go {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	color: var(--ivs-orange);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .12s ease;
}

.ivs-item:hover .ivs-go {
	transform: translateX(3px);
}

.ivs-go svg {
	width: 20px;
	height: 20px;
}

/* ---- Not found ---- */
.ivs-notfound {
	border: 1px solid var(--ivs-border);
	border-radius: var(--ivs-radius);
	padding: 18px;
	background: #fff;
}

.ivs-notfound-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.ivs-notfound-head .ivs-badge {
	margin-top: 1px;
}

.ivs-notfound-text {
	margin: 0;
	line-height: 1.5;
}

.ivs-notfound-text strong {
	display: block;
	margin-bottom: 2px;
}

.ivs-add-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 11px 18px;
	font-size: .95rem;
	font-weight: 600;
	color: #fff;
	background: var(--ivs-orange);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s ease;
}

.ivs-add-btn:hover {
	background: var(--ivs-orange-dark);
}

/* ---- Add form ---- */
.ivs-form {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--ivs-border);
	display: grid;
	gap: 10px;
}

.ivs-form label {
	font-size: inherit;
	font-weight: 600;
	color: var(--ivs-ink);
	display: block;
	margin-bottom: 6px;
}

.ivs-form input[type="text"],
.ivs-form input[type="email"] {
	width: 100% !important;
	height: auto !important;
	padding: 12px 15px !important;
	font-size: inherit !important;
	line-height: 1.4 !important;
	color: var(--ivs-ink) !important;
	background: #fff !important;
	border: 1px solid var(--ivs-border) !important;
	border-radius: 10px !important;
	outline: none !important;
}

.ivs-form input:focus {
	border-color: var(--ivs-orange);
	box-shadow: 0 0 0 3px rgba(246, 147, 29, .15);
}

/* Honeypot — visually hidden, off-screen */
.ivs-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ivs-submit {
	justify-self: start;
	padding: 13px 24px;
	font-size: 1.05rem;
	font-weight: 600;
	color: #fff;
	background: var(--ivs-orange);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

.ivs-submit:hover {
	background: var(--ivs-orange-dark);
}

.ivs-submit[disabled] {
	opacity: .6;
	cursor: default;
}

.ivs-feedback {
	margin: 4px 0 0;
	font-size: 1rem;
	line-height: 1.45;
}

.ivs-feedback.is-ok {
	color: #1a7f4b;
}

.ivs-feedback.is-err {
	color: var(--ivs-red);
}

.ivs-thanks {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ivs-orange);
	font-weight: 600;
	line-height: 1.4;
}

/* ============================================================
   Modal mode — [vet_search mode="modal"]
   ============================================================ */
.ivs-modal-mode {
	display: inline-block;
	max-width: none;
	margin: 0;
}

.ivs-modal-mode {
	/* Default matches the theme's .fl-button height (46px). Override per-use
	   with [vet_search mode="modal" size="48"] if a header button differs. */
	--ivs-trigger-size: 46px;
}

.ivs-wrap .ivs-trigger {
	display: inline-flex !important;
	align-items: center;
	gap: 9px;
	padding: 0 !important;
	width: var(--ivs-trigger-size) !important;
	height: var(--ivs-trigger-size) !important;
	min-height: 0 !important;
	justify-content: center;
	color: #fff !important;
	background: var(--ivs-orange) !important;
	border: 0 !important;
	border-radius: 99px !important;
	cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}

.ivs-wrap .ivs-trigger.has-label {
	width: auto !important;
	padding: 0 22px !important;
}

.ivs-wrap .ivs-trigger:hover {
	background: var(--ivs-orange-dark) !important;
}

.ivs-trigger:active {
	transform: scale(.97);
}

.ivs-trigger-icon {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}

.ivs-trigger-label {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
}

/* Overlay + dialog */
.ivs-modal[hidden] {
	display: none;
}

.ivs-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 8vh 16px 16px;
	overflow-y: auto;
}

.ivs-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 19, 22, .55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.ivs-modal-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 620px;
	min-height: 300px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
	padding: 34px 30px 30px;
	animation: ivs-pop .16s ease-out;
}

@keyframes ivs-pop {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ivs-wrap .ivs-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px !important;
	height: 40px !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 2px solid var(--ivs-orange) !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--ivs-orange) !important;
	font-size: 26px !important;
	line-height: 1 !important;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, color .15s ease;
}

.ivs-wrap .ivs-modal-close:hover {
	background: var(--ivs-orange) !important;
	color: #fff !important;
}

.ivs-modal-dialog .ivs-heading {
	padding-right: 44px;
}

@media (prefers-reduced-motion: reduce) {
	.ivs-modal-dialog { animation: none; }
}
