/**
 * Welcome Modal Styles
 *
 * First-visit welcome overlay with artist mosaic background
 * and glassmorphic card design.
 */

/* Overlay - full screen fixed container */
.wm-overlay {
    position: fixed;
    inset: 0;
    z-index: 15000; /* Above other modals */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.wm-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

/* Backdrop - dark overlay with blur */
.wm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Artist mosaic background */
.wm-mosaic {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    opacity: 0;
    filter: blur(4px) grayscale(20%);
    transition: opacity 0.6s ease 0.2s;
    z-index: 1;
}

.wm-overlay[aria-hidden="false"] .wm-mosaic {
    opacity: 0.25;
}

.wm-mosaic-item {
    overflow: hidden;
}

.wm-mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}

/* Ken Burns effect - subtle zoom and pan on mosaic images */
.wm-overlay[aria-hidden="false"] .wm-mosaic-item img {
    animation: wmKenBurns 20s ease-in-out infinite;
}

/* Alternate animation direction for visual variety */
.wm-overlay[aria-hidden="false"] .wm-mosaic-item:nth-child(even) img {
    animation-direction: reverse;
}

.wm-overlay[aria-hidden="false"] .wm-mosaic-item:nth-child(3n) img {
    animation-delay: -5s;
}

.wm-overlay[aria-hidden="false"] .wm-mosaic-item:nth-child(3n+1) img {
    animation-delay: -10s;
}

@keyframes wmKenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.15) translate(-2%, -2%);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* Modal container - glassmorphic card (matches artist_details sections) */
.wm-container {
    position: relative;
    z-index: 2;
    width: calc(100% - 32px);
    max-width: 700px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl, 16px);
    padding: 40px 32px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.4s ease 0.1s, opacity 0.4s ease 0.1s;
}

.wm-overlay[aria-hidden="false"] .wm-container {
    transform: translateY(0);
    opacity: 1;
}

/* Close button */
.wm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wm-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.wm-close svg {
    width: 18px;
    height: 18px;
}

/* Content area */
.wm-content {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.25s, transform 0.4s ease 0.25s;
}

.wm-overlay[aria-hidden="false"] .wm-content {
    opacity: 1;
    transform: translateY(0);
}

/* Hero heading */
.wm-hero {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 38px 0;
    color: var(--text-primary, #fff);
    letter-spacing: -0.01em;
}

.wm-hero-line {
    display: block;
}

.wm-hero-accent {
    color: var(--accent-primary, #1DB954);
}

/* Prevent text from wrapping */
.wm-nowrap {
    white-space: nowrap;
}

/* Body text with inline logo */
.wm-body {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary, #b3b3b3);
    margin: 0 0 38px 0;
}

/* Inline logo styling */
.wm-logo {
    display: inline-block;
    background-color: #333;
    color: rgb(211, 115, 255);
    font-size: 1.8em;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    letter-spacing: 1px;
    vertical-align: baseline;
    line-height: 1.4;
    box-shadow: 0 0 0 rgba(211, 115, 255, 0);
    transition: box-shadow 0.3s ease;
}

/* Logo glow pulse animation - big initial pulse then continuous subtle flicker */
.wm-overlay[aria-hidden="false"] .wm-logo {
    animation:
        wmLogoInitialPulse 1.2s ease 0.5s forwards,
        wmLogoFlicker 9s ease-in-out 1.7s infinite;
    text-shadow: 0 0 0 rgba(211, 115, 255, 0);
}

/* Big initial pulse */
@keyframes wmLogoInitialPulse {
    0% {
        box-shadow: 0 0 0 rgba(211, 115, 255, 0);
        text-shadow: 0 0 0 rgba(211, 115, 255, 0);
    }
    40% {
        box-shadow: 0 0 25px rgba(211, 115, 255, 0.7), 0 0 50px rgba(211, 115, 255, 0.4), 0 0 80px rgba(211, 115, 255, 0.2);
        text-shadow: 0 0 10px rgba(211, 115, 255, 0.8);
    }
    100% {
        box-shadow: 0 0 8px rgba(211, 115, 255, 0.3);
        text-shadow: 0 0 4px rgba(211, 115, 255, 0.3);
    }
}

/* Continuous subtle flicker */
@keyframes wmLogoFlicker {
    0%, 100% {
        box-shadow: 0 0 8px rgba(211, 115, 255, 0.3);
        text-shadow: 0 0 4px rgba(211, 115, 255, 0.3);
    }
    15% {
        box-shadow: 0 0 12px rgba(211, 115, 255, 0.5), 0 0 25px rgba(211, 115, 255, 0.2);
        text-shadow: 0 0 6px rgba(211, 115, 255, 0.5);
    }
    30% {
        box-shadow: 0 0 6px rgba(211, 115, 255, 0.25);
        text-shadow: 0 0 3px rgba(211, 115, 255, 0.25);
    }
    50% {
        box-shadow: 0 0 15px rgba(211, 115, 255, 0.45), 0 0 30px rgba(211, 115, 255, 0.15);
        text-shadow: 0 0 8px rgba(211, 115, 255, 0.45);
    }
    70% {
        box-shadow: 0 0 5px rgba(211, 115, 255, 0.2);
        text-shadow: 0 0 2px rgba(211, 115, 255, 0.2);
    }
    85% {
        box-shadow: 0 0 10px rgba(211, 115, 255, 0.4), 0 0 20px rgba(211, 115, 255, 0.15);
        text-shadow: 0 0 5px rgba(211, 115, 255, 0.4);
    }
}

/* Closing line */
.wm-closing {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary, #fff);
    margin: 12px 0 32px 0;
}

/* Brand cascade animation */
.wm-brand,
.wm-brand-plus,
.wm-brand-finale {
    opacity: 0;
    display: inline-block;
    transform: translateY(8px);
}

.wm-brand {
    font-weight: 600;
    color: #fff;
}

.wm-brand-plus {
    color: var(--text-tertiary, #666);
}

.wm-brand-finale {
    color: var(--accent-primary, #1DB954);
    font-weight: 600;
}

/* Staggered brand reveal animation - slower, starts later */
.wm-overlay[aria-hidden="false"] .wm-brand,
.wm-overlay[aria-hidden="false"] .wm-brand-plus,
.wm-overlay[aria-hidden="false"] .wm-brand-finale {
    animation: wmBrandReveal 0.6s ease forwards;
}

.wm-overlay[aria-hidden="false"] .wm-brand-1 { animation-delay: 1.4s; }
.wm-overlay[aria-hidden="false"] .wm-brand-2 { animation-delay: 1.8s; }
.wm-overlay[aria-hidden="false"] .wm-brand-3 { animation-delay: 2.2s; }
.wm-overlay[aria-hidden="false"] .wm-brand-4 { animation-delay: 2.6s; }
.wm-overlay[aria-hidden="false"] .wm-brand-5 { animation-delay: 3.0s; }
.wm-overlay[aria-hidden="false"] .wm-brand-6 { animation-delay: 3.5s; }

@keyframes wmBrandReveal {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ARTIST MARQUEE
   ============================================ */

.wm-marquee {
    width: calc(100% + 64px);
    margin: 0 -32px 32px -32px;
    overflow: hidden;
    position: relative;
}

/* Fade edges */
.wm-marquee::before,
.wm-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.wm-marquee::before {
    left: 0;
    background: linear-gradient(to right, rgba(30, 30, 30, 0.95) 0%, transparent 100%);
}

.wm-marquee::after {
    right: 0;
    background: linear-gradient(to left, rgba(30, 30, 30, 0.95) 0%, transparent 100%);
}

.wm-marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: wmMarqueeScroll 240s linear infinite;
    animation-play-state: paused;
}

.wm-overlay[aria-hidden="false"] .wm-marquee-track {
    animation-play-state: running;
}

/* Pause on hover */
.wm-marquee:hover .wm-marquee-track {
    animation-play-state: paused;
}

@keyframes wmMarqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Artist card */
.wm-artist-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    width: 175px;
}

/* Image wrapper with overlay capability */
.wm-artist-img-wrap {
    position: relative;
    width: 175px;
    height: 175px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.wm-artist-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Show overlay at bottom of image */
.wm-artist-show-overlay {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--accent-primary, #1DB954);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    white-space: nowrap;
    max-width: calc(100% - 12px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-artist-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: center;
}

.wm-artist-name {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-artist-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-tertiary, #888);
    white-space: nowrap;
}

.wm-location-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* Mobile adjustments for marquee */
@media (max-width: 768px) {
    .wm-marquee {
        width: calc(100% + 48px);
        margin: 0 -24px 28px -24px;
    }

    .wm-marquee-track {
        gap: 12px;
    }

    .wm-artist-card {
        width: 120px;
    }

    .wm-artist-img-wrap {
        width: 120px;
        height: 120px;
        border-radius: 10px;
    }

    .wm-artist-show-overlay {
        font-size: 9px;
        padding: 3px 6px;
        bottom: 4px;
    }

    .wm-artist-name {
        font-size: 11px;
    }

    .wm-artist-location {
        font-size: 10px;
    }

    .wm-location-icon {
        width: 9px;
        height: 9px;
    }
}

/* CTA button */
.wm-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    background: var(--accent-primary, #1DB954);
    color: white;
    border: none;
    border-radius: var(--radius-lg, 8px);
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(29, 185, 84, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.4s ease 0.35s;
}

.wm-overlay[aria-hidden="false"] .wm-cta {
    opacity: 1;
    transform: translateY(0);
}

.wm-cta:hover {
    background: var(--accent-primary-hover, #1ed760);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
}

.wm-cta:active {
    transform: translateY(0);
}

.wm-cta svg {
    width: 18px;
    height: 18px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wm-container {
        width: calc(100% - 24px);
        padding: 32px 24px;
        border-radius: var(--radius-xl, 12px);
    }

    .wm-hero {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .wm-body {
        font-size: 15px;
    }

    .wm-closing {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .wm-cta {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }

    .wm-mosaic {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }

    .wm-close {
        top: 12px;
        right: 12px;
    }
}

/* Small mobile */
@media (max-width: 375px) {
    .wm-container {
        padding: 28px 20px;
    }

    .wm-hero {
        font-size: 22px;
    }

    .wm-body,
    .wm-closing {
        font-size: 14px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wm-overlay,
    .wm-container,
    .wm-content,
    .wm-mosaic,
    .wm-cta,
    .wm-logo {
        transition: none;
    }

    .wm-overlay[aria-hidden="false"] .wm-container {
        transform: none;
    }

    /* Disable all animations for reduced motion */
    .wm-overlay[aria-hidden="false"] .wm-mosaic-item img,
    .wm-overlay[aria-hidden="false"] .wm-logo,
    .wm-overlay[aria-hidden="false"] .wm-brand,
    .wm-overlay[aria-hidden="false"] .wm-brand-plus,
    .wm-overlay[aria-hidden="false"] .wm-brand-finale,
    .wm-overlay[aria-hidden="false"] .wm-marquee,
    .wm-overlay[aria-hidden="false"] .wm-marquee-track {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Body scroll lock when modal is open */
body.wm-open {
    overflow: hidden;
}
