/* --- Contenedor Principal Flotante --- */
#rb-player-container {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    background-color: #252525;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* --- Logo Wrapper --- */
.rb-logo-wrapper {
    width: 60px;
    height: 60px;
    background-color: #5B1789;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: white;
    position: relative;
}

.rb-logo-wrapper img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.rb-logo-wrapper svg,
#rb-play-pause-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* --- Controles de Escritorio --- */
.rb-controls-wrapper {
    display: flex;
    align-items: center;
    padding: 0 15px 0 10px;
    max-width: 300px;
    opacity: 1;
    visibility: visible;
    white-space: nowrap;
    transition: all 0.3s ease-in-out;
}

@media (hover: hover) and (min-width: 769px) {
    #rb-player-container.is-desktop:not(.rb-collapsed):hover .rb-controls-wrapper {
        max-width: 300px;
        opacity: 1;
        visibility: visible;
    }
    #rb-player-container.is-desktop .rb-logo-wrapper {
        cursor: default;
    }
}

#rb-play-pause-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 5px;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

#rb-play-pause-btn:hover { color: #aaaaaa; }

/* --- Slider de Volumen --- */
#rb-volume-control {
    width: 100px;
    height: 5px;
    margin-right: 15px;
    -webkit-appearance: none;
    appearance: none;
    background: #4a4a4a;
    border-radius: 5px;
    outline: none;
}

#rb-volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #5B1789;
    border-radius: 50%;
    cursor: pointer;
}

/* --- Indicador En Vivo --- */
#rb-live-indicator {
    display: flex;
    align-items: center;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
}

.rb-live-dot {
    width: 12px;
    height: 12px;
    background-color: #E74B34;
    border-radius: 50%;
    margin-right: 8px;
    animation: rb-pulse 1.5s infinite;
}

@keyframes rb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 75, 52, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(231, 75, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 75, 52, 0); }
}

/* --- Comportamiento Móvil --- */
@media (max-width: 768px) {
    .rb-controls-wrapper { display: none; }
    
    #rb-player-container.is-mobile {
        width: 60px;
        background: transparent;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    #rb-player-container.is-mobile .rb-logo-wrapper {
        border-radius: 8px;
        width: 100%;
    }
}

/* --- Estado Colapsado --- */
#rb-player-container.rb-collapsed {
    width: auto;
    background-color: #252525;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    align-items: center;
}

#rb-player-container.rb-collapsed .rb-logo-wrapper {
    width: 60px;
    height: 60px;
    cursor: pointer;
}

.rb-logo-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    color: white;
    background-color: #5B1789;
    border-radius: 6px;
}

.rb-logo-overlay svg {
    width: 20px;
    height: 20px;
}

#rb-player-container.rb-collapsed .rb-controls-wrapper {
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    padding: 0;
}

.rb-logo-wrapper.active {
    box-shadow: 0 0 0 4px rgba(91, 23, 137, 0.12);
}

/* --- LOADER (Spinner) --- */
.rb-is-loading .rb-logo-wrapper img,
.rb-is-loading .rb-logo-wrapper svg {
    opacity: 0.4;
}

.rb-is-loading .rb-logo-wrapper::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    margin: auto;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rb-spin 0.8s linear infinite;
    z-index: 100;
    pointer-events: none;
}

@keyframes rb-spin {
    to { transform: rotate(360deg); }
}

/* --- Estilos Shortcode Botón --- */
.rb-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #5B1789;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(91, 23, 137, 0.3);
}

.rb-inline-btn:hover {
    background-color: #460f6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(91, 23, 137, 0.4);
}

.rb-inline-btn svg { width: 20px; height: 20px; }

.rb-inline-btn.is-playing {
    background-color: #E74B34;
    box-shadow: 0 4px 6px rgba(231, 75, 52, 0.3);
}

.rb-inline-btn.is-playing:hover { background-color: #c0392b; }

/* Loader en botón inline */
.rb-inline-btn.is-loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}

.rb-inline-btn.is-loading .rb-btn-icon svg { opacity: 0; }

.rb-inline-btn.is-loading .rb-btn-icon::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rb-spin 0.8s linear infinite;
    left: 24px; /* Ajuste aproximado según padding */
}