/* ==========================================================================
   PatchWorld UI - Featured View Styles
   --------------------------------------------------------------------------
   Defines the presentation of the Featured tab:
   - Hero Showcase banner with dynamic spotlight world
   - Curated Collection Rails with horizontal scroll-snap and navigation
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Showcase Banner
   -------------------------------------------------------------------------- */
.pw-hero {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    min-height: 320px;
    border: var(--border-width) solid var(--color-border);
    display: flex;
    align-items: center;
    margin: var(--space-3) 0 var(--space-7);
    background-color: var(--color-surface);
}

.pw-hero__bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(28px);
    opacity: 0.22;
    transform: scale(1.08);
    pointer-events: none;
}

.pw-hero__art {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    pointer-events: none;
}

.pw-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pw-hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--color-surface) 0%,
        rgba(29, 27, 38, 0.95) 40%,
        rgba(29, 27, 38, 0.35) 75%,
        rgba(29, 27, 38, 0.1) 100%
    );
    pointer-events: none;
}

.pw-hero__body {
    position: relative;
    z-index: 2;
    padding: var(--space-7) var(--space-8) var(--space-8);
    max-width: 58%;
}

.pw-hero__pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-accent-tint-strong);
    color: var(--color-accent-2);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
}

.pw-hero__pill svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.pw-hero__title {
    font-family: var(--font-head);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-hero);
    line-height: 1.1;
    margin: var(--space-3) 0 var(--space-2);
    letter-spacing: -0.02em;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pw-hero__desc {
    color: var(--color-text-soft);
    font-size: var(--font-size-lg);
    line-height: 1.5;
    margin: 0 0 var(--space-3);
    max-width: 480px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pw-hero__stats {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.pw-hero__creator {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

.pw-hero__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-live);
    font-weight: var(--font-weight-semibold);
}

.pw-hero__actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.pw-hero__play {
    min-height: 48px;
    padding: 0 var(--space-6);
    font-size: var(--font-size-lg);
}

.pw-hero__play svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    margin-left: 2px;
}

.pw-hero__info {
    min-height: 48px;
    padding: 0 var(--space-5);
    font-size: var(--font-size-md);
}

/* Dots carousel indicator */
.pw-hero__dots {
    position: absolute;
    right: var(--space-4);
    bottom: var(--space-3);
    z-index: 3;
    display: flex;
    gap: 4px;
    align-items: center;
}

.pw-hero__dot {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
}

.pw-hero__dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.35);
    transition: width var(--duration-fast), background-color var(--duration-fast);
}

.pw-hero__dot.is-active::before {
    width: 22px;
    background: var(--color-accent-2);
}

.pw-hero__dot:hover:not(.is-active)::before {
    background: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   2. Collection Rails
   -------------------------------------------------------------------------- */
.pw-collection-section {
    margin-bottom: var(--space-8);
}

.pw-collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.pw-collection-title-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
}

.pw-collection-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.pw-collection-count {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.pw-collection-controls {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

/* Horizontal scroll rail */
.pw-rail {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: var(--space-1) var(--space-1) var(--space-3);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pw-rail::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.pw-rail > * {
    flex: none;
    scroll-snap-align: start;
}

/* --------------------------------------------------------------------------
   3. Responsive rules
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
    .pw-hero {
        min-height: 280px;
    }

    .pw-hero__body {
        max-width: 100%;
        padding: var(--space-5) var(--space-5) var(--space-8);
    }

    .pw-hero__art {
        width: 100%;
        opacity: 0.35;
    }

    .pw-hero__shade {
        background: linear-gradient(
            0deg,
            var(--color-surface) 10%,
            rgba(29, 27, 38, 0.85) 60%,
            rgba(29, 27, 38, 0.4) 100%
        );
    }

    .pw-hero__title {
        font-size: 28px;
    }

    .pw-hero__desc {
        font-size: 14px;
    }
}

/* --------------------------------------------------------------------------
   3. Curator Management Action Button
   -------------------------------------------------------------------------- */
#featuredManageBtn {
    border-radius: var(--radius-lg);
    font-weight: 500;
}

#featuredManageBtn svg {
    stroke-width: 2.2px;
}
