/* =====================================================================
   FilmParty — Home "درخواست‌های کاربران" community marquee.
   Glass cards, staggered reveal, then a calm seamless auto-scroll
   (pauses on hover, honors reduced-motion). Namespaced fp-ureq-*.
   ===================================================================== */

.fp-ureq {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.fp-ureq.is-in {
    opacity: 1;
    transform: translateY(0);
}

.fp-ureq__heading {
    /* reuses .section-heading from home.css */
}

.fp-ureq__viewport {
    position: relative;
    overflow: hidden;
    padding: 12px 0 6px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.fp-ureq__track {
    display: flex;
    gap: 14px;
    width: max-content;
    will-change: transform;
}

.fp-ureq.is-rolling .fp-ureq__track {
    animation: fpUreqRoll var(--fp-ureq-duration, 60s) linear infinite;
}

.fp-ureq__viewport:hover .fp-ureq__track,
.fp-ureq__viewport:focus-within .fp-ureq__track {
    animation-play-state: paused;
}

@keyframes fpUreqRoll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Card ---------- */
.fp-ureq-card {
    position: relative;
    flex: 0 0 auto;
    width: 248px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.26);
    overflow: hidden;
    /* staggered entrance */
    opacity: 0;
    transform: translateY(16px) scale(0.96);
}

.fp-ureq.is-in .fp-ureq-card {
    animation: fpUreqCardIn 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
    animation-delay: calc(0.05s * var(--d, 0) + 0.1s);
}

@keyframes fpUreqCardIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* once rolling, clones must be visible regardless of stagger */
.fp-ureq.is-rolling .fp-ureq-card {
    opacity: 1;
    transform: none;
    animation: none;
}

.fp-ureq-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 0% 0%, rgba(255, 98, 139, 0.1), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fp-ureq-card.is-fulfilled::before {
    background: radial-gradient(120% 120% at 0% 0%, rgba(34, 197, 94, 0.12), transparent 55%);
}

.fp-ureq-card:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
}

.fp-ureq-card:hover::before {
    opacity: 1;
}

.fp-ureq-card__poster {
    flex: 0 0 auto;
    width: 48px;
    height: 70px;
    border-radius: 11px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fp-ureq-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-ureq-card__poster--icon {
    color: #8fa0b4;
    background: rgba(255, 255, 255, 0.05);
}

.fp-ureq-card.is-fulfilled .fp-ureq-card__poster--icon {
    color: #7ee2a3;
}

.fp-ureq-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.fp-ureq-card__title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f4f7fb;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

a.fp-ureq-card__title:hover {
    color: #ff9bb4;
}

.fp-ureq-card__req {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    min-width: 0;
}

.fp-ureq-card__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.fp-ureq-card__name {
    font-size: 0.8rem;
    color: #aebccd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.fp-ureq-card__req:hover .fp-ureq-card__name {
    color: #f4f7fb;
}

.fp-ureq-card__badge {
    position: absolute;
    top: 9px;
    left: 9px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    color: #7ee2a3;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

/* ---------- No-JS / reduced-motion fallback: manual horizontal scroll ---------- */
.fp-ureq:not(.is-in) .fp-ureq-card {
    /* before reveal, keep hidden but lay out so width is measurable */
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .fp-ureq,
    .fp-ureq-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }

    .fp-ureq__viewport {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .fp-ureq__viewport::-webkit-scrollbar {
        display: none;
    }

    .fp-ureq.is-rolling .fp-ureq__track {
        animation: none;
    }
}

@media (max-width: 600px) {
    .fp-ureq {
        margin-top: 22px;
    }

    .fp-ureq-card {
        width: 220px;
        padding: 10px 12px;
    }
}
