/* 360 Address Autocomplete — dropdown styling.
   WPForms ships `div.wpforms-container-full .wpforms-form ul { background:none!important;
   border:0!important; margin:0!important; padding:0!important }`, which strips any plain
   rule on our list. Every selector below therefore matches that specificity or beats it,
   and the properties WPForms forces are re-forced here. */
.s360-addr-wrap { position: relative !important; display: block; }

.s360-addr-list,
div.wpforms-container-full .wpforms-form ul.s360-addr-list {
	position: absolute !important;
	z-index: 99999 !important;
	left: 0; right: 0; top: calc(100% + 4px);
	margin: 0 !important;
	padding: 4px !important;
	list-style: none !important;
	background: #fff !important;
	border: 1px solid #dfe4ea !important;
	border-radius: var(--s360-radius, 8px);
	box-shadow: 0 10px 28px rgba(29, 36, 41, .16) !important;
	max-height: 280px;
	overflow-y: auto;
	text-align: left;
}
.s360-addr-list[hidden],
div.wpforms-container-full .wpforms-form ul.s360-addr-list[hidden] { display: none !important; }

.s360-addr-item,
div.wpforms-container-full .wpforms-form ul.s360-addr-list li {
	margin: 0 !important;
	padding: 10px 12px !important;
	cursor: pointer;
	border: 0 !important;
	border-radius: 6px;
	background: transparent !important;
	list-style: none !important;
	font-size: 14px;
	line-height: 1.35;
	color: #1e232a;
}
div.wpforms-container-full .wpforms-form ul.s360-addr-list li:hover,
div.wpforms-container-full .wpforms-form ul.s360-addr-list li.is-active,
.s360-addr-item:hover, .s360-addr-item.is-active {
	background: #e8f1fb !important;
	color: #004a9c;
}
/* THE LAYOUT-SHIFT FIX (2026-10-03). This element is the only thing the plugin puts in
   normal flow, and its text changes on every keystroke ("Looking up addresses…" → "" →
   "No matches…"), so it grew and collapsed the wrapper, pushing the page below AND
   dragging the panel via `top: calc(100% + 4px)`. It must stay a visually-hidden live
   region: .s360-addr-wrap has to contain exactly ONE in-flow child, the input.
   Not display:none — that removes it from the a11y tree and silences aria-live.
   The duplicate selector and !important are required: WPForms ships
   `div.wpforms-container-full .wpforms-form *{position:static;margin:0;…}` at (0,2,1),
   which beats a bare class and would silently revert position back to static. */
.s360-addr-status,
div.wpforms-container-full .wpforms-form .s360-addr-status {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* "No matches" now renders as a row inside the absolute panel, so it costs no layout.
   pointer-events:none so a click meant for the City box underneath is not swallowed. */
div.wpforms-container-full .wpforms-form ul.s360-addr-list--empty { pointer-events: none !important; }
div.wpforms-container-full .wpforms-form ul.s360-addr-list li.s360-addr-empty,
.s360-addr-empty {
	color: #5b6773 !important;
	cursor: default !important;
	background: transparent !important;
	font-style: italic;
}

/* WPForms sets overflow-x:hidden on .wpforms-field at <=600px; one axis hidden forces
   the other to auto, so the host field becomes a scroll container and clips the panel.
   No-op on desktop, where WPForms' own reset already says overflow:visible. */
div.wpforms-container-full .wpforms-form .wpforms-field.s360-addr-host { overflow: visible !important; }

/* Busy indicator: rides on the wrapper as an absolutely positioned pseudo-element,
   so it replaces the old in-flow "Looking up addresses…" text at zero layout cost. */
.s360-addr-wrap.is-busy::after {
	content: "";
	position: absolute;
	top: 50%; right: 12px;
	width: 14px; height: 14px;
	margin-top: -7px;
	border: 2px solid #c8d2dc;
	border-top-color: #004a9c;
	border-radius: 50%;
	animation: s360-addr-spin .7s linear infinite;
	pointer-events: none;
}
@keyframes s360-addr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.s360-addr-wrap.is-busy::after { animation: none; }
}
