/* ============================================================
   Música en el Aire – Sticky Player
   Radios en Internet · radioseninternet.net
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    --mea-bg:      #1a2a3a;
    --mea-bg2:     #243347;
    --mea-accent:  #5ba3d9;
    --mea-accent2: #7ec8f0;
    --mea-text:    #e8f2fb;
    --mea-muted:   #8aafc8;
    --mea-border:  rgba(91,163,217,0.25);
    --mea-h:       68px;
    --mea-font:    'Montserrat', 'Segoe UI', sans-serif;
}

/* ── Barra principal ── */
#mea-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 99999;
    height: var(--mea-h);
    background: var(--mea-bg);
    border-top: 1px solid var(--mea-border);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.45);
    font-family: var(--mea-font);
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
#mea-bar.mea-visible { transform: translateY(0); }

.mea-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

/* ── Carátula ── */
.mea-art-wrap {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
}
#mea-art {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--mea-border);
    display: block;
    transition: opacity 0.3s;
}
.mea-live-dot {
    position: absolute;
    bottom: -3px; right: -3px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #e53935;
    border: 2px solid var(--mea-bg);
    opacity: 0;
    transition: opacity 0.3s;
}
#mea-bar.mea-playing .mea-live-dot { opacity: 1; }

/* ── Info canción ── */
.mea-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.mea-station-name {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--mea-accent);
    text-transform: uppercase;
    line-height: 1;
}
.mea-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--mea-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: opacity 0.3s;
}
.mea-artist {
    font-size: 11px;
    color: var(--mea-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* ── Visualizador ── */
.mea-vis {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 22px;
    flex-shrink: 0;
}
.mea-vis span {
    display: block;
    width: 3px;
    background: var(--mea-accent);
    border-radius: 2px;
    height: 4px;
}
#mea-bar.mea-playing .mea-vis span:nth-child(1) { animation: mea-bar 0.9s ease-in-out infinite; }
#mea-bar.mea-playing .mea-vis span:nth-child(2) { animation: mea-bar 0.7s ease-in-out infinite 0.15s; }
#mea-bar.mea-playing .mea-vis span:nth-child(3) { animation: mea-bar 1.1s ease-in-out infinite 0.05s; }
#mea-bar.mea-playing .mea-vis span:nth-child(4) { animation: mea-bar 0.8s ease-in-out infinite 0.25s; }
#mea-bar.mea-playing .mea-vis span:nth-child(5) { animation: mea-bar 1.0s ease-in-out infinite 0.1s; }
@keyframes mea-bar {
    0%, 100% { height: 4px; }
    50%       { height: 20px; }
}

/* ── Botón Play ── */
.mea-btn-play {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--mea-accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 0 0 rgba(91,163,217,0.4);
}
.mea-btn-play:hover {
    background: var(--mea-accent2);
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(91,163,217,0.15);
}
.mea-btn-play svg { width: 22px; height: 22px; }

/* ── Volumen ── */
.mea-vol-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.mea-btn-mute {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mea-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.mea-btn-mute:hover { color: var(--mea-accent); }
.mea-btn-mute svg { width: 18px; height: 18px; }

.mea-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 72px; height: 4px;
    border-radius: 2px;
    background: var(--mea-bg2);
    outline: none;
    cursor: pointer;
}
.mea-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--mea-accent);
    cursor: pointer;
    transition: transform 0.15s;
}
.mea-volume::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* ── Apps ── */
.mea-apps {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.mea-app-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 20px;
    border: 1px solid var(--mea-border);
    color: var(--mea-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}
.mea-app-btn:hover {
    color: var(--mea-accent2);
    border-color: var(--mea-accent);
    background: rgba(91,163,217,0.08);
}
.mea-app-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Redes sociales ── */
.mea-socials {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.mea-socials a {
    color: var(--mea-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.15s;
}
.mea-socials a:hover { color: var(--mea-accent2); transform: translateY(-2px); }
.mea-socials svg { width: 16px; height: 16px; }

/* ── Streaming by RSI ── */
.mea-rsi {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.55;
    transition: opacity 0.2s;
    text-decoration: none;
}
.mea-rsi:hover { opacity: 1; }
.mea-rsi-label {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mea-muted);
    white-space: nowrap;
}
.mea-rsi img {
    height: 18px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* ── Responsive ── */
@media (max-width: 780px) {
    .mea-apps    { display: none; }
}
@media (max-width: 600px) {
    .mea-socials { display: none; }
    .mea-rsi     { display: none; }
    .mea-vis     { display: none; }
    .mea-volume  { width: 56px; }
    #mea-art     { width: 38px; height: 38px; }
    .mea-art-wrap{ width: 38px; height: 38px; }
    .mea-inner   { gap: 8px; padding: 0 10px; }
}
@media (max-width: 400px) {
    .mea-vol-wrap { display: none; }
}
