/*
Plugin Name: CODEPLAYER RADIO PLAYER
*/

/* ============================================================
   RESET / BASE
   ============================================================ */
.lunaradio-player,
.lunaradio-player * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
    margin: 0;
    padding: 0;
}

.lunaradio-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lunaradio-wrapper {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

/* ============================================================
   SVG ICONS
   ============================================================ */
.lunaradio-player svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    transition: fill 0.4s ease, opacity 0.3s ease, transform 0.2s ease;
}

.lunaradio-player svg path { fill: inherit; }

.lunaradio-player [data-icon] {
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lunaradio-player [data-icon]:hover { opacity: 0.85; transform: scale(1.08); }
.lunaradio-player [data-icon]:active { transform: scale(0.92); }

/* ============================================================
   TEXT (radio name + title)
   ============================================================ */
.lunaradio-player [data-radio-name],
.lunaradio-player [data-title] {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   COVER
   ============================================================ */
.lunaradio-player [data-cover] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

.lunaradio-player [data-cover]:hover { opacity: 0.92; }
.lunaradio-player [data-cover-circle] { border-radius: 50% !important; }

/* ============================================================
   BG ART (blurred)
   ============================================================ */
.lunaradio-player [data-bg-art] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    filter: blur(40px);
    -webkit-filter: blur(40px);
    transform: scale(1.15);
    opacity: 0.5;
}

/* ============================================================
   PLAY / PAUSE / PRELOADER
   ============================================================ */
.lunaradio-player [data-play-wrap],
.lunaradio-player [data-small-play-wrap] {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lunaradio-player [data-play-wrap]:hover,
.lunaradio-player [data-small-play-wrap]:hover { transform: scale(1.05); }

.lunaradio-player [data-play-wrap]:active,
.lunaradio-player [data-small-play-wrap]:active { transform: scale(0.95); }

.lunaradio-player [data-btn-pause],
.lunaradio-player [data-small-btn-pause] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lunaradio-player [data-preloader],
.lunaradio-player [data-small-preloader] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lunaradio-player [data-preloader] svg,
.lunaradio-player [data-small-preloader] svg {
    animation: lunaradio-spin 0.6s linear infinite;
}

@keyframes lunaradio-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================
   VOLUME BAR (big UI)
   ============================================================ */
.lunaradio-player [data-vol-wrap] {
    position: relative;
    cursor: pointer;
    touch-action: none;
}

.lunaradio-player [data-vol-bg] {
    position: absolute; left: 0; width: 100%; opacity: 0.15;
}

.lunaradio-player [data-vol-fill] {
    position: absolute; left: 0;
    transition: width 0.15s ease-out;
}

.lunaradio-player [data-vol-dot] {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    transition: left 0.15s ease-out;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.lunaradio-player [data-vol-grab] { cursor: grab; }
.lunaradio-player [data-vol-grab]:active { cursor: grabbing; }

.lunaradio-player [data-vol-end] {
    pointer-events: none;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ============================================================
   SMALL UI
   ============================================================ */
.lunaradio-player [data-small-vol-bg] {
    transition: width 0.2s ease-out;
    pointer-events: none;
}

.lunaradio-player [data-small-vol-text] {
    pointer-events: none;
    font-weight: 600;
}

.lunaradio-player [data-small-vol-grab] {
    cursor: pointer;
    touch-action: none;
}

/* ============================================================
   VISUALIZER
   ============================================================ */
.lunaradio-player [data-visualizer] {
    display: block;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
    pointer-events: none;
}

/* ============================================================
   LIVE ICON (pulse)
   ============================================================ */
.lunaradio-player [data-live] {
    animation: lunaradio-pulse 1.6s ease-in-out infinite;
}

@keyframes lunaradio-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .lunaradio-player [data-radio-name],
    .lunaradio-player [data-title] { font-size: 90% !important; }
}

@media (max-width: 480px) {
    .lunaradio-player [data-radio-name],
    .lunaradio-player [data-title] { font-size: 80% !important; }
}

@media (max-width: 320px) {
    .lunaradio-player [data-big-only] { display: none !important; }
}

@media (min-width: 1600px) {
    .lunaradio-player [data-radio-name],
    .lunaradio-player [data-title] { font-size: 110% !important; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.lunaradio-player [data-play-wrap]:focus-visible,
.lunaradio-player [data-small-play-wrap]:focus-visible,
.lunaradio-player [data-vol-grab]:focus-visible,
.lunaradio-player [data-small-vol-grab]:focus-visible,
.lunaradio-player [data-icon]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .lunaradio-player *,
    .lunaradio-player *::before,
    .lunaradio-player *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .lunaradio-player { display: none !important; }
}
