/*
 * Encuesta Flormorado · pestaña y panel.
 *
 * Posición de la pestaña, medida contra el botón de WhatsApp del sitio:
 *   ≥ 1220 px  pestaña vertical en el borde derecho, a media altura (fuera del contenido).
 *   768-1219   círculo de 50 px encima del WhatsApp: right 20 px, bottom 87 px.
 *   < 768      círculo de 48 px encima del WhatsApp: right 10 px, bottom 75 px.
 * Panel: lateral de 380 px en computador y tableta; hoja inferior en celular.
 *
 * Los selectores van reforzados (clase doble) para ganarle a los estilos de botones,
 * títulos y campos del tema y del kit de Elementor.
 */
button.fm-enc-pestana.fm-enc-pestana,
.fm-enc.fm-enc {
	--fm-azul: #0a2d40;
	--fm-rojo: #aa060f;
	--fm-tinta: #1d2327;
	--fm-gris: #5b6670;
	--fm-borde: #dbe1e6;
	--fm-suave: #f2f5f7;
	--fm-letra: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.fm-enc.fm-enc,
.fm-enc.fm-enc *,
button.fm-enc-pestana.fm-enc-pestana {
	font-family: var(--fm-letra);
	letter-spacing: normal;
	text-transform: none;
}

/* ── Pestaña ─────────────────────────────────────────────── */
button.fm-enc-pestana.fm-enc-pestana {
	position: fixed;
	z-index: 90;
	right: 10px;
	bottom: 75px;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fm-azul);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	box-shadow: 0 6px 18px -6px rgba(10, 45, 64, .55);
	transition: background-color .15s ease;
}
button.fm-enc-pestana.fm-enc-pestana[hidden] { display: none; }
button.fm-enc-pestana.fm-enc-pestana:hover { background: var(--fm-rojo); }
button.fm-enc-pestana.fm-enc-pestana:focus-visible { outline: 3px solid var(--fm-rojo); outline-offset: 3px; }
button.fm-enc-pestana.fm-enc-pestana svg { width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fm-enc-pestana__texto {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Invitación: el círculo da un pequeño salto y emite una onda. */
button.fm-enc-pestana.fm-enc-pestana::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit;
	box-shadow: 0 0 0 0 rgba(170, 6, 15, .45); pointer-events: none; opacity: 0;
}
button.fm-enc-pestana.fm-enc-pestana.is-asomo { animation: fm-enc-salto 1.1s ease-in-out; }
button.fm-enc-pestana.fm-enc-pestana.is-asomo::after { animation: fm-enc-onda 1.4s ease-out; }
@keyframes fm-enc-salto {
	0%, 100% { transform: none; }
	25% { transform: translateY(-6px) rotate(-6deg); }
	45% { transform: translateY(0) rotate(4deg); }
	65% { transform: translateY(-3px) rotate(-2deg); }
}
@keyframes fm-enc-onda {
	0% { opacity: 1; box-shadow: 0 0 0 0 rgba(170, 6, 15, .45); }
	100% { opacity: 0; box-shadow: 0 0 0 16px rgba(170, 6, 15, 0); }
}

@media (min-width: 768px) {
	button.fm-enc-pestana.fm-enc-pestana { right: 20px; bottom: 87px; width: 50px; height: 50px; }
}

@media (min-width: 1220px) {
	button.fm-enc-pestana.fm-enc-pestana {
		top: 50%;
		bottom: auto;
		right: 0;
		width: auto;
		height: auto;
		padding: 14px 10px;
		border-radius: 8px 0 0 8px;
		transform: translateY(-50%);
		writing-mode: vertical-rl;
		box-shadow: -4px 6px 18px -8px rgba(10, 45, 64, .5);
	}
	button.fm-enc-pestana.fm-enc-pestana svg { width: 19px; height: 19px; transform: rotate(90deg); }
	.fm-enc-pestana__texto {
		position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto;
		transform: rotate(180deg);
		font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	}
	/* En la pestaña vertical, la invitación es un asomo hacia la izquierda. */
	button.fm-enc-pestana.fm-enc-pestana.is-asomo { animation: fm-enc-asomo 1.2s ease-in-out; }
	button.fm-enc-pestana.fm-enc-pestana::after { border-radius: 8px 0 0 8px; }
}
@keyframes fm-enc-asomo {
	0%, 100% { padding-right: 10px; }
	30% { padding-right: 19px; }
	55% { padding-right: 10px; }
	75% { padding-right: 14px; }
}

/* ── Panel ───────────────────────────────────────────────── */
.fm-enc.fm-enc {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(380px, 100%);
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--fm-tinta);
	font-size: 13.5px;
	line-height: 1.45;
	box-shadow: -18px 0 44px -20px rgba(10, 45, 64, .45);
	overflow-y: auto;
	overscroll-behavior: contain;
}
.fm-enc.fm-enc[open] { display: flex; flex-direction: column; animation: fm-enc-lado .2s ease-out; }
.fm-enc.fm-enc::backdrop { background: rgba(10, 45, 64, .4); }
@keyframes fm-enc-lado { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fm-enc-sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.fm-enc.fm-enc *,
.fm-enc.fm-enc *::before,
.fm-enc.fm-enc *::after { box-sizing: border-box; }

.fm-enc__cab {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px;
	background: var(--fm-azul);
	color: #fff;
}
.fm-enc.fm-enc .fm-enc__titulo {
	margin: 0; padding: 0; font-size: 16px; line-height: 1.3; font-weight: 600; color: inherit;
}
.fm-enc.fm-enc .fm-enc__intro { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: #c9d7e1; }
button.fm-enc__cerrar.fm-enc__cerrar {
	flex: none; width: 32px; height: 32px; min-height: 0; margin: -4px -6px 0 0; padding: 0;
	display: grid; place-items: center; border: 0; border-radius: 50%;
	background: transparent; color: #fff; cursor: pointer; box-shadow: none;
}
button.fm-enc__cerrar.fm-enc__cerrar:hover { background: rgba(255, 255, 255, .14); }
button.fm-enc__cerrar.fm-enc__cerrar:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
button.fm-enc__cerrar.fm-enc__cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.fm-enc.fm-enc .fm-enc__equipo { margin: 0; padding: 7px 16px; background: #fff6dc; color: #6b4b00; font-size: 12px; border-bottom: 1px solid #f0e2b4; }

.fm-enc__form { display: flex; flex-direction: column; gap: 16px; padding: 14px 16px 18px; }
.fm-enc__form[hidden] { display: none; }

.fm-enc.fm-enc .fm-enc__p { margin: 0; padding: 0; border: 0; min-width: 0; }
.fm-enc.fm-enc .fm-enc__p legend {
	display: block; width: 100%; padding: 0; margin: 0 0 8px;
	font-size: 13.5px; line-height: 1.4; font-weight: 600; color: var(--fm-azul);
}
.fm-enc__n {
	display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 7px;
	border-radius: 50%; background: var(--fm-rojo); color: #fff; font-size: 11px; font-weight: 700;
	vertical-align: 1px;
}
.fm-enc.fm-enc .fm-enc__pista { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--fm-gris); }

.fm-enc__lista { display: flex; flex-direction: column; gap: 4px; }
.fm-enc.fm-enc .fm-enc__opcion {
	position: relative;
	display: flex; align-items: center; gap: 9px;
	min-height: 36px; margin: 0; padding: 6px 10px;
	border: 1px solid var(--fm-borde); border-radius: 6px;
	background: #fff; cursor: pointer;
	font-size: 13px; font-weight: 400; line-height: 1.35; color: var(--fm-tinta);
	transition: border-color .12s ease, background-color .12s ease;
}
.fm-enc.fm-enc .fm-enc__opcion:hover { border-color: var(--fm-azul); }
.fm-enc__opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fm-enc__valor {
	flex: none; display: grid; place-items: center; width: 21px; height: 21px;
	border: 1.5px solid var(--fm-borde); border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--fm-gris);
}
.fm-enc__opcion--caja::before,
.fm-enc__opcion--punto::before {
	content: ""; flex: none; width: 16px; height: 16px; border: 1.5px solid #9aa6b0; border-radius: 3px; background: #fff center/12px no-repeat;
}
.fm-enc__opcion--punto::before { border-radius: 50%; }
.fm-enc.fm-enc .fm-enc__opcion:has(input:checked) { border-color: var(--fm-azul); background: var(--fm-suave); box-shadow: inset 0 0 0 1px var(--fm-azul); }
.fm-enc__opcion:has(input:checked) .fm-enc__valor { background: var(--fm-azul); border-color: var(--fm-azul); color: #fff; }
.fm-enc__opcion--caja:has(input:checked)::before {
	background-color: var(--fm-azul); border-color: var(--fm-azul);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.fm-enc__opcion--punto:has(input:checked)::before { border-color: var(--fm-azul); box-shadow: inset 0 0 0 3px #fff; background-color: var(--fm-azul); }
.fm-enc.fm-enc .fm-enc__opcion:has(input:focus-visible) { outline: 2px solid var(--fm-rojo); outline-offset: 2px; }
.fm-enc.fm-enc .fm-enc__opcion--ninguna { border-style: dashed; }

/* Escala de 0 a 10: un solo color para no sugerir qué número elegir. */
.fm-enc__escala { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; }
.fm-enc.fm-enc .fm-enc__nota { position: relative; margin: 0; cursor: pointer; }
.fm-enc__nota input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fm-enc__nota span {
	display: grid; place-items: center; height: 32px; min-width: 24px;
	border: 1px solid var(--fm-borde); border-radius: 5px; background: #fff;
	font-size: 12.5px; font-weight: 600; color: var(--fm-tinta);
	transition: background-color .12s ease, border-color .12s ease;
}
.fm-enc__nota:hover span { border-color: var(--fm-azul); }
.fm-enc__nota input:checked + span { background: var(--fm-azul); border-color: var(--fm-azul); color: #fff; }
.fm-enc__nota input:focus-visible + span { outline: 2px solid var(--fm-rojo); outline-offset: 2px; }
.fm-enc__extremos { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 11.5px; color: var(--fm-gris); }

.fm-enc.fm-enc .fm-enc__texto {
	display: block; width: 100%; min-height: 64px; margin: 0; padding: 8px 10px;
	border: 1px solid var(--fm-borde); border-radius: 6px; background: #fff;
	font-size: 13px; line-height: 1.45; color: var(--fm-tinta); resize: vertical; box-shadow: none;
}
.fm-enc.fm-enc .fm-enc__texto:focus { border-color: var(--fm-azul); outline: 2px solid var(--fm-azul); outline-offset: 0; }

.fm-enc.fm-enc .fm-enc__error { margin: 5px 0 0; font-size: 12px; font-weight: 600; color: #b3261e; }
.fm-enc__error[hidden] { display: none; }
.fm-enc.fm-enc .fm-enc__p.is-error legend { color: #b3261e; }
.fm-enc.fm-enc .fm-enc__aviso { margin: 5px 0 0; font-size: 12px; color: var(--fm-gris); }
.fm-enc__aviso:empty { display: none; }

.fm-enc__trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.fm-enc__pie { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 1px solid var(--fm-borde); }
button.fm-enc__enviar.fm-enc__enviar {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 40px; margin: 10px 0 0; padding: 9px 18px;
	border: 0; border-radius: 6px; background: var(--fm-rojo); color: #fff; box-shadow: none;
	font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
}
button.fm-enc__enviar.fm-enc__enviar:hover { background: #8c050c; }
button.fm-enc__enviar.fm-enc__enviar:focus-visible { outline: 3px solid var(--fm-azul); outline-offset: 2px; }
button.fm-enc__enviar.fm-enc__enviar[disabled] { opacity: .6; cursor: progress; }
.fm-enc.fm-enc .fm-enc__estado { margin: 0; font-size: 12.5px; color: #b3261e; }
.fm-enc__estado:empty { display: none; }
.fm-enc.fm-enc .fm-enc__nota-pie { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--fm-gris); }

.fm-enc__gracias {
	display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
	padding: 36px 22px; outline: none;
}
.fm-enc__gracias[hidden] { display: none; }
.fm-enc__gracias svg { width: 52px; height: 52px; fill: none; stroke: #1e7a46; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fm-enc.fm-enc .fm-enc__gracias .fm-enc__titulo { color: var(--fm-azul); }
.fm-enc.fm-enc .fm-enc__gracias p { margin: 0; color: var(--fm-gris); font-size: 13.5px; line-height: 1.5; }

/* ── Celular: hoja que sube desde abajo, con la altura justa ── */
@media (max-width: 767px) {
	.fm-enc.fm-enc {
		inset: auto 0 0 0;
		width: 100%;
		height: auto;
		max-height: 86vh;
		max-height: 86dvh;
		border-radius: 14px 14px 0 0;
		box-shadow: 0 -12px 36px -16px rgba(10, 45, 64, .5);
	}
	.fm-enc.fm-enc[open] { animation-name: fm-enc-sube; }
	.fm-enc__cab { padding: 14px 14px 10px; border-radius: 14px 14px 0 0; }
	.fm-enc__cab::before {
		content: ""; position: absolute; top: 5px; left: 50%; width: 34px; height: 4px; margin-left: -17px;
		border-radius: 2px; background: rgba(255, 255, 255, .35);
	}
	.fm-enc.fm-enc .fm-enc__titulo { font-size: 15px; }
	.fm-enc__form { gap: 14px; padding: 12px 14px 16px; }
	.fm-enc.fm-enc .fm-enc__opcion { min-height: 34px; padding: 5px 9px; font-size: 12.5px; }
	.fm-enc__escala { gap: 2px; }
	.fm-enc__nota span { height: 30px; min-width: 0; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.fm-enc.fm-enc[open],
	button.fm-enc-pestana.fm-enc-pestana.is-asomo,
	button.fm-enc-pestana.fm-enc-pestana.is-asomo::after { animation: none; }
	button.fm-enc-pestana.fm-enc-pestana, .fm-enc__opcion, .fm-enc__nota span { transition: none; }
}
@media print { .fm-enc-pestana, .fm-enc { display: none !important; } }
