/**
 * CompareISP address search.
 *
 * The form styling below is a deliberate MIRROR of broadband-public.css, not
 * a reuse of it.
 *
 * The broadband plugin's JS binds globally to '.zip-search-form' and
 * '.zip_search_input' and strips every non-digit from the input on each
 * keystroke. Any form carrying those classes is therefore ZIP-only by force.
 * Since this form must accept letters, it uses its own class names — which
 * means it also has to carry its own copy of the visual rules.
 *
 * Design tokens are taken verbatim from broadband-public.css so the two forms
 * are visually identical. If that stylesheet changes, update this one.
 */

/* ============================================================ the form === */

.cisp-search-form {
	position: relative;
	width: 100%;
	margin: 0 auto;
}

.cisp-search-form .input-container {
	display: flex;
	align-items: center;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, .08 ), 0 2px 8px rgba( 0, 0, 0, .04 );
	padding: 8px 11px;
	transition: all .3s ease;
	position: relative;
}

.cisp-search-form .input-container:hover {
	box-shadow: 0 12px 32px rgba( 0, 0, 0, .12 ), 0 4px 12px rgba( 0, 0, 0, .06 );
}

.cisp-search-form .input-container:focus-within {
	box-shadow: 0 12px 32px rgba( 29, 78, 216, .15 ), 0 4px 12px rgba( 29, 78, 216, .08 );
}

.cisp-search-form .icon-container {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
	flex-shrink: 0;
}

.cisp-search-form .icon-container .dashicons {
	width: 24px;
	height: 24px;
	font-size: 24px;
	color: #9ca3af;
	transition: color .3s ease;
}

.cisp-search-form .input-container:focus-within .icon-container .dashicons {
	color: #1D4ED8;
}

.cisp-search-form .cisp-input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent !important;
	font-size: 25px;
	line-height: 1.5;
	color: #1f2937;
	padding: 12px 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	min-width: 0;
	box-shadow: none !important;
}

.cisp-search-form .cisp-input:-webkit-autofill,
.cisp-search-form .cisp-input:-webkit-autofill:hover,
.cisp-search-form .cisp-input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
	-webkit-text-fill-color: #1f2937 !important;
	transition: background-color 5000s ease-in-out 0s;
}

.cisp-search-form .cisp-input::placeholder {
	color: #9ca3af;
	opacity: 1;
	font-weight: 400;
	font-size: 16px;
}

.cisp-search-form .cisp-input:focus::placeholder { color: #d1d5db; }
.cisp-search-form .cisp-input:focus { outline: none; }

.cisp-search-form .cisp-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient( 135deg, #1D4ED8 0%, #2563EB 100% );
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 12px 32px;
	font-size: 20px;
	font-weight: 600;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	cursor: pointer;
	transition: all .3s ease;
	white-space: nowrap;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba( 29, 78, 216, .25 );
}

.cisp-search-form .cisp-submit::before {
	content: "\f179";
	font-family: "dashicons";
	font-size: 18px;
	display: inline-block;
	width: 18px;
	height: 18px;
	line-height: 1;
}

.cisp-search-form .cisp-submit:hover {
	background: linear-gradient( 135deg, #1E40AF 0%, #1D4ED8 100% );
	box-shadow: 0 4px 12px rgba( 29, 78, 216, .35 );
	transform: translateY( -1px );
}

.cisp-search-form .cisp-submit:active { transform: translateY( 0 ); }

.cisp-search-form .cisp-submit:disabled {
	background: linear-gradient( 135deg, #9ca3af 0%, #a8aeb8 100% );
	cursor: not-allowed;
	transform: none;
}

.cisp-search-form .cisp-submit:focus {
	outline: 2px solid #1D4ED8;
	outline-offset: 2px;
}

.cisp-feedback {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
	padding: 0 20px;
	min-height: 21px;
}

.cisp-feedback.is-error { color: #ef4444; font-weight: 500; }
.cisp-feedback:empty { display: none; }

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

/* ======================================================= autocomplete === */

.cisp-suggest {
	position: absolute;
	z-index: 60;
	top: calc( 100% + 6px );
	left: 0;
	right: 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba( 0, 0, 0, .14 ), 0 2px 8px rgba( 0, 0, 0, .05 );
	max-height: 320px;
	overflow-y: auto;
}

.cisp-suggest__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 14px;
	margin: 0;
	border-radius: 9px;
	cursor: pointer;
	line-height: 1.35;
	font-size: 16px;
	color: #1f2937;
}

.cisp-suggest__item:hover,
.cisp-suggest__item.is-active { background: #eff4ff; }

.cisp-suggest__hint {
	flex-shrink: 0;
	font-size: 12px;
	color: #9ca3af;
	white-space: nowrap;
}

/* =========================================================== results === */

.cisp-warn {
	margin: 20px 0 12px;
	padding: 12px 16px;
	border-left: 4px solid #d68910;
	background: rgba( 214, 137, 16, .09 );
	border-radius: 8px;
	font-size: 14px;
	color: #1f2937;
}

.cisp-nudge {
	margin: 14px 0 0;
	font-size: 14px;
	color: #6b7280;
}

.cisp-nudge code {
	padding: 2px 7px;
	border-radius: 5px;
	background: #f3f4f6;
	font-size: 13px;
}

.cisp-head { margin: 18px 0 10px; color: #1f2937; }

/* One card per provider — layout, radii, gray tiles, and the red detail-
   table header mirror the site's own provider-listing template (see
   deep-test-claude.local/alabama/demopolis/, built with jet-listing-grid +
   jet-dynamic-table). CTA color stays CISP's own accent blue rather than
   that template's separate blue, so results read as one widget with the
   search box above them. */

.cisp-listing {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-top: 18px;
}

.cisp-card {
	background: #ffffff;
	border: 1px solid rgba( 121, 127, 151, .2 );
	border-radius: 7px;
	box-shadow: 0 2px 5px rgba( 121, 127, 151, .2 );
	padding: 15px;
}

.cisp-card__top {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

/* -------------------------------------------------------- logo tile --- */

.cisp-card__logo {
	flex: 0 0 auto;
	width: 100px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f3f3;
	border-radius: 7px;
	overflow: hidden;
}

.cisp-card__logo img { max-width: 80%; max-height: 70%; object-fit: contain; }

.cisp-card__logo-fallback {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .04em;
	color: #6b7280;
}

/* --------------------------------------------------- name / rating --- */

.cisp-card__id {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 140px;
}

.cisp-card__name { font-weight: 700; font-size: 18px; color: #1f2937; }

.cisp-card__stars {
	display: inline-flex;
	gap: 2px;
}

.cisp-card__stars svg { width: 14px; height: 14px; fill: #d1d5db; }
.cisp-star--filled svg { fill: #f59e0b; }

.cisp-card__rating-count {
	margin-left: 4px;
	font-size: 12px;
	color: #9ca3af;
}

.cisp-share {
	display: block;
	font-size: 12px;
	color: #9ca3af;
}

.cisp-share--low { color: #b3541e; font-weight: 600; }

/* --------------------------------------------------------- speedbox --- */

.cisp-card__speedbox {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f3f3f3;
	border-radius: 7px;
	padding: 10px 16px;
}

.cisp-card__gauge { width: 30px; height: 30px; flex-shrink: 0; }

.cisp-card__speedbox-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cisp-card__speedbox-label { font-size: 13px; color: #4b5563; }
.cisp-card__speedbox-value { font-size: 22px; font-weight: 700; color: #1f2937; white-space: nowrap; }
.cisp-nospeed { color: #9ca3af; font-style: italic; font-weight: 400; font-size: 15px; }

/* --------------------------------------------------------- actions --- */

.cisp-card__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	flex: 0 0 auto;
	margin-left: auto;
}

.cisp-btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.cisp-btn--call {
	background: #1D4ED8;
	color: #ffffff;
}

.cisp-btn--call:hover { background: #1E40AF; }

.cisp-card__viewplans {
	font-size: 13px;
	font-weight: 600;
	color: #1f2937;
	text-decoration: none;
}

.cisp-card__viewplans:hover { text-decoration: underline; }

/* ----------------------------------------------------- detail table --- */

.cisp-card__detail {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba( 65, 65, 69, .12 );
}

.cisp-card__detail-heading {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: #1f2937;
}

.cisp-detail-table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 13px;
}

.cisp-detail-table th {
	text-align: left;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 500;
	color: #ffffff;
	background: #FA1616;
	white-space: nowrap;
}

.cisp-detail-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #f3f4f6;
	color: #1f2937;
	white-space: nowrap;
}

.cisp-empty { padding: 20px 0; color: #6b7280; }

/* ======================================================== responsive === */

@media screen and ( max-width: 768px ) {
	.cisp-search-form .input-container { padding: 6px 6px 6px 16px; border-radius: 14px; }
	.cisp-search-form .icon-container { margin-right: 8px; }
	.cisp-search-form .icon-container .dashicons { width: 20px; height: 20px; font-size: 20px; }
	.cisp-search-form .cisp-input { font-size: 20px; padding: 12px; }
	.cisp-search-form .cisp-submit { padding: 12px 24px; font-size: 15px; border-radius: 10px; }
	.cisp-feedback { font-size: 13px; padding: 0 16px; }
}

@media screen and ( max-width: 480px ) {
	.cisp-search-form .input-container { flex-direction: column; padding: 12px; gap: 10px; }
	.cisp-search-form .icon-container { position: absolute; left: 16px; top: 20px; margin-right: 0; }
	.cisp-search-form .cisp-input { width: 100%; padding: 12px 12px 12px 40px; font-size: 18px; }
	.cisp-search-form .cisp-submit { width: 100%; padding: 14px 24px; justify-content: center; }
	.cisp-card__top { align-items: flex-start; }
	.cisp-card__logo { width: 72px; height: 52px; }
	.cisp-card__speedbox { flex-basis: 100%; }
	.cisp-card__actions { flex-direction: row; align-items: center; margin-left: 0; flex-basis: 100%; }
}

@media ( prefers-reduced-motion: reduce ) {
	.cisp-search-form .input-container,
	.cisp-search-form .cisp-submit { transition: none; }
	.cisp-search-form .cisp-submit:hover { transform: none; }
}

/* Street could not be verified — stronger than the plain "approximate"
   notice, because the user asked for a specific address and did not get it. */
.cisp-warn--strong {
	border-left-color: #ef4444;
	background: rgba( 239, 68, 68, .08 );
}

/* Geoapify's free plan requires visible attribution. */
.cisp-suggest__attr {
	padding: 7px 14px 4px;
	font-size: 11px;
	color: #b6bcc4;
	text-align: right;
	cursor: default;
	border-top: 1px solid #f1f2f4;
	margin-top: 2px;
}
