/**
 * Loader e skeleton — catálogo filmes/séries/canais
 */

@keyframes lista-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes lista-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes lista-content-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lista-loading-grid {
    display: block;
    width: 100%;
}

.lista-loading {
    width: 100%;
    padding: 0.25rem 0 0.5rem;
}

.lista-loading-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(71, 85, 105, 0.4);
    background: rgba(30, 41, 59, 0.35);
}

.lista-loading-spinner {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
}

.lista-loading-ring {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.25);
    border-top-color: var(--lista-accent, #3b82f6);
    animation: lista-loader-spin 0.75s linear infinite;
}

.lista-loading-text {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: #94a3b8;
}

.lista-skeleton-section {
    margin-bottom: 1.35rem;
}

.lista-skeleton-section:last-child {
    margin-bottom: 0;
}

.lista-skeleton-line,
.lista-skeleton-chip,
.lista-skeleton-poster {
    background: linear-gradient(
        90deg,
        rgba(51, 65, 85, 0.45) 0%,
        rgba(71, 85, 105, 0.75) 45%,
        rgba(51, 65, 85, 0.45) 90%
    );
    background-size: 200% 100%;
    animation: lista-shimmer 1.35s ease-in-out infinite;
}

.lista-skeleton-line--title {
    width: 7rem;
    height: 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.65rem;
}

.lista-skeleton-line--row {
    width: 9.5rem;
    height: 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.65rem;
}

.lista-skeleton-bento,
.lista-skeleton-row {
    display: flex;
    gap: 0.55rem;
    overflow: hidden;
}

.lista-skeleton-bento {
    padding-bottom: 0.15rem;
}

.lista-skeleton-poster {
    flex: 0 0 4.5rem;
    width: 4.5rem;
    height: 6.75rem;
    border-radius: 0.65rem;
}

.lista-skeleton-poster--lg {
    flex: 0 0 5.5rem;
    width: 5.5rem;
    height: 8.25rem;
}

.lista-skeleton-poster--square {
    height: 4.5rem;
}

.lista-skeleton-poster--lg.lista-skeleton-poster--square {
    flex: 0 0 5.5rem;
    width: 5.5rem;
    height: 5.5rem;
}

@media (min-width: 640px) {
    .lista-skeleton-poster {
        flex: 0 0 5.25rem;
        width: 5.25rem;
        height: 7.85rem;
    }

    .lista-skeleton-poster--lg {
        flex: 0 0 6.5rem;
        width: 6.5rem;
        height: 9.75rem;
    }

    .lista-skeleton-poster--square {
        height: 5.25rem;
    }

    .lista-skeleton-poster--lg.lista-skeleton-poster--square {
        height: 6.5rem;
    }
}

.lista-skeleton-chip {
    flex: 0 0 auto;
    display: inline-block;
    width: 5.5rem;
    height: 2rem;
    border-radius: 9999px;
}

.lista-skeleton-chip:nth-child(3n + 1) { width: 4.75rem; }
.lista-skeleton-chip:nth-child(3n + 2) { width: 6.25rem; }
.lista-skeleton-chip:nth-child(3n) { width: 5rem; }

.lista-content-ready {
    animation: lista-content-in 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
    .lista-skeleton-line,
    .lista-skeleton-chip,
    .lista-skeleton-poster,
    .lista-loading-ring {
        animation: none;
    }

    .lista-content-ready {
        animation: none;
    }
}
