/* Formulario "Semáforo" — revisión del resultado con un abogado (CG_Form_Semaforo_Revision).
   Editorial, morado = empresas. Verde/ámbar/rojo solo como semántica del resultado. */
.cgs-overlay { --m: #4b2e83; --m-s: #f1eef5; --tinta: #262626; --crema: #fcfcf2; --v: #1e7f61; --a: #d99a1e; --r: #b3261e;
	position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px;
	background: rgba(24, 16, 40, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cgs-overlay[hidden], .cgs-overlay [hidden] { display: none !important; }
body.cgs-abierto { overflow: hidden; }
.cgs-modal { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); width: 100%; max-width: 980px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
	overflow: hidden; border-radius: 22px; background: #fff; color: var(--tinta); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); animation: cgs-entra .28s ease-out; }
@keyframes cgs-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.cgs-cerrar { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: var(--m-s); color: var(--m); font-size: 1rem; line-height: 1; cursor: pointer; }
.cgs-cerrar:hover { background: var(--m); color: #fff; }

/* Resumen (columna izquierda) */
.cgs-resumen { display: flex; flex-direction: column; padding: 30px 26px; overflow-y: auto; background: var(--m); color: var(--crema); }
.cgs-kicker { margin: 0 0 18px; font-size: .64rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #c9b8ee; }
.cgs-resultado { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .22); }
.cgs-luz { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #777; }
[data-color="verde"] > .cgs-luz { background: var(--v); box-shadow: 0 0 0 5px rgba(30, 127, 97, .3), 0 0 18px rgba(46, 185, 143, .6); }
[data-color="amarillo"] > .cgs-luz { background: var(--a); box-shadow: 0 0 0 5px rgba(217, 154, 30, .3), 0 0 18px rgba(217, 154, 30, .6); }
[data-color="rojo"] > .cgs-luz { background: var(--r); box-shadow: 0 0 0 5px rgba(179, 38, 30, .35), 0 0 18px rgba(226, 85, 79, .6); }
.cgs-resultado b { display: block; font-size: 1.05rem; line-height: 1.2; color: #fff; }
.cgs-resultado small { font-size: .78rem; color: rgba(252, 252, 242, .7); }
.cgs-mini { margin: 0 0 10px; font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(252, 252, 242, .6); }
.cgs-acciones { margin: 0 0 auto !important; padding: 0; list-style: none; }
.cgs-acciones li { position: relative; margin: 0 !important; padding: 9px 0 9px 18px; border-top: 1px solid rgba(252, 252, 242, .14); font-size: .84rem; line-height: 1.4; color: rgba(252, 252, 242, .9); }
.cgs-acciones li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: rgba(252, 252, 242, .4); }
.cgs-acciones li[data-color="rojo"]::before { background: #e2554f; }
.cgs-acciones li[data-color="amarillo"]::before { background: #f2b33d; }
.cgs-acciones .cgs-mas { padding-left: 0; color: rgba(252, 252, 242, .65); font-style: italic; }
.cgs-acciones .cgs-mas::before { display: none; }
.cgs-resumen-pie { margin: 22px 0 0; padding-top: 16px; border-top: 1px dashed rgba(252, 252, 242, .25); font-size: .8rem; line-height: 1.5; color: rgba(252, 252, 242, .75); }

/* Cuerpo (columna derecha) */
.cgs-cuerpo { min-height: 0; padding: 30px 34px 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.cgs-resumen { min-height: 0; }
.cgs-paso:not(.cgs-listo) { padding-bottom: 0; }
.cgs-listo { padding-bottom: 26px !important; }
.cgs-titulo { margin: 0 46px 14px 0; font-size: 1.75rem; line-height: 1.1; letter-spacing: -.02em; color: var(--tinta); }
.cgs-titulo em { color: var(--m); font-style: italic; }
.cgs-pasos { display: flex; gap: 6px; margin: 0 0 22px !important; padding: 0; list-style: none; counter-reset: none; }
.cgs-pasos li { display: flex; align-items: center; gap: 7px; margin: 0 !important; padding: 6px 12px 6px 6px; border-radius: 99px; background: #f4f2f7; color: #8a8a8a; font-size: .78rem; font-weight: 700; }
.cgs-pasos li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-size: .72rem; }
.cgs-pasos li.is-on { background: var(--m); color: #fff; }
.cgs-pasos li.is-on span { color: var(--m); }
.cgs-pasos li.is-done { background: var(--m-s); color: var(--m); }
.cgs-lede { margin: 0 0 14px; font-size: .95rem; line-height: 1.5; color: #444; }
.cgs-lede b { color: var(--tinta); }
.cgs-cargando { display: block; padding: 14px 0; font-size: .9rem; color: #777; }
.cgs-fechas { display: flex; gap: 8px; margin-bottom: 14px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.cgs-fechas button { flex: none; display: grid; justify-items: center; gap: 1px; width: 64px; min-height: 0; margin: 0; padding: 9px 0 8px; border: 1.5px solid #e2dcec; border-radius: 12px;
	background: #fff; color: var(--tinta); line-height: 1.1; text-transform: none; letter-spacing: 0; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.cgs-fechas small { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a8a8a; }
.cgs-fechas b { font-size: 1.35rem; }
.cgs-fechas span { font-size: .7rem; color: #8a8a8a; }
.cgs-fechas button:hover { border-color: var(--m); }
.cgs-fechas button.is-on { border-color: var(--m); background: var(--m); color: #fff; }
.cgs-fechas button.is-on small, .cgs-fechas button.is-on span { color: rgba(255, 255, 255, .8); }
.cgs-horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 7px; min-height: 44px; }
.cgs-horas button { min-height: 0; margin: 0; padding: 9px 0; border: 1.5px solid #e2dcec; border-radius: 10px; background: #fff; color: var(--tinta); font-size: .88rem; font-weight: 700;
	line-height: 1.2; text-transform: none; letter-spacing: 0; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.cgs-horas button:hover { border-color: var(--m); color: var(--m); }
.cgs-horas button.is-on { border-color: var(--m); background: var(--m); color: #fff; }
/* Pie del paso pegado abajo: el botón de envío siempre se ve, aunque la pantalla sea baja. */
.cgs-paso-pie { position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 22px -34px 0; padding: 14px 34px 18px; border-top: 1px solid #eee; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cgs-seguro { margin: 0 !important; padding: 0 0 18px; }
.cgs-link { min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--m); font-size: .86rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.cgs-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 0; margin: 0 0 0 auto; padding: 12px 22px; border: 0; border-radius: 99px; background: var(--m); color: #fff !important;
	font-size: .92rem; font-weight: 700; line-height: 1.2; text-transform: none; letter-spacing: 0; text-decoration: none; cursor: pointer; box-shadow: 0 10px 22px -12px rgba(75, 46, 131, .9); transition: background .2s ease, transform .2s ease; }
.cgs-btn:hover { background: #3a2266; transform: translateY(-1px); }
.cgs-btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.cgs-btn.is-cargando { opacity: .7; pointer-events: none; }
.cgs-btn.is-cargando::after { content: ""; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: cgs-gira .7s linear infinite; }
@keyframes cgs-gira { to { transform: rotate(360deg); } }
.cgs-btn--linea { background: #fff; color: var(--m) !important; border: 1.5px solid var(--m); box-shadow: none; }
.cgs-btn--linea:hover { background: var(--m-s); }

/* Paso 2 */
.cgs-elegido { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--m-s); font-size: .88rem; color: #333; }
.cgs-elegido b { color: var(--m); }
.cgs-campo { display: block; margin: 0 0 14px; }
.cgs-label { display: block; margin-bottom: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: #555; }
.cgs-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cgs-campo input { width: 100%; height: 44px; margin: 0; padding: 0 13px; border: 1.5px solid #ddd8e6; border-radius: 10px; background: #fff; box-shadow: none; font-size: .95rem; color: var(--tinta); transition: border-color .15s ease, box-shadow .15s ease; }
.cgs-campo input:focus { border-color: var(--m); box-shadow: 0 0 0 3px rgba(75, 46, 131, .14); outline: 0; }
.cgs-campo input.is-error { border-color: var(--r); box-shadow: 0 0 0 3px rgba(179, 38, 30, .1); }
.cgs-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; border-radius: 12px; }
.cgs-chips.is-error { box-shadow: 0 0 0 2px rgba(179, 38, 30, .55); }
.cgs-chips button { min-height: 0; margin: 0; padding: 7px 13px; border: 1.5px solid #ddd8e6; border-radius: 99px; background: #fff; color: #444; font-size: .84rem; font-weight: 600;
	line-height: 1.2; text-transform: none; letter-spacing: 0; cursor: pointer; transition: all .15s ease; }
.cgs-chips button:hover { border-color: var(--m); color: var(--m); }
.cgs-chips button.is-on { border-color: var(--m); background: var(--m); color: #fff; }
.cgs-legal { display: grid; gap: 8px; margin: 6px 0 12px; }
.cgs-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 8px 10px; border-radius: 10px; font-size: .84rem; font-weight: 400; line-height: 1.45; color: #444; cursor: pointer; }
.cgs-check:hover { background: #faf9fc; }
.cgs-check.is-error { background: #fbeceb; }
.cgs-check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--m); }
.cgs-check .cgs-link { font-size: inherit; }
.cgs-error { margin: 0 0 6px; padding: 9px 12px; border-radius: 10px; background: #fbeceb; color: var(--r); font-size: .86rem; font-weight: 600; }
.cgs-seguro { margin: 12px 0 0; font-size: .74rem; color: #8a8a8a; text-align: right; }
.cgs-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* Paso 3 */
.cgs-listo { padding: 6px 0 4px; text-align: center; outline: 0; }
.cgs-listo-sello { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%; background: var(--m); color: #fff; font-size: 1.8rem; box-shadow: 0 0 0 8px var(--m-s); animation: cgs-pop .4s ease-out; }
@keyframes cgs-pop { from { transform: scale(.4); opacity: 0; } }
.cgs-listo h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--tinta); }
.cgs-listo > p { max-width: 30em; margin: 0 auto 18px; font-size: .95rem; line-height: 1.55; color: #555; }
.cgs-listo-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto 20px; }
.cgs-listo-datos div { padding: 10px; border-radius: 12px; background: var(--m-s); }
.cgs-listo-datos dt { font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8a8a8a; }
.cgs-listo-datos dt, .cgs-listo-datos dd { float: none; text-align: center; }
.cgs-listo-datos dd { margin: 3px 0 0; font-size: .9rem; font-weight: 700; letter-spacing: normal; text-transform: none; color: var(--m); }
.cgs-listo-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cgs-listo-ctas .cgs-btn { margin: 0; }

/* Aviso de privacidad (form-common) por encima del modal */
#privacy-modal-overlay.lf-open { z-index: 100001; }

@media (max-width: 849px) {
	.cgs-overlay { align-items: stretch; padding: 0; }
	.cgs-modal { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); max-height: none; height: 100%; border-radius: 0; }
	.cgs-resumen { padding: 16px 60px 14px 18px; }
	.cgs-kicker, .cgs-mini, .cgs-acciones, .cgs-resumen-pie { display: none; }
	.cgs-resultado { margin: 0; padding: 10px 12px; }
	.cgs-luz { width: 24px; height: 24px; }
	.cgs-cuerpo { padding: 22px 18px 0; }
	.cgs-paso-pie { margin: 18px -18px 0; padding: 12px 18px 16px; }
	.cgs-titulo { margin-right: 0; font-size: 1.4rem; }
	.cgs-fila { grid-template-columns: 1fr; }
	.cgs-pasos li { padding-right: 10px; font-size: .72rem; }
}
@media (max-width: 549px) {
	.cgs-paso-pie { flex-direction: column-reverse; align-items: stretch; }
	.cgs-btn { justify-content: center; width: 100%; margin: 0; }
	.cgs-link { align-self: center; }
	.cgs-seguro { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .cgs-modal, .cgs-listo-sello, .cgs-btn.is-cargando::after { animation: none; } .cgs-btn, .cgs-fechas button, .cgs-horas button, .cgs-chips button { transition: none; } }

/* Pantallas bajas (laptops de 13"): menos aire para que todo quepa con poco scroll. */
@media (min-width: 850px) and (max-height: 820px) {
	.cgs-cuerpo { padding-top: 22px; }
	.cgs-titulo { margin-bottom: 10px; font-size: 1.5rem; }
	.cgs-pasos { margin-bottom: 14px !important; }
	.cgs-campo { margin-bottom: 10px; }
	.cgs-campo input { height: 40px; }
	.cgs-elegido { margin-bottom: 12px; padding: 8px 12px; }
	.cgs-check { padding: 5px 8px; }
	.cgs-resumen { padding: 22px 22px; }
}
