/* PSM Installer Directory — estilo "ficha técnica": etiquetas en versalitas,
   valores en texto normal, mismo lenguaje que las hojas de datos de bombas. */

.psm-dir,
.psm-form {
	--psm-navy: #123a6b;
	--psm-navy-dark: #0d2a4e;
	--psm-blue: #2f6fbf;
	--psm-ink: #1c2530;
	--psm-muted: #64748b;
	--psm-line: #d8dfe8;
	--psm-surface: #f5f7fa;
	--psm-white: #fff;
	--psm-radius: 4px;
	color: var(--psm-ink);
	font-size: 15px;
	line-height: 1.5;
}

/* --- Barra de búsqueda --- */

.psm-dir__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--psm-surface);
	border: 1px solid var(--psm-line);
	border-bottom: 0;
	border-radius: var(--psm-radius) var(--psm-radius) 0 0;
}

.psm-dir__search {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1 1 340px;
}

.psm-dir__input {
	flex: 1 1 200px;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid var(--psm-line);
	border-radius: var(--psm-radius);
	background: var(--psm-white);
	font-size: 15px;
}

.psm-dir__input:focus,
.psm-dir__select:focus {
	outline: 2px solid var(--psm-blue);
	outline-offset: 1px;
	border-color: var(--psm-blue);
}

.psm-dir__radius {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--psm-muted);
}

.psm-dir__select {
	padding: 8px 10px;
	border: 1px solid var(--psm-line);
	border-radius: var(--psm-radius);
	background: var(--psm-white);
}

.psm-btn {
	padding: 9px 16px;
	border: 1px solid var(--psm-line);
	border-radius: var(--psm-radius);
	background: var(--psm-white);
	color: var(--psm-navy);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.psm-btn:hover {
	background: #eef3f9;
	border-color: var(--psm-blue);
}

.psm-btn:focus-visible {
	outline: 2px solid var(--psm-blue);
	outline-offset: 2px;
}

.psm-btn--primary {
	background: var(--psm-navy);
	border-color: var(--psm-navy);
	color: var(--psm-white);
}

.psm-btn--primary:hover {
	background: var(--psm-navy-dark);
	border-color: var(--psm-navy-dark);
}

.psm-btn--ghost {
	background: transparent;
	border-color: transparent;
	color: var(--psm-muted);
	font-weight: 500;
}

/* --- Contador --- */

.psm-dir__count {
	margin: 0;
	padding: 8px 16px;
	background: var(--psm-white);
	border: 1px solid var(--psm-line);
	border-bottom: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--psm-muted);
}

/* --- Layout mapa + lista --- */

.psm-dir__layout {
	display: grid;
	grid-template-columns: var(--psm-list-w, 340px) minmax(0, 1fr);
	border: 1px solid var(--psm-line);
	border-radius: 0 0 var(--psm-radius) var(--psm-radius);
	overflow: hidden;
	background: var(--psm-white);
}

.psm-dir__list {
	max-height: 560px;
	overflow-y: auto;
	border-right: 1px solid var(--psm-line);
	background: var(--psm-surface);
}

.psm-dir__map {
	min-height: 560px;
	z-index: 0;
}

/* --- Tarjeta de instalador --- */

.psm-card {
	display: block;
	width: 100%;
	text-align: left;
	padding: 13px 16px;
	border: 0;
	border-bottom: 1px solid var(--psm-line);
	border-left: 3px solid transparent;
	background: var(--psm-white);
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: background .15s ease, border-color .15s ease;
}

.psm-card:hover {
	background: #f0f5fb;
}

.psm-card:focus-visible {
	outline: 2px solid var(--psm-blue);
	outline-offset: -2px;
}

.psm-card.is-active {
	background: #eaf1fa;
	border-left-color: var(--psm-navy);
}

.psm-card__company {
	margin: 0 0 2px;
	font-size: 16px;
	font-weight: 700;
	color: var(--psm-navy);
	line-height: 1.25;
}

.psm-card__address {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--psm-muted);
}

.psm-card__distance {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 2px;
	background: var(--psm-navy);
	color: var(--psm-white);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	vertical-align: 1px;
}

/* La rejilla de datos imita una hoja de especificaciones */
.psm-spec {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 4px 10px;
	margin: 0;
	font-size: 13px;
}

.psm-spec dt {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--psm-muted);
	padding-top: 2px;
}

.psm-spec dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.psm-spec a {
	color: var(--psm-blue);
	text-decoration: none;
}

.psm-spec a:hover {
	text-decoration: underline;
}

.psm-spec__clamp {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.psm-empty {
	padding: 32px 20px;
	text-align: center;
	color: var(--psm-muted);
	font-size: 14px;
}

/* --- Popup del mapa --- */

.psm-popup h3 {
	margin: 0 0 4px;
	font-size: 15px;
	color: var(--psm-navy);
}

.psm-popup p {
	margin: 0 0 4px;
	font-size: 13px;
}

/* --- Disclaimer --- */

.psm-dir__disclaimer {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--psm-muted);
}

.psm-dir__disclaimer strong {
	color: #b42318;
}

/* --- Formulario --- */

.psm-form {
	max-width: 860px;
	padding: 28px;
	background: var(--psm-white);
	border: 1px solid var(--psm-line);
	border-top: 3px solid var(--psm-navy);
	border-radius: var(--psm-radius);
}

.psm-form__title {
	margin: 0 0 20px;
	font-size: 22px;
	color: var(--psm-navy);
}

.psm-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.psm-form__field--wide {
	grid-column: 1 / -1;
}

.psm-form__label {
	display: block;
	margin-bottom: 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--psm-muted);
}

.psm-form input[type="text"],
.psm-form input[type="tel"],
.psm-form input[type="email"],
.psm-form input[type="url"],
.psm-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--psm-line);
	border-radius: var(--psm-radius);
	background: var(--psm-white);
	font: inherit;
	color: var(--psm-ink);
}

.psm-form input:focus,
.psm-form textarea:focus {
	outline: 2px solid var(--psm-blue);
	outline-offset: 1px;
	border-color: var(--psm-blue);
}

.psm-form__field.has-error input,
.psm-form__field.has-error textarea {
	border-color: #b42318;
}

.psm-form__error {
	margin: 5px 0 0;
	font-size: 13px;
	color: #b42318;
}

.psm-form__checks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.psm-form__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
}

.psm-form__note {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--psm-muted);
}

.psm-form .psm-btn {
	margin-top: 22px;
	padding: 12px 26px;
	font-size: 15px;
}

.psm-req {
	color: #b42318;
}

.psm-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.psm-alert {
	padding: 14px 18px;
	margin-bottom: 20px;
	border-left: 3px solid var(--psm-navy);
	background: var(--psm-surface);
	font-size: 15px;
}

.psm-alert--ok {
	border-left-color: #157347;
	background: #edf7f1;
}

.psm-alert--error {
	border-left-color: #b42318;
	background: #fdf0ef;
}

/* --- Responsive --- */

@media (max-width: 860px) {
	.psm-dir__layout {
		grid-template-columns: 1fr;
	}

	.psm-dir__list {
		max-height: 340px;
		border-right: 0;
		border-bottom: 1px solid var(--psm-line);
		order: 2;
	}

	.psm-dir__map {
		min-height: 380px;
		order: 1;
	}

	.psm-form__grid {
		grid-template-columns: 1fr;
	}

	.psm-form {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.psm-card,
	.psm-btn {
		transition: none;
	}
}

/* Texto de ayuda bajo la etiqueta y consentimiento legal */

.psm-form__help {
	margin: 0 0 7px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--psm-muted);
}

.psm-form__consent span {
	font-size: 13px;
	line-height: 1.55;
	color: var(--psm-muted);
}

.psm-form__consent a {
	color: var(--psm-blue);
}

.psm-form__consent input {
	margin-top: 3px;
	flex: 0 0 auto;
}

/* Widget de captcha: Turnstile mide 300x65 por defecto */

.psm-form .cf-turnstile {
	margin-top: 4px;
}

.psm-form .cf-turnstile iframe {
	max-width: 100%;
}
