/* Suscripción por industria (todo el sitio). Diseño de marketing:
   "Pop-up Blog SV", variante B (slide-in lateral). Lo usan el panel que abre
   el footer (.sv-sub) y el recuadro del blog (.sv-sub-card). */

.sv-sub-ui {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 28px 26px 24px;
	background: #232325;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 16px;
	box-sizing: border-box;
	font-family: 'Nunito', 'Nunito Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: #fff;
}

/* ---- Panel lateral (footer) ---- */

.sv-sub {
	position: fixed;
	right: 28px;
	bottom: 28px;
	z-index: 99999;
	width: 420px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 56px);
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.sv-sub[hidden] { display: none; }
.sv-sub.is-in { animation: sv-sub-in .35s cubic-bezier(.2, .8, .2, 1); }

@keyframes sv-sub-in {
	from { opacity: 0; transform: translateX(40px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.sv-sub.is-in { animation: none; }
}

.sv-sub .sv-sub__x {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0 !important;
	border-radius: 999px;
	background: transparent;
	color: #a9acb3;
	cursor: pointer;
}

.sv-sub .sv-sub__x:hover { background: rgba(255, 255, 255, .06); color: #fff; }

/* ---- Recuadro del blog ---- */

.sv-sub-card { margin: 0 0 24px; }

/* [sv_suscripcion fondo="no"]: sin tarjeta, sobre el fondo del footer. */
.sv-sub-card--plain { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }
/* Con container-type la tarjeta no toma el ancho de su contenido: en
   contenedores flex centrados (Spectra) hay que darle el ancho completo. */
.sv-sub-card { container-type: inline-size; width: 100%; }

/* En el footer, los márgenes los pone la columna (contenedor de Spectra). */
.site-footer .sv-sub-card--plain { gap: 22px; }


/* ---- Contenido común ---- */

.sv-sub-ui .sv-sub__title {
	margin: 0;
	padding: 0 32px 0 0;
	font-family: inherit;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: .01em;
	text-transform: none;
	color: #fff;
}

.sv-sub-card .sv-sub__title { padding-right: 0; }

.sv-sub-ui .sv-sub__form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.sv-sub-ui .sv-sub__form[hidden], .sv-sub-ui .sv-sub__done[hidden] { display: none; }

.sv-sub__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* El CSS adicional del sitio fuerza borde, relleno y alto de todos los campos
   con !important: acá se anula solo para este formulario. */
.sv-sub-ui .sv-sub__input {
	width: 100%;
	height: 46px !important;
	margin: 0;
	padding: 0 18px !important;
	border: 1px solid rgba(255, 255, 255, .14) !important;
	border-radius: 999px;
	background: #1b1b1d;
	color: #fff;
	font: inherit;
	font-size: 15px;
	box-shadow: none;
	box-sizing: border-box;
}

.sv-sub-ui .sv-sub__input:focus { border: 1px solid #0057ff !important; background: #1b1b1d; color: #fff; outline: none; }
.sv-sub-ui .sv-sub__input::placeholder { color: #7d8088; opacity: 1; }

.sv-sub-ui .sv-sub__industries { min-width: 0; margin: 0; padding: 0; border: 0; }

.sv-sub-ui .sv-sub__legend { margin: 0 0 8px; padding: 0; font-size: 12px; line-height: 1.4; color: #a9acb3; }
.sv-sub-ui .sv-sub__legend strong { font-weight: 700; color: #fff; }

.sv-sub__chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Cada industria es un checkbox con forma de chip. */
.sv-sub-ui .sv-sub__chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 999px;
	background: transparent;
	color: #b9bcc3;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	transition: border-color .15s, background-color .15s, color .15s;
}

.sv-sub-ui .sv-sub__chip:hover { border-color: rgba(255, 255, 255, .4); color: #fff; }

.sv-sub-ui .sv-sub__chip input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.sv-sub__mark {
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 3px;
	box-sizing: border-box;
}

.sv-sub-ui .sv-sub__chip:has(input:checked) { border-color: #0057ff; background: rgba(0, 87, 255, .18); color: #fff; }
.sv-sub__chip:has(input:checked) .sv-sub__mark { border-color: #0057ff; background: #0057ff; }
.sv-sub__chip:has(input:focus-visible) { outline: 2px solid #8fb0ff; outline-offset: 2px; }

.sv-sub-ui .sv-sub__status { margin: 0; font-size: 13px; font-weight: 700; color: #a9acb3; }
.sv-sub-ui .sv-sub__status:empty { display: none; }
.sv-sub-ui .sv-sub__status.is-error { color: #ff8a80; }

.sv-sub-ui .sv-sub__btn {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 24px;
	border: 0 !important;
	border-radius: 999px;
	background: #0057ff;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.sv-sub-ui .sv-sub__btn:hover, .sv-sub-ui .sv-sub__btn:focus { background: #0047d1; color: #fff; }
.sv-sub-ui .sv-sub__btn:disabled { opacity: .6; cursor: wait; }

.sv-sub-ui .sv-sub__legal { margin: 0; font-size: 13px; line-height: 1.5; color: #a9acb3; }
.sv-sub-ui .sv-sub__legal a { color: #fff; text-decoration: underline; }
.sv-sub-ui .sv-sub__legal a:hover { color: #8fb0ff; }

.sv-sub-ui .sv-sub__done { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.sv-sub__done:focus { outline: none; }
.sv-sub-ui .sv-sub__ok { margin: 0; font-size: 16px; font-weight: 700; color: #7ee2a8; }
.sv-sub-ui .sv-sub__summary { margin: 0; font-size: 13px; line-height: 1.5; color: #a9acb3; }

/* "Preguntas frecuentes" y "Políticas de privacidad": enlaces generales del
   sitio, debajo de la tarjeta (fuera del recuadro del newsletter). */
.sv-sub-block { width: 100%; }
.sv-sub-block .sv-sub__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0 0; padding: 0; font-family: 'Nunito', 'Nunito Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.4; }
.sv-sub-block .sv-sub-card--plain + .sv-sub__links { padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sv-sub-block .sv-sub__links a, .sv-sub-block .sv-sub__links a:visited { color: #a9acb3; text-decoration: none; }
.sv-sub-block .sv-sub__links a:hover { color: #fff; text-decoration: underline; }

/* El sitio quita el contorno de foco con !important: se restaura acá. */
.sv-sub-ui :is(button, a):focus-visible { outline: 2px solid #8fb0ff !important; outline-offset: 2px; }

.sv-sub-ui .sv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 600px) {
	.sv-sub { right: 12px; bottom: 12px; left: 12px; width: auto; max-width: none; max-height: calc(100vh - 24px); padding: 24px 18px 18px; }
	.sv-sub.is-in { animation-name: sv-sub-up; }
	.sv-sub-ui .sv-sub__title { font-size: 22px; }
}

@keyframes sv-sub-up {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: none; }
}

/* En columnas angostas (lateral de la nota) los chips se compactan para
   entrar de a dos por fila. */
@container (max-width: 340px) {
	.sv-sub-ui .sv-sub__title { font-size: 21px; }
	.sv-sub__chips { gap: 5px; }
	.sv-sub-ui .sv-sub__chip { gap: 5px; height: 32px; padding: 0 9px; font-size: 12px; }
}

/* En columnas anchas (footer) el formulario respira más: medidas de la
   variante A del diseño y botón de ancho fijo. */
@container (min-width: 520px) {
	.sv-sub-ui .sv-sub__form { gap: 20px; }
	.sv-sub-ui .sv-sub__input { height: 52px !important; padding: 0 22px !important; font-size: 16px; }
	.sv-sub-ui .sv-sub__legend { margin-bottom: 12px; font-size: 14px; }
	.sv-sub__chips { gap: 10px; }
	.sv-sub-ui .sv-sub__chip { gap: 8px; height: 40px; padding: 0 16px; font-size: 14px; }
	.sv-sub__mark { width: 12px; height: 12px; }
	.sv-sub-ui .sv-sub__btn { width: auto; min-width: 257px; height: 50px; align-self: flex-start; }
	.sv-sub-ui .sv-sub__legal { font-size: 14px; }
}

/* ---- Pop-up de lanzamiento del blog (includes/popup.php) ---- */

.sv-promo {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: 'Nunito', 'Nunito Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.sv-promo[hidden] { display: none; }
.sv-promo-open, .sv-promo-open body { overflow: hidden; }

.sv-promo__backdrop { position: absolute; inset: 0; background: rgba(12, 12, 14, .66); animation: sv-promo-fade .25s ease-out; }

.sv-promo__dialog {
	position: relative;
	display: grid;
	grid-template-columns: 40% 60%;
	width: 100%;
	max-width: 880px;
	max-height: calc(100vh - 32px);
	overflow: hidden;
	background: #232325;
	border-radius: 14px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
	animation: sv-promo-in .3s cubic-bezier(.2, .8, .2, 1);
}

@keyframes sv-promo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sv-promo-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.sv-promo__backdrop, .sv-promo__dialog { animation: none; }
}

.sv-promo__media { position: relative; min-height: 100%; background: #1b1b1d; }
.sv-promo__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.sv-promo .sv-promo__body {
	gap: 18px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 44px 40px 32px;
	border: 0;
	border-radius: 0;
}

.sv-promo .sv-promo__x {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0 !important;
	border-radius: 999px;
	background: transparent;
	color: #a9acb3;
	cursor: pointer;
}

.sv-promo .sv-promo__x:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.sv-promo__badge {
	align-self: flex-start;
	margin-bottom: -6px;
	padding: 5px 9px;
	border-radius: 3px;
	background: #0057ff;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sv-promo .sv-promo__title { padding: 0; font-size: 32px; line-height: 1.1; text-transform: uppercase; }

/* El formulario va en un recuadro, como en el diseño. */
.sv-promo .sv-sub__form,
.sv-promo .sv-sub__done { padding: 20px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.sv-promo .sv-sub__btn { align-self: center; width: auto; min-width: 220px; }

@media (max-width: 760px) {
	.sv-promo { align-items: flex-end; padding: 0; }
	.sv-promo__dialog { grid-template-columns: 1fr; max-height: 92vh; border-radius: 14px 14px 0 0; }
	.sv-promo__media { display: none; }
	.sv-promo .sv-promo__body { max-height: 92vh; padding: 32px 18px 22px; }
	.sv-promo .sv-promo__title { padding-right: 32px; font-size: 24px; }
	.sv-promo .sv-sub__form, .sv-promo .sv-sub__done { padding: 14px; }
	.sv-promo .sv-sub__btn { width: 100%; }
}
