/**
 * Skeleton loading — placeholders con shimmer para secciones de la app.
 */

@keyframes hsa-skeleton-shimmer {
	0% {
		background-position: 120% 0;
	}
	100% {
		background-position: -120% 0;
	}
}

.hsa-skeleton-section {
	position: relative;
	margin-bottom: 0.9rem;
}

.hsa-skeleton-section__placeholder {
	display: block;
}

.hsa-skeleton-section__content {
	display: block;
}

.hsa-skeleton-section:not(.is-ready) .hsa-skeleton-section__content {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	pointer-events: none;
}

.hsa-skeleton-section.is-ready .hsa-skeleton-section__placeholder {
	display: none;
}

.hsa-skeleton-section.is-ready .hsa-skeleton-section__content {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	pointer-events: auto;
	animation: hsa-skeleton-fade-in 0.35s ease-out both;
}

@keyframes hsa-skeleton-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Bloques base */
.hsa-skel {
	display: block;
	width: 100%;
}

.hsa-skel--header {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-height: 3.5rem;
}

.hsa-skel__push-end {
	margin-left: auto;
}

.hsa-skel__circle,
.hsa-skel__line,
.hsa-skel__rect,
.hsa-skel__pill {
	display: block;
	flex-shrink: 0;
	border-radius: 10px;
	background: linear-gradient(90deg, #e8eef2 0%, #f4f7f9 42%, #e8eef2 84%);
	background-size: 220% 100%;
	animation: hsa-skeleton-shimmer 1.35s ease-in-out infinite;
}

.hsa-skel__circle {
	border-radius: 999px;
}

.hsa-skel__circle--lg {
	width: 3.5rem;
	height: 3.5rem;
}

.hsa-skel__circle--md {
	width: 2.75rem;
	height: 2.75rem;
}

.hsa-skel__lines {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	flex: 1 1 auto;
	min-width: 0;
}

.hsa-skel__lines--center {
	align-items: center;
	width: 100%;
}

.hsa-skel__line {
	height: 0.75rem;
	border-radius: 999px;
}

.hsa-skel__line--lg {
	width: min(72%, 14rem);
	height: 1.35rem;
}

.hsa-skel__line--md {
	width: min(55%, 10rem);
}

.hsa-skel__line--sm {
	width: min(40%, 7rem);
	height: 0.65rem;
}

.hsa-skel__line--xs {
	width: 3.5rem;
	height: 0.65rem;
}

.hsa-skel__line--full {
	width: 100%;
}

.hsa-skel__row-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
}

.hsa-skel__pill {
	height: 3rem;
	border-radius: 999px;
}

.hsa-skel__pill--wide {
	width: 8.5rem;
}

.hsa-skel__pill--play {
	width: 4rem;
	height: 4rem;
	border-radius: 999px;
	margin: 0.75rem auto 0;
}

.hsa-skel__rect--banner {
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
}

.hsa-skel__rect--hero {
	width: 100%;
	aspect-ratio: 16 / 11.7;
	border-radius: 20px;
}

.hsa-skel__rect--profile {
	width: 100%;
	min-height: 10rem;
	border-radius: 16px;
}

.hsa-skel__rect--cover {
	width: 100%;
	max-width: 18rem;
	aspect-ratio: 1;
	border-radius: 16px;
	margin: 0 auto;
}

.hsa-skel__rect--block {
	width: 100%;
	min-height: 5rem;
	border-radius: 14px;
}

.hsa-skel__cards-row {
	display: flex;
	gap: 0.75rem;
	overflow: hidden;
}

.hsa-skel__rect--card {
	flex: 0 0 72%;
	max-width: 16rem;
	aspect-ratio: 4 / 5;
	border-radius: 14px;
}

.hsa-skel__rect--product {
	flex: 0 0 42%;
	max-width: 9rem;
	aspect-ratio: 1;
	border-radius: 12px;
}

.hsa-skel__rect--fade {
	opacity: 0.55;
}

.hsa-skel__stack {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.hsa-skel__rect--row-card {
	width: 100%;
	min-height: 5.25rem;
	border-radius: 14px;
}

.hsa-skel__rect--notif {
	width: 100%;
	min-height: 4.5rem;
	border-radius: 14px;
}

.hsa-skel__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.hsa-skel__rect--tile {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 14px;
}

.hsa-skel--player {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
	padding: 0.5rem 0;
}

.hsa-skel--live {
	padding: 0.15rem 0;
}

/* Pantallas de acceso: login, registro, intereses */
.hsa-auth-main .hsa-skeleton-section {
	margin-bottom: 1.25rem;
}

.hsa-skel--auth-header {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.hsa-skel__line--auth-title {
	width: min(78%, 16rem);
	height: 1.75rem;
}

.hsa-skel__line--auth-sub {
	width: min(62%, 12rem);
	height: 0.85rem;
}

.hsa-skel--auth-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hsa-skel__stack--fields {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.hsa-skel__field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.hsa-skel__line--label {
	width: 5.5rem;
	height: 0.65rem;
}

.hsa-skel__rect--input {
	width: 100%;
	height: 3rem;
	border-radius: 12px;
}

.hsa-skel__pill--cta {
	width: 100%;
	height: 3.25rem;
	border-radius: 999px;
	margin-top: 0.25rem;
}

.hsa-skel--auth-social {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.hsa-skel__line--divider {
	width: 100%;
	height: 0.75rem;
	max-width: 12rem;
	margin: 0 auto;
}

.hsa-skel__stack--social {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.hsa-skel__rect--social-btn {
	width: 100%;
	height: 3rem;
	border-radius: 999px;
}

.hsa-skel--interests {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hsa-skel__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.hsa-skel__pill--chip {
	width: 6.5rem;
	height: 2.35rem;
	border-radius: 999px;
}

.hsa-skel__pill--chip-short {
	width: 4.75rem;
}

@media (prefers-reduced-motion: reduce) {
	.hsa-skel__circle,
	.hsa-skel__line,
	.hsa-skel__rect,
	.hsa-skel__pill {
		animation: none;
		background: #e8eef2;
	}

	.hsa-skeleton-section.is-ready .hsa-skeleton-section__content {
		animation: none;
	}
}
