/**
 * Villa reference lookup modal. Deliberately self-contained rather
 * than folded into results-page.css (that file is a hands-off
 * extraction from the real captured page — see the plugin handoff's
 * Fixes Log) — this is a new element with no real-page equivalent to
 * match pixel-for-pixel, so it just needs to look at home next to
 * the search bar, using the same button classes (hff-submit,
 * et_pb_button) as everything else for visual consistency.
 */

/**
 * Simple sibling of the <form> (not nested inside any field), so it
 * always renders after every form field in document order — on a
 * mobile viewport, where the fields stack vertically, that means it
 * always sits below all of them rather than getting hidden beneath
 * whichever field happens to render on top of it. No positioning
 * tricks needed.
 */
.viv-reference-lookup-trigger-wrap {
	display: block;
	width: 100%;
	flex-basis: 100%;
	box-sizing: border-box;
	margin-top: 10px;
	text-align: center;
}

.viv-reference-lookup-trigger {
	color: #666;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.viv-reference-lookup-trigger:hover {
	text-decoration: underline;
}

.viv-reference-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483000; /* the site's own theme-builder header goes up to 99999999 — this stays comfortably above anything on the page */
	display: flex;
	align-items: center;
	justify-content: center;
}

.viv-reference-modal[hidden] {
	display: none;
}

.viv-reference-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(2, 42, 58, 0.65); /* matches the site's dark navy (#022a3a) at low opacity */
}

.viv-reference-modal__panel {
	position: relative;
	background: #fff;
	border-radius: 6px;
	padding: 30px;
	max-width: 380px;
	width: calc(100% - 40px);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.viv-reference-modal__panel h3 {
	margin-top: 0;
	color: #022a3a;
}

.viv-reference-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #022a3a;
}

.viv-reference-modal__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
}

.viv-reference-modal__field input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 15px;
}

.viv-reference-modal__status {
	min-height: 1.2em;
	font-size: 14px;
}

.viv-reference-modal__status[data-viv-status-state="error"] {
	color: #c0392b;
}

.viv-reference-modal__actions {
	margin-top: 10px;
}
