/* ============================================================
   VMusic Mini Radio Flotante — Premium Vintage Styling
   ============================================================ */

:root {
    --vmmr-wood: #3d2217;
    --vmmr-wood-deep: #22120b;
    --vmmr-wood-light: #5a3321;
    --vmmr-gold: #c5a059;
    --vmmr-gold-bright: #e5c079;
    --vmmr-amber: #ffaa00;
    --vmmr-bg: #0a0806;
    --vmmr-text: #ddd;
    --vmmr-text-dim: #777;
    --vmmr-shadow: rgba(0, 0, 0, 0.6);
}

/* ---- Floating Action Button (minimized state) ---- */

.vmmr-mini-radio.vmmr-hidden .vmmr-panel {
    display: none;
}

.vmmr-mini-radio.vmmr-hidden .vmmr-fab {
    display: none;
}

.vmmr-mini-radio.vmmr-expanded .vmmr-panel {
    display: flex;
}

.vmmr-mini-radio.vmmr-expanded .vmmr-fab {
    display: none;
}

.vmmr-mini-radio {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Courier New', 'Courier', monospace;
}

.vmmr-fab {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--vmmr-wood-deep);
    background:
        radial-gradient(circle at 35% 35%, var(--vmmr-wood-light), var(--vmmr-wood) 60%, var(--vmmr-wood-deep));
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.7),
        0 0 0 2px rgba(197, 160, 89, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.15);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    animation: vmmr-fabEntry 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Top header launcher near search icon */
.vmmr-header-launch.vmmr-top-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px !important;
    width: auto !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(197, 160, 89, 0.55);
    background: rgba(197, 160, 89, 0.16);
    color: var(--vmmr-gold-bright);
    line-height: 1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.vmmr-header-launch.vmmr-top-launch:hover {
    background: rgba(255, 170, 0, 0.24);
    border-color: rgba(255, 170, 0, 0.75);
}

.vmmr-fab:hover {
    transform: scale(1.1);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.8),
        0 0 0 3px rgba(255, 170, 0, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

@keyframes vmmr-fabEntry {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.vmmr-fab-label {
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1.8px;
    font-weight: 700;
    color: var(--vmmr-gold-bright);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.vmmr-fab-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--vmmr-amber);
    opacity: 0;
    pointer-events: none;
}

.vmmr-mini-radio.vmmr-playing .vmmr-fab-pulse {
    animation: vmmr-pulse 2s ease-out infinite;
}

@keyframes vmmr-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ---- Panel (expanded state) ---- */

.vmmr-panel {
    width: 340px;
    background: var(--vmmr-bg);
    border: 3px solid var(--vmmr-wood-deep);
    border-radius: 16px;
    /* overflow: hidden; -- Eliminado para permitir que el desplegable de géneros flote fuera del panel */
    flex-direction: column;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(197, 160, 89, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: vmmr-panelSlideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

/* Wood grain overlay on panel */
.vmmr-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://www.transparenttextures.com/patterns/dark-wood.png');
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
}

@keyframes vmmr-panelSlideDown {
    0% {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ---- Panel Header ---- */

.vmmr-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--vmmr-wood), var(--vmmr-wood-deep));
    border-bottom: 2px solid rgba(0, 0, 0, 0.5);
    border-radius: 13px 13px 0 0; /* Ajuste para mantener las esquinas redondeadas del panel superior */
    position: relative;
    z-index: 1;
}

.vmmr-panel-title {
    color: var(--vmmr-gold);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.vmmr-header-actions {
    display: flex;
    gap: 6px;
}

.vmmr-btn-minimize,
.vmmr-btn-close {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
}

.vmmr-btn-minimize:hover,
.vmmr-btn-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ---- Art Row ---- */

.vmmr-art-row {
    display: flex;
    gap: 12px;
    padding: 14px;
    position: relative;
    z-index: 1;
}

.vmmr-art-container {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    border: 2px solid #1a1a1a;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vmmr-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vmmr-art-placeholder {
    color: #222;
    font-size: 28px;
}

.vmmr-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.vmmr-album-name {
    color: var(--vmmr-amber);
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

.vmmr-track-name {
    color: var(--vmmr-text-dim);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Progress Bar ---- */

.vmmr-progress-wrap {
    width: 100%;
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    cursor: pointer;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
}

.vmmr-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--vmmr-gold), var(--vmmr-amber));
    border-radius: 2px;
    transition: width 0.3s linear;
    box-shadow: 0 0 6px rgba(255, 170, 0, 0.4);
}

/* ---- Controls ---- */

.vmmr-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px 10px;
    position: relative;
    z-index: 1;
}

.vmmr-ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    background: radial-gradient(circle at 35% 35%, #333, #111 80%);
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    position: relative;
}

.vmmr-ctrl-btn:hover {
    background: radial-gradient(circle at 35% 35%, #555, #222 80%);
    color: #fff;
    border-color: rgba(255, 170, 0, 0.3);
}

.vmmr-ctrl-btn:active {
    transform: scale(0.92);
}

/* Play button — special treatment */
.vmmr-play-btn {
    width: 44px;
    height: 44px;
    background: radial-gradient(circle, var(--vmmr-gold-bright) 0%, var(--vmmr-gold) 100%);
    color: #111;
    border: 3px solid #000;
    font-size: 16px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.vmmr-play-btn:hover {
    background: radial-gradient(circle, #ffe090, #d4af37);
    color: #000;
    border-color: #000;
}

.vmmr-mini-radio.vmmr-playing .vmmr-play-btn {
    background: radial-gradient(circle, #ffcc00 0%, #d4af37 100%);
    box-shadow:
        0 0 15px rgba(255, 170, 0, 0.5),
        inset 0 0 5px rgba(255, 255, 255, 0.4);
}

/* ---- Volume ---- */

.vmmr-volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.vmmr-volume-slider {
    width: 0;
    opacity: 0;
    transition: width 0.3s, opacity 0.3s;
    appearance: none;
    -webkit-appearance: none;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.vmmr-volume-wrap:hover .vmmr-volume-slider,
.vmmr-volume-wrap.vmmr-vol-open .vmmr-volume-slider {
    width: 60px;
    opacity: 1;
}

.vmmr-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vmmr-amber);
    cursor: pointer;
    box-shadow: 0 0 4px rgba(255, 170, 0, 0.5);
}

.vmmr-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vmmr-amber);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(255, 170, 0, 0.5);
}

/* ---- Genre Selector ---- */

.vmmr-genre-selector {
    position: relative;
}

.vmmr-genre-dropdown {
    display: none;
    position: absolute;
    top: 46px;
    left: 0;
    width: 200px;
    max-height: 260px;
    overflow-y: auto;
    background: #111;
    border: 2px solid #222;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    z-index: 10;
    padding: 6px 0;
}

.vmmr-genre-dropdown.vmmr-dd-open {
    display: block;
    animation: vmmr-ddIn 0.2s ease-out;
}

@keyframes vmmr-ddIn {
    0% {
        transform: translateY(8px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.vmmr-genre-dropdown::-webkit-scrollbar {
    width: 5px;
}

.vmmr-genre-dropdown::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.vmmr-genre-option {
    padding: 8px 14px;
    color: #aaa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vmmr-genre-option:hover {
    background: #1a1a1a;
    color: var(--vmmr-amber);
    padding-left: 18px;
}

.vmmr-genre-option.active {
    color: var(--vmmr-amber);
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

/* ---- Equalizer ---- */

.vmmr-eq {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 20px;
    padding: 0 14px 10px;
    position: relative;
    z-index: 1;
}

.vmmr-eq span {
    width: 4px;
    height: 3px;
    background: var(--vmmr-amber);
    border-radius: 2px;
    opacity: 0.15;
    transition: all 0.3s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span {
    opacity: 0.85;
    animation: vmmr-eqBounce 0.8s ease-in-out infinite alternate;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(1) {
    animation-duration: 0.6s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(2) {
    animation-duration: 0.9s;
    animation-delay: 0.05s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(3) {
    animation-duration: 0.7s;
    animation-delay: 0.1s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(4) {
    animation-duration: 1.0s;
    animation-delay: 0.15s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(5) {
    animation-duration: 0.5s;
    animation-delay: 0.2s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(6) {
    animation-duration: 0.8s;
    animation-delay: 0.1s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(7) {
    animation-duration: 1.1s;
    animation-delay: 0.05s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(8) {
    animation-duration: 0.65s;
    animation-delay: 0.15s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(9) {
    animation-duration: 0.9s;
    animation-delay: 0.2s;
}

.vmmr-mini-radio.vmmr-playing .vmmr-eq span:nth-child(10) {
    animation-duration: 0.7s;
    animation-delay: 0.08s;
}

@keyframes vmmr-eqBounce {
    0% {
        height: 3px;
    }

    100% {
        height: 16px;
    }
}

/* ---- Responsive ---- */

@media (max-width: 480px) {
    .vmmr-mini-radio {
        top: 12px;
        right: 12px;
    }

    .vmmr-panel {
        width: calc(100vw - 24px);
        position: absolute;
        right: 0;
        top: 0;
    }

    .vmmr-fab {
        width: 52px;
        height: 52px;
    }

    .vmmr-fab-label {
        font-size: 10px;
        letter-spacing: 1.2px;
    }

    .vmmr-volume-wrap:hover .vmmr-volume-slider,
    .vmmr-volume-wrap.vmmr-vol-open .vmmr-volume-slider {
        width: 45px;
    }
}

/* Don't show the mini player on the vintage radio shortcode page if radio is visible */
/* This can be toggled via JS */