/**
 * Barra superior: muestra la promo activa de la sección «barra» y, si no hay
 * ninguna, el mensaje fijo de siempre (envíos, cuotas). Una sola barra: la
 * promo reemplaza al texto, no se apilan.
 *
 * Todo sale de los tokens de BT Diseño.
 */

/* La franja del header ya trae su propio degradado y padding: cuando la barra
   vive adentro, el padding lo maneja ella (si no, se dibujan dos bandas). */
.bt-announce:has(.bt-bar) {
	padding: 0;
}

/* wpautop deja párrafos vacíos alrededor del shortcode: que no ocupen alto. */
.bt-bar > p:empty {
	display: none;
	margin: 0;
}

.bt-bar {
	--bt-bar-ink: var(--wp--preset--color--primary-ink, #fff);

	position: relative;
	background: var(--wp--preset--color--primary, #F000E0);
	background-image: linear-gradient(
		92deg,
		var(--wp--preset--color--primary, #F000E0) 0%,
		color-mix(in srgb, var(--wp--preset--color--secondary, #F00068) 70%, var(--wp--preset--color--primary, #F000E0)) 100%
	);
	color: var(--bt-bar-ink);
	font-family: var(--wp--preset--font-family--system, inherit);
	border-bottom: 2px solid var(--wp--preset--color--accent, #00F010);
}

.bt-bar__link {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: .3rem .7rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: .55rem 2.4rem;
	color: inherit;
	text-decoration: none;
	font-size: .82rem;
	line-height: 1.3;
}

.bt-bar__link:hover,
.bt-bar__link:focus-visible {
	color: inherit;
	text-decoration: none;
}

.bt-bar__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent, #00F010);
	outline-offset: -3px;
}

/* Etiqueta del eyebrow: bloque invertido, esquinas vivas. */
.bt-bar__tag {
	flex: 0 0 auto;
	background: var(--bt-bar-ink);
	color: var(--wp--preset--color--primary, #F000E0);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700;
	font-size: .68rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .18rem .5rem;
}

.bt-bar__title {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700;
	letter-spacing: .01em;
	text-transform: uppercase;
	font-size: .86rem;
}

.bt-bar__desc {
	opacity: .92;
}

/* Cuenta regresiva: el dato que empuja a hacer clic. */
.bt-bar__timer {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: .32rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	padding: .12rem .45rem;
	background: color-mix(in srgb, var(--wp--preset--color--contrast, #241423) 30%, transparent);
}

.bt-bar__timer::before {
	content: "";
	width: 6px;
	height: 6px;
	background: var(--wp--preset--color--accent, #00F010);
}

.bt-bar__cta {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--accent, #00F010);
}

.bt-bar__link:hover .bt-bar__cta {
	text-decoration-color: var(--bt-bar-ink);
}

/* Cerrar: vuelve al mensaje fijo, no deja la franja vacía. */
.bt-bar__x {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	display: grid;
	place-items: center;
	border: 0;
	background: none;
	color: inherit;
	opacity: .75;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.bt-bar__x:hover {
	opacity: 1;
	background: color-mix(in srgb, var(--wp--preset--color--contrast, #241423) 25%, transparent);
}

/* Mensaje fijo (fallback). Mismo alto, sin color de promo. */
.bt-bar__fijo {
	display: none;
	text-align: center;
	padding: .55rem 1rem;
	font-size: .8rem;
	line-height: 1.3;
}

/* Estado: promo descartada → aparece el mensaje fijo. */
.bt-bar.is-dismissed {
	background: none;
	border-bottom: 0;
	color: inherit;
}

.bt-bar.is-dismissed .bt-bar__promo,
.bt-bar.is-dismissed .bt-bar__x {
	display: none;
}

.bt-bar.is-dismissed .bt-bar__fijo {
	display: block;
}

/* Sin promo activa: sólo el mensaje fijo, sin la franja de color. */
.bt-bar--fijo {
	background: none;
	border-bottom: 0;
	color: inherit;
}

.bt-bar--fijo .bt-bar__fijo {
	display: block;
}

@media (max-width: 640px) {
	.bt-bar__desc {
		display: none;
	}

	.bt-bar__link {
		padding-inline: 2rem 2.2rem;
		font-size: .78rem;
	}
}
