**
 * Widget Discord (blog sidebar + barra del index).
 * Recuperado del child Woodmart tras el cutover a Hello/latamsquad.
 */

/*
 * Blog sidebar: recuadro Discord con recuento real (invite with_counts).
 * Texto blanco sobre fondo oscuro; CTA naranja del sitio.
 */
.sidebar-widget .ls-discord-widget,
.widget .ls-discord-widget,
.ls-discord-widget {
	box-sizing: border-box;
	width: 100%;
	max-width: 350px;
	margin: 0;
	padding: 16px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.72);
	color: #ffffff;
	text-align: left;
}

.ls-discord-widget__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
}

.ls-discord-widget__icon {
	display: block;
	width: 56px;
	height: 56px;
	flex-shrink: 0;
	border-radius: 16px;
	object-fit: cover;
	background: #2b2d31;
}

.ls-discord-widget__titles {
	min-width: 0;
}

.ls-discord-widget__name {
	margin: 0 0 4px;
	color: #ffffff;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.25;
}

.ls-discord-widget__online {
	margin: 0;
	color: #e8e8e8;
	font-size: 0.88rem;
	line-height: 1.3;
}

.ls-discord-widget__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: #23a559;
	vertical-align: middle;
}

.ls-discord-widget__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0 0 14px;
}

.ls-discord-widget__stat {
	padding: 10px 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	text-align: center;
}

.ls-discord-widget__num {
	display: block;
	color: #ffffff;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.2;
}

.ls-discord-widget__label {
	display: block;
	margin-top: 2px;
	color: #e8e8e8;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/*
 * Boton pastilla con el morado oficial de Discord (Blurple #5865F2) y su
 * variante de hover (#4752C4). Blanco sobre ese morado da 4,6:1 de contraste,
 * por encima del minimo AA de 4,5:1.
 */
.ls-discord-widget__join,
.sidebar-widget .ls-discord-widget__join,
.widget .ls-discord-widget__join {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 12px 22px;
	border-radius: 999px;
	background: #5865f2 !important;
	color: #ffffff !important;
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	transition: background-color .2s ease, transform .2s ease;
}

.ls-discord-widget__join:hover,
.ls-discord-widget__join:focus-visible,
.sidebar-widget .ls-discord-widget__join:hover,
.widget .ls-discord-widget__join:hover {
	background: #4752c4 !important;
	color: #ffffff !important;
	transform: translateY(-1px);
}

.ls-discord-widget__join:active,
.sidebar-widget .ls-discord-widget__join:active,
.widget .ls-discord-widget__join:active {
	background: #3c45a5 !important;
	transform: none;
}

/*
 * Barra de Discord del index (sin sidebar): ocupa el mismo ancho que la grilla
 * de 4 tarjetas. Va despues de las reglas base para poder pisar el max-width
 * de 350px del recuadro del blog.
 */
.ls-discord-widget--home {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px 24px;
	width: 100%;
	max-width: none;
	/* Aire respecto a la grilla de tarjetas, que ya aporta 14px por abajo. */
	margin: 22px 0 10px;
	padding: 20px 24px;
	border-radius: 16px;
	/* Fallback si no hay banner: menos negro que antes para no tapar el arte. */
	background-color: rgba(0, 0, 0, 0.48);
	background-position: center;
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

/*
 * Banner estirado al recuadro (100% 100%) para que cifras y etiquetas
 * (p. ej. 31.129 + Miembros) quepan en la misma franja. El velo es suave
 * para no tapar el arte; el texto lleva sombra.
 */
.ls-discord-widget--home.has-banner {
	background-image:
		linear-gradient(90deg, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0.28) 100%),
		var(--ls-discord-banner);
	background-size: 100% 100%;
}

.ls-discord-widget--home.has-banner .ls-discord-widget__name,
.ls-discord-widget--home.has-banner .ls-discord-widget__online,
.ls-discord-widget--home.has-banner .ls-discord-widget__desc {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.ls-discord-widget__head--home {
	flex: 1 1 200px;
	min-width: 0;
	margin: 0;
}

.ls-discord-widget--home .ls-discord-widget__icon {
	width: 64px;
	height: 64px;
	border-radius: 18px;
}

.ls-discord-widget--home .ls-discord-widget__name {
	font-size: 1.35rem;
}

.ls-discord-widget__desc {
	margin: 6px 0 0;
	max-width: 54ch;
	color: #d7dce3;
	font-size: 0.85rem;
	line-height: 1.35;
}

.ls-discord-widget__stats--home {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
}

.ls-discord-widget__stats--home .ls-discord-widget__stat {
	box-sizing: border-box;
	min-width: 7.6rem;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.10);
}

.ls-discord-widget__stats--home .ls-discord-widget__num,
.ls-discord-widget__stats--home .ls-discord-widget__label {
	white-space: nowrap;
}

.ls-discord-widget__join--home {
	flex: 0 0 auto;
	width: auto;
	margin: 0;
	/* Mas aire a los lados para que se note la forma de pastilla. */
	padding: 13px 30px;
}

/*
 * Caras de los conectados. Ocupa el ancho completo de la barra y se apoya en
 * el margen negativo para superponerlas; con flex-wrap entran unas 55 por fila
 * en escritorio, asi que las 100 caben en dos lineas.
 */
.ls-discord-widget__faces {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	margin: 0;
	padding-top: 15px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ls-discord-widget__face {
	width: 28px;
	height: 28px;
	/* Superposicion; el borde oscuro separa una cara de la siguiente. */
	margin-right: -8px;
	border: 2px solid rgba(15, 15, 17, 0.92);
	border-radius: 50%;
	background: #2b2d31;
	object-fit: cover;
	transition: transform .15s ease;
}

/* Al pasar el mouse la cara sale del apilado para poder verla completa. */
.ls-discord-widget__face:hover {
	position: relative;
	z-index: 2;
	transform: scale(1.35);
}

/*
 * Anillo naranja de marca para quien esta jugando algo de la comunidad. Va por
 * fuera del borde para no tapar el color de presencia.
 */
.ls-discord-widget__face.is-ours {
	box-shadow: 0 0 0 2px #f86511;
}

/* Colores de presencia de Discord. */
.ls-discord-widget__face--online {
	border-color: #23a559;
}

.ls-discord-widget__face--idle {
	border-color: #f0b232;
}

.ls-discord-widget__face--dnd {
	border-color: #f23f43;
}

.ls-discord-widget__face-more {
	display: inline-flex;
	align-items: center;
	height: 28px;
	margin-left: 18px;
	padding: 0 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}


/* Apilado: el boton y las cifras pasan a ocupar el ancho completo. */
@media (max-width: 900px) {
	.ls-discord-widget--home {
		justify-content: center;
		text-align: center;
	}

	.ls-discord-widget--home.has-banner {
		background-image:
			linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.40) 100%),
			var(--ls-discord-banner);
		background-size: 100% 100%;
	}

	.ls-discord-widget__head--home {
		flex: 1 1 100%;
		justify-content: center;
	}

	.ls-discord-widget__desc {
		margin-left: auto;
		margin-right: auto;
	}

	.ls-discord-widget__stats--home {
		flex: 1 1 100%;
		flex-wrap: wrap;
		justify-content: center;
	}

	.ls-discord-widget__join--home {
		flex: 1 1 100%;
	}
}

@media (max-width: 480px) {
	.ls-discord-widget--home {
		gap: 14px;
		padding: 16px 14px;
	}

	.ls-discord-widget--home .ls-discord-widget__icon {
		width: 52px;
		height: 52px;
	}

	.ls-discord-widget--home .ls-discord-widget__name {
		font-size: 1.15rem;
	}

	.ls-discord-widget__stats--home .ls-discord-widget__stat {
		min-width: 0;
		flex: 1 1 0;
	}

	/* En movil las caras se centran y se achican para no ocupar media pantalla. */
	.ls-discord-widget__faces {
		justify-content: center;
		padding-top: 12px;
	}

	.ls-discord-widget__face {
		width: 24px;
		height: 24px;
		margin-right: -7px;
	}

	.ls-discord-widget__face-more {
		height: 24px;
		margin-left: 15px;
		font-size: 0.7rem;
	}
}
