/* CW Contacto – formulario PQRSF */
.cwc-pqrsf {
	--cwc-p: #004642;
	--cwc-btn: #479588;
	--cwc-btn-h: #004642;
	--cwc-borde: #D8D8D8;
	--cwc-fondo: #FFFFFF;
	--cwc-radio: 8px;
	--cwc-error: #B42318;
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--cwc-fuente, inherit);
	color: #1f2d2b;
}
.cwc-pqrsf *,
.cwc-pqrsf *::before,
.cwc-pqrsf *::after { box-sizing: border-box; }

.cwc-pqrsf__titulo { margin: 0 0 12px; color: var(--cwc-p); font-family: inherit; }
.cwc-pqrsf__intro { margin-bottom: 20px; line-height: 1.6; }
.cwc-pqrsf__nota { margin: 0 0 16px; font-size: 14px; color: #5b6766; }

.cwc-pqrsf__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 20px;
}
@media (max-width: 640px) { .cwc-pqrsf__grid { grid-template-columns: 1fr; } }
.cwc-pqrsf__campo { position: relative; display: flex; flex-direction: column; min-width: 0; }
.cwc-pqrsf__campo--full { grid-column: 1 / -1; }

.cwc-pqrsf__campo > label {
	margin: 0 0 6px;
	color: var(--cwc-p);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}
.cwc-pqrsf__req { color: var(--cwc-error); text-decoration: none; border: 0; cursor: help; }

.cwc-pqrsf input[type="text"],
.cwc-pqrsf input[type="email"],
.cwc-pqrsf input[type="tel"],
.cwc-pqrsf select,
.cwc-pqrsf textarea {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--cwc-borde);
	border-radius: var(--cwc-radio);
	background-color: var(--cwc-fondo);
	color: #1f2d2b;
	font: inherit;
	font-size: 16px; /* 16px evita el zoom automático en iPhone */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.cwc-pqrsf select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235b6766' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 22px;
}
.cwc-pqrsf textarea { min-height: 140px; resize: vertical; }
.cwc-pqrsf input::placeholder,
.cwc-pqrsf textarea::placeholder { color: #8a9594; opacity: 1; }
.cwc-pqrsf input:focus,
.cwc-pqrsf select:focus,
.cwc-pqrsf textarea:focus {
	outline: none;
	border-color: var(--cwc-btn);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cwc-btn) 25%, transparent);
}
.cwc-pqrsf .is-invalid input,
.cwc-pqrsf .is-invalid select,
.cwc-pqrsf .is-invalid textarea { border-color: var(--cwc-error); }

.cwc-pqrsf__contador { align-self: flex-end; margin-top: 4px; font-size: 12px; color: #6b7775; }
.cwc-pqrsf__err { min-height: 0; margin: 4px 0 0; color: var(--cwc-error); font-size: 13px; line-height: 1.3; }
.cwc-pqrsf__err:empty { display: none; }

.cwc-pqrsf__campo--check { margin-top: 18px; }
.cwc-pqrsf__check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.cwc-pqrsf__check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cwc-btn); }
.cwc-pqrsf__check a { color: var(--cwc-p); text-decoration: underline; }

.cwc-pqrsf__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.cwc-pqrsf__alerta {
	margin-top: 18px;
	padding: 12px 14px;
	border-left: 4px solid var(--cwc-error);
	border-radius: 4px;
	background: #FEF3F2;
	color: var(--cwc-error);
	font-size: 14px;
}
.cwc-pqrsf__alerta[hidden] { display: none; }

/* El tema Hello Elementor pinta los botones de rosa en :hover/:focus: se definen todos los estados. */
.cwc-pqrsf .cwc-pqrsf__btn,
.cwc-pqrsf .cwc-pqrsf__btn:hover,
.cwc-pqrsf .cwc-pqrsf__btn:focus,
.cwc-pqrsf .cwc-pqrsf__btn:active {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	margin: 22px 0 0;
	padding: 12px 24px;
	border: 0;
	border-radius: var(--cwc-radio);
	background: var(--cwc-btn);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .01em;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .2s ease;
}
.cwc-pqrsf .cwc-pqrsf__btn:hover { background: var(--cwc-btn-h); }
.cwc-pqrsf .cwc-pqrsf__btn:focus-visible { outline: 3px solid var(--cwc-p); outline-offset: 3px; }
.cwc-pqrsf .cwc-pqrsf__btn[disabled] { opacity: .75; cursor: progress; }
.cwc-pqrsf__btn.is-loading::before {
	content: "";
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cwc-spin .8s linear infinite;
}
@keyframes cwc-spin { to { transform: rotate(360deg); } }

/* Éxito */
.cwc-pqrsf__ok {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 24px;
	border: 1px solid color-mix(in srgb, var(--cwc-btn) 35%, transparent);
	border-radius: calc(var(--cwc-radio) + 4px);
	background: color-mix(in srgb, var(--cwc-btn) 8%, #fff);
	animation: cwc-aparecer .35s ease both;
}
.cwc-pqrsf__ok[hidden] { display: none; }
.cwc-pqrsf__ok:focus { outline: none; }
.cwc-pqrsf__ok > svg { flex: none; width: 40px; height: 40px; color: var(--cwc-btn); }
.cwc-pqrsf__ok-txt { font-size: 16px; line-height: 1.6; }
.cwc-pqrsf__ok-txt p { margin: 0 0 6px; }
.cwc-pqrsf__ok-txt strong { color: var(--cwc-p); }
@keyframes cwc-aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.cwc-pqrsf__ok { animation: none; }
	.cwc-pqrsf__btn.is-loading::before { animation-duration: 2s; }
}

/* Enviar otra solicitud */
.cwc-pqrsf .cwc-pqrsf__otra,
.cwc-pqrsf .cwc-pqrsf__otra:hover,
.cwc-pqrsf .cwc-pqrsf__otra:focus,
.cwc-pqrsf .cwc-pqrsf__otra:active {
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cwc-p);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	box-shadow: none;
}
.cwc-pqrsf .cwc-pqrsf__otra:hover { color: var(--cwc-btn); }
.cwc-pqrsf .cwc-pqrsf__otra:focus-visible { outline: 2px solid var(--cwc-p); outline-offset: 3px; border-radius: 2px; }

/* Modal de agradecimiento (el JS lo mueve al <body> y le copia las variables de color) */
html.cwc-sin-scroll { overflow: hidden; }
.cwc-pqrsf__modal {
	--cwc-p: #004642;
	--cwc-btn: #479588;
	--cwc-btn-h: #004642;
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--cwc-fuente, inherit);
}
.cwc-pqrsf__modal[hidden] { display: none; }
.cwc-pqrsf__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 32, 30, .55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .25s ease;
}
.cwc-pqrsf__dialogo {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 40px 28px 28px;
	border-radius: 20px;
	background: #fff;
	color: #1f2d2b;
	text-align: center;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
	opacity: 0;
	transform: translateY(16px) scale(.96);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1.2);
}
.cwc-pqrsf__dialogo:focus { outline: none; }
.cwc-pqrsf__modal.is-open .cwc-pqrsf__overlay { opacity: 1; }
.cwc-pqrsf__modal.is-open .cwc-pqrsf__dialogo { opacity: 1; transform: none; }

.cwc-pqrsf__check-anim { display: flex; justify-content: center; margin-bottom: 14px; }
.cwc-pqrsf__check-anim circle { stroke: var(--cwc-btn); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; }
.cwc-pqrsf__check-anim path { stroke: var(--cwc-btn); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.cwc-pqrsf__modal.is-open .cwc-pqrsf__check-anim circle { animation: cwc-trazo .6s ease-out .1s forwards; }
.cwc-pqrsf__modal.is-open .cwc-pqrsf__check-anim path { animation: cwc-trazo .35s ease-out .6s forwards; }
@keyframes cwc-trazo { to { stroke-dashoffset: 0; } }

.cwc-pqrsf__mt { margin: 0 0 10px; color: var(--cwc-p); font-family: inherit; font-size: 22px; font-weight: 700; line-height: 1.3; }
.cwc-pqrsf__md { font-size: 15.5px; line-height: 1.6; color: #3d4a48; }
.cwc-pqrsf__md p { margin: 0 0 6px; }
.cwc-pqrsf__md strong { color: var(--cwc-p); }

.cwc-pqrsf__modal .cwc-pqrsf__btn,
.cwc-pqrsf__modal .cwc-pqrsf__btn:hover,
.cwc-pqrsf__modal .cwc-pqrsf__btn:focus,
.cwc-pqrsf__modal .cwc-pqrsf__btn:active {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 22px 0 0;
	padding: 12px 24px;
	border: 0;
	border-radius: 12px;
	background: var(--cwc-btn);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}
.cwc-pqrsf__modal .cwc-pqrsf__btn:hover { background: var(--cwc-btn-h); }
.cwc-pqrsf__modal .cwc-pqrsf__btn:focus-visible { outline: 3px solid var(--cwc-p); outline-offset: 3px; }

.cwc-pqrsf__modal .cwc-pqrsf__x,
.cwc-pqrsf__modal .cwc-pqrsf__x:hover,
.cwc-pqrsf__modal .cwc-pqrsf__x:focus,
.cwc-pqrsf__modal .cwc-pqrsf__x:active {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5b6766;
	cursor: pointer;
	box-shadow: none;
}
.cwc-pqrsf__modal .cwc-pqrsf__x:hover { background: #eef2f1; color: #1f2d2b; }
.cwc-pqrsf__modal .cwc-pqrsf__x:focus-visible { outline: 2px solid var(--cwc-p); outline-offset: 1px; }

@media (max-width: 480px) {
	.cwc-pqrsf__modal { align-items: flex-end; padding: 0; }
	.cwc-pqrsf__dialogo { max-width: none; border-radius: 20px 20px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateY(40px); }
}

@media (prefers-reduced-motion: reduce) {
	.cwc-pqrsf__overlay,
	.cwc-pqrsf__dialogo { transition: none; }
	.cwc-pqrsf__check-anim circle,
	.cwc-pqrsf__check-anim path { stroke-dashoffset: 0; animation: none !important; }
}
