/* ==========================================
   MAGIC ISLAND — FROSTED DOCK PREMIUM
   Reproductor Oro 2026 | Estático · Sin burbuja
   4 botones: Radio · Sonadas · Programa · WhatsApp
   ========================================== */

/* ══════════════════════════════════════════
   CONTENEDOR — Cristal Frosted
   ══════════════════════════════════════════ */
.magic-island {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 8px 10px;
    width: calc(100% - 40px);
    max-width: 420px;

    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    z-index: 2200;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
    animation: islandAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes islandAppear {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ══════════════════════════════════════════
   BOTÓN BASE
   ══════════════════════════════════════════ */
.mi-btn {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    min-width: 0;

    background: transparent;
    border: none;
    border-radius: 18px;
    cursor: pointer;

    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.25s ease, color 0.25s ease;
}

.mi-btn i {
    font-size: 1.35rem;
    opacity: 0.5;
    transition: opacity 0.25s ease;
    line-height: 1;
}

.mi-btn span {
    font-family: 'Montserrat SemiBold', system-ui, sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 0.5;
    transition: opacity 0.25s ease;
    white-space: nowrap;
}

/* Barra de luz — oculta por defecto */
.mi-btn::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: var(--color-marca, #ff6b00);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

/* ══════════════════════════════════════════
   ESTADO ACTIVO — Escala + luz + opacidad
   ══════════════════════════════════════════ */
.mi-btn.active {
    transform: scale(1.1);
    color: var(--color-marca, #ff6b00);
}

.mi-btn.active i {
    opacity: 1;
}

.mi-btn.active span {
    opacity: 0.9;
}

.mi-btn.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* ══════════════════════════════════════════
   HOVER — Sutil, sin sobrecargar
   ══════════════════════════════════════════ */
.mi-btn:not(.active):hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
}

.mi-btn:not(.active):hover i {
    opacity: 0.8;
}

/* ══════════════════════════════════════════
   WHATSAPP — Acento verde propio en activo
   ══════════════════════════════════════════ */
.mi-btn--whatsapp.active {
    color: #25D366;
}

.mi-btn--whatsapp.active::after {
    background: #25D366;
}

.mi-btn--whatsapp:not(.active) {
    color: rgba(37, 211, 102, 0.55);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (min-width: 768px) {
    .magic-island { bottom: clamp(45px, 8vh, 60px); gap: 4px; padding: 12px 14px; max-width: 460px; }
    .mi-btn       { padding: 10px 8px; }
    .mi-btn i     { font-size: 1.4rem; }
}

@media (max-height: 600px) and (orientation: landscape) {
    .magic-island { bottom: 12px; padding: 6px 10px; gap: 2px; }
    .mi-btn       { padding: 6px 14px; min-width: 52px; }
    .mi-btn span  { display: none; }
    .mi-btn i     { font-size: 1.2rem; }
}

/* ══════════════════════════════════════════
   ACCESIBILIDAD
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .magic-island { animation: none; }
    .mi-btn, .mi-btn::after { transition: none; }
}

@media (prefers-contrast: high) {
    .magic-island { background: rgba(0,0,0,0.95); border-color: rgba(255,255,255,0.4); }
    .mi-btn.active { outline: 2px solid var(--color-marca, #ff6b00); }
}

/* ==========================================
   MODAL SONADAS — Overlay propio de Plan Oro
   Se muestra por encima de la isla (z-index: 2300)
   ========================================== */
.oro-sonadas-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2300;

    background: rgba(12, 14, 20, 0.96);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px 28px 0 0;

    padding: 16px 16px 110px 16px; /* 110px: espacio para que la isla no tape */

    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.oro-sonadas-panel.active {
    transform: translateY(0);
}

/* Handle de arrastre visual */
.oro-sonadas-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 20px auto;
}

/* Cabecera del panel */
.oro-sonadas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.oro-sonadas-titulo {
    font-family: 'Montserrat Black', sans-serif;
    font-size: 1rem;
    color: white;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.oro-sonadas-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.oro-sonadas-close:hover { color: white; }

/* Lista de canciones */
.oro-sonadas-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Fila de canción */
.oro-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.oro-song-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* Número de posición */
.oro-song-num {
    font-family: 'Montserrat Black', sans-serif;
    font-size: 0.7rem;
    color: rgba(var(--color-marca-rgb, 255, 107, 0), 0.7);
    min-width: 16px;
    text-align: center;
}

/* Carátula miniatura */
.oro-song-cover {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

/* Info textual */
.oro-song-info {
    flex: 1;
    min-width: 0;
}

/* Título: Montserrat-Black */
.oro-song-artist {
    font-family: 'Montserrat Black', sans-serif;
    font-size: 0.82rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Artista: Montserrat-SemiBold */
.oro-song-title {
    font-family: 'Montserrat SemiBold', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* Hora de emisión */
.oro-song-hora {
    font-family: 'Montserrat SemiBold', sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

/* Estado vacío */
.oro-sonadas-empty {
    text-align: center;
    padding: 32px 16px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Montserrat SemiBold', sans-serif;
    font-size: 0.85rem;
}

.oro-sonadas-empty i {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.2;
}

/* Desktop: el panel no usa toda la pantalla */
@media (min-width: 768px) {
    .oro-sonadas-panel {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(100%);
        width: 440px;
        border-radius: 28px 28px 0 0;
    }
    .oro-sonadas-panel.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================
   MODAL RADIO — Información Institucional
   ========================================== */
.oro-radio-modal {
    position: fixed;
    inset: 0;
    z-index: 2350;
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.oro-radio-modal.active {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
}

.oro-radio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.oro-radio-content {
    position: relative;
    z-index: 2351;
    width: calc(100vw - 32px);
    max-width: 420px;
    background: rgba(14, 16, 24, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.oro-radio-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    z-index: 2352;
}

.oro-radio-close:hover {
    color: white;
}

/* Logo wrapper */
.oro-radio-logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.oro-radio-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Nombre de la radio */
.oro-radio-nombre {
    font-family: 'Montserrat Black', sans-serif;
    font-size: 1.8rem;
    color: white;
    text-align: center;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* Slogan */
.oro-radio-slogan {
    font-family: 'Montserrat SemiBold', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0 0 24px 0;
    letter-spacing: 0.5px;
}

/* Información de contacto */
.oro-radio-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.oro-radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Montserrat SemiBold', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.oro-radio-item i {
    color: var(--color-marca, #ff6b00);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Créditos del desarrollador — Minimalista y elegante */
.oro-radio-credits {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.oro-radio-credits p {
    font-family: 'Montserrat SemiBold', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 14px 0;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.oro-radio-credits strong {
    color: var(--color-marca, #ff6b00);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.oro-radio-credits a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--color-marca-rgb, 255, 107, 0), 0.12);
    color: var(--color-marca, #ff6b00);
    font-size: 1.1rem;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    text-decoration: none;
    border: 1px solid rgba(var(--color-marca-rgb, 255, 107, 0), 0.2);
}

.oro-radio-credits a:hover {
    background: rgba(var(--color-marca-rgb, 255, 107, 0), 0.2);
    transform: scale(1.08);
    border-color: rgba(var(--color-marca-rgb, 255, 107, 0), 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .oro-radio-content {
        width: calc(100vw - 24px);
        padding: 24px 16px;
    }

    .oro-radio-nombre {
        font-size: 1.5rem;
    }

    .oro-radio-logo {
        width: 100px;
        height: 100px;
    }
}

