/* Radio Player v1.4 | Chatango aislado del audio y del player */
#radio-chat-button[hidden], #radio-chat-overlay[hidden] { display: none !important; }
.radio-actions-top {
    position: fixed;
    z-index: 90;
    right: 30px;
    bottom: max(22px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
/* El botón PWA preexistente entra en el mismo grupo visual. */
.radio-actions-top .pwa-install-button {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
}
.radio-chat-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 13px 17px;
    min-height: 45px;
    border-radius: 28px;
    border: 1px solid rgba(255, 115, 215, .65);
    color: white;
    font: 600 13px/1.2 'Montserrat', sans-serif;
    background: linear-gradient(115deg, rgba(122, 33, 149, .94), rgba(29, 15, 48, .97));
    box-shadow: 0 0 18px rgba(248, 55, 194, .22), 0 8px 24px rgba(0,0,0,.3);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.radio-chat-button i { color: #ff8ce5; font-size: 17px; }
.radio-chat-button:hover, .radio-chat-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(248, 55, 194, .46), 0 8px 24px rgba(0,0,0,.3);
}
.radio-chat-button:focus-visible, .radio-chat-tools button:focus-visible, .radio-chat-volume-label input:focus-visible,
.radio-chat-footer a:focus-visible { outline: 2px solid #70fff2; outline-offset: 2px; }
.radio-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 350;
    background: rgba(3, 4, 15, .94);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.radio-chat-panel {
    width: min(100%, 880px);
    height: min(94dvh, 830px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(74, 226, 237, .4);
    color: #fff;
    background: #0c0d20;
    box-shadow: 0 20px 70px #000a, 0 0 25px rgba(0, 230, 240, .13);
    font-family: 'Montserrat', sans-serif;
}
.radio-chat-header {
    flex: 0 0 auto;
    padding: 12px 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.13);
    background: linear-gradient(100deg, #132647, #201331);
}
.radio-chat-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; }
.radio-chat-title i { color: #ff8ce5; }
.radio-chat-tools { display: flex; align-items: center; gap: 11px; }
.radio-chat-tools button {
    border: 1px solid rgba(255,255,255,.18);
    color: white;
    background: rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 9px 10px;
    font: 500 12px 'Montserrat', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.radio-chat-tools .radio-chat-sound[aria-pressed="true"] { border-color: #ff8ce5; color: #ffbfeb; }
.radio-chat-tools .radio-chat-close { justify-content: center; width: 35px; height: 35px; }
.radio-chat-volume-label { display: flex; align-items: center; gap: 7px; color: #d4e4f5; font: 500 11px 'Montserrat', sans-serif; }
.radio-chat-volume-label input { width: 102px; accent-color: #22dce4; cursor: pointer; }
.radio-chat-content { position: relative; flex: 1; min-height: 0; }
.radio-chat-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #d8e6f5; font-size: 13px; text-align: center; padding: 20px; }
.radio-chat-content iframe { position: relative; display: block; width: 100%; height: 100%; border: 0; background: #101325; }
.radio-chat-footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(255,255,255,.1);
    background: #11172a;
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; padding: 9px 15px;
    font-size: 11px; color: #aeb9ca;
}
.radio-chat-footer a { color: #70fff2; text-decoration: none; }
body.radio-chat-open { overflow: hidden; }
@media (max-width: 768px) {
    .radio-actions-top {
        top: max(13px, env(safe-area-inset-top));
        bottom: auto;
        right: 14px;
        left: 14px;
        gap: 8px;
    }
    .radio-chat-button { min-height: 39px; padding: 10px 12px; font-size: 12px; }
    .radio-chat-overlay { padding: 0; }
    .radio-chat-panel { width: 100%; height: 100dvh; border: none; border-radius: 0; }
    .radio-chat-header { padding: max(12px, env(safe-area-inset-top)) 12px 10px; gap: 9px; }
    .radio-chat-title { width: 100%; font-size: 13px; }
    .radio-chat-tools { width: 100%; justify-content: space-between; gap: 7px; }
    .radio-chat-volume-label { flex: 1; justify-content: center; }
    .radio-chat-volume-label input { width: min(30vw, 130px); }
    .radio-chat-footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
    .radio-chat-button { padding: 10px 9px; font-size: 11px; }
    .radio-actions-top .pwa-install-button { padding: 10px 9px; font-size: 11px; }
    .radio-chat-volume-text { display: none; }
    .radio-chat-footer span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .radio-chat-button { transition: none; } }
