/*
 * Docs: /Docs/Features/MediaPlayer.md
 * WHY: Scoped stylesheet for the vaMicrosites.Plugins.MediaPlayer component. Enqueued on-demand
 *      via the css parameter in the {{MediaPlayer:Player(...)}} token so the stylesheet is only
 *      loaded on pages that actually use the player — no unconditional payload added to the site.
 */

/* ─── Hero layout modifier ──────────────────────────────────────────────────
 * WHY: .hero__inner--with-player converts the single-column hero inner block
 *      into a two-column flex row so the player can be positioned to the right
 *      of the hero copy without touching the existing hero layout rules.
 */
.hero__inner--with-player {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    justify-content: space-between;
}

.hero__inner--with-player .hero__content {
    flex: 1 1 0;
    min-width: 0;
}

/* ─── Player container ──────────────────────────────────────────────────────
 * WHY: Semi-transparent backdrop with backdrop-filter gives the player a frosted-
 *      glass card feel that sits naturally over the dark hero gradient without
 *      competing with the primary copy or requiring opaque backgrounds.
 */
.va-media-player {
    flex: 0 0 auto;
    width: clamp(220px, 28vw, 320px);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl, 1.25rem);
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* ─── Native audio/video element ────────────────────────────────────────────
 * WHY: width:100% ensures the browser's native controls always span the full
 *      card width. The accent-color hint signals the accent token to Blink/WebKit
 *      so scrubber and thumb colours harmonise with the pmkto palette.
 */
.va-media-player__media {
    width: 100%;
    border-radius: var(--radius-md, 0.75rem);
    accent-color: var(--accent, #0ea5e9);
    outline-offset: 3px;
}

/* ─── Track info (playlist label) ──────────────────────────────────────────*/
.va-media-player__track-info {
    text-align: center;
}

.va-media-player__track-idx {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    user-select: none;
}

/* ─── Playlist nav controls ─────────────────────────────────────────────────
 * WHY: Prev/next buttons use the same ghost-pill pattern as other interactive
 *      elements in the pmkto UI so the player's controls feel native to the site.
 */
.va-media-player__nav {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.va-media-player__prev,
.va-media-player__next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full, 999px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.14s ease;
    line-height: 1;
    /* WHY: Reset button defaults so no browser UA stylesheet bleeds through. */
    padding: 0;
    font-family: inherit;
}

.va-media-player__prev:hover,
.va-media-player__next:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.45);
    color: #fff;
    transform: scale(1.08);
}

.va-media-player__prev:focus-visible,
.va-media-player__next:focus-visible {
    outline: 2px solid var(--accent, #0ea5e9);
    outline-offset: 2px;
}

.va-media-player__prev:active,
.va-media-player__next:active {
    transform: scale(0.94);
}

/* ─── Player invitation wrapper ─────────────────────────────────────────────
 * WHY: .va-player-invite groups the invitation label, song title, and the
 *      player element so visitors immediately understand they can click to
 *      listen — without relying on browser-native "play" iconography alone.
 *      The wrapper is self-contained and works as a flex child inside
 *      .hero__inner--with-player.
 *      Styled as a frosted-glass card with an accent border so the whole
 *      songs area reads as a single inviting unit rather than isolated elements
 *      floating over the hero gradient.
 */
.va-player-invite {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* WHY: Slightly larger gap gives the CTA pill, song title, and player card
     *      room to breathe so each element reads cleanly at a glance. */
    gap: 0.875rem;
    /* WHY: position:relative + overflow:hidden create a clipping boundary for the
     *      absolutely positioned background music icon; without overflow:hidden the
     *      icon SVG would bleed outside the card's rounded corners. */
    position: relative;
    overflow: hidden;
    /* WHY: A subtle accent-tinted gradient behind the invitation elements gives the
     *      songs section its own visual identity within the hero — distinct from the
     *      raw hero gradient but consistent with the site's blue accent palette. */
    background: linear-gradient(155deg, rgba(14, 165, 233, 0.11) 0%, rgba(11, 26, 58, 0.38) 100%);
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: var(--radius-xl, 1.25rem);
    padding: 1.5rem 1.25rem 1.25rem;
    /* WHY: backdrop-filter extends the frosted-glass aesthetic from the inner player
     *      card to the outer invitation wrapper, unifying the two visually. */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* WHY: A dual-layer shadow — ambient accent glow below + inner highlight above —
     *      lifts the card off the hero gradient and signals interactivity to the user. */
    box-shadow: 0 6px 28px rgba(14, 165, 233, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ─── Background music icon ─────────────────────────────────────────────────
 * WHY: A large, very low-opacity Lucide Music icon positioned in the
 *      top-right corner adds visual richness and communicates the audio
 *      nature of the section at a glance, before the user reads any text.
 *      It is purely decorative (aria-hidden on the element in HTML) and
 *      pointer-events:none ensures it never intercepts clicks.
 */
.va-player-invite__bg-icon {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    width: 8.5rem;
    height: 8.5rem;
    /* WHY: accent color matches the site palette; low opacity keeps it a hint,
     *      not a distraction, so the CTA text and player remain the focal point. */
    color: var(--accent, #0ea5e9);
    opacity: 0.09;
    pointer-events: none;
    user-select: none;
    /* WHY: A slight rotation makes the icon feel organic rather than grid-locked,
     *      reinforcing the playful character of a music invite. */
    transform: rotate(12deg);
    line-height: 1;
}

.va-player-invite__bg-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.va-player-invite__cta {
    /* WHY: Styled as a pill badge so the "Escucha la canción" label reads as an
     *      active affordance rather than static descriptive text — visitors
     *      immediately associate it with a clickable/listenable action.
     */
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    /* WHY: accent-light color pops against both the card background and the
     *      outer hero gradient without requiring higher opacity or weight. */
    color: var(--accent-light, #38bdf8);
    margin: 0;
    cursor: default;
    /* WHY: Pill shape with a translucent accent fill mirrors the ghost-pill
     *      pattern used by nav buttons and badges elsewhere in the PMKTO UI. */
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.32);
    border-radius: var(--radius-full, 999px);
    padding: 0.25em 0.9em;
}

.va-player-invite__title {
    /* WHY: Match primary PMKTO heading typography so the song title visually
     *      blends with nearby hero content instead of inheriting generic bold text.
     */
    font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    /* WHY: Bright cyan-white improves legibility over the frosted card and
     *      visually ties the title to the site's accent system.
     */
    color: #eaf7ff;
    letter-spacing: 0.05em;
    text-align: center;
    margin: 0;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.7);
    /* WHY: A soft accent underline draws the eye to the song name, signalling
       this text belongs to the player rather than to the hero copy beside it. */
    text-decoration: underline;
    text-decoration-color: var(--accent, #0ea5e9);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* ─── Responsive — stack vertically on narrow viewports ────────────────────
 * WHY: Below 640 px the two-column hero layout is too cramped; switching to a
 *      column stack with the player below the copy keeps both readable.
 */
@media (max-width: 640px) {
    .hero__inner--with-player {
        flex-direction: column;
        /* WHY: Center the media-player column on phones so the invite label and
         *      card don't hug the left edge; this keeps the player visually aligned
         *      with the hero composition while preserving full usable width. */
        align-items: center;
        gap: 2rem;
    }

    .va-player-invite {
        width: min(100%, 420px);
        margin-inline: auto;
        /* WHY: Reduce horizontal padding on narrow viewports so the inner player
         *      card retains enough width for comfortable audio controls. */
        padding: 1.25rem 1rem 1rem;
    }

    .va-media-player {
        width: 100%;
        max-width: 100%;
    }
}
/* Last-Modified: 2026-03-01T21:11:42.0000000Z */