/* ============================================================
   IA RADIO V3 — PLAYER.CSS
   © RadioNet.tv 2026
   ============================================================ */

/* ── Variables de modo ─────────────────────────────────────── */
:root {
    --ia-color:  #00bcd4;
    --ia-shadow: rgba(0,188,212,0.4);
    --ia-bg:     rgba(0,188,212,0.12);
}

/* ── Player Bar ────────────────────────────────────────────── */
.ia-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-top: 2px solid var(--ia-color);
    box-shadow: 0 -4px 20px var(--ia-shadow);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

@media (min-width: 769px) {
    .ia-player-bar {
        top: 90px;
        bottom: auto;
        left: 20px;
        right: auto;
        border-top: none;
        border: 2px solid var(--ia-color);
        border-radius: 15px;
        padding: 10px 16px;
        gap: 12px;
        box-shadow: 0 4px 20px var(--ia-shadow);
        justify-content: flex-start;
    }
    main { padding-top: 0; }
}

@media (max-width: 768px) {
    main { padding-bottom: 80px !important; }
    footer { margin-bottom: 70px !important; }
}

/* ── Botón Play/Pausa ──────────────────────────────────────── */
.ia-btn-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ia-color) 0%, #007c91 100%);
    border: none;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--ia-shadow);
    transition: background 0.4s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.ia-btn-play:active { transform: scale(0.93); }

/* ── Botón Modo ────────────────────────────────────────────── */
.ia-btn-mode {
    padding: 7px 13px;
    border-radius: 20px;
    background: var(--ia-bg);
    border: 1px solid var(--ia-color);
    color: var(--ia-color);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.4s ease;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.3px;
}
.ia-btn-mode:active { transform: scale(0.93); }

/* ── Botón Portada ─────────────────────────────────────────── */
.ia-btn-portada {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--ia-bg);
    border: 1px solid var(--ia-color);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.ia-btn-portada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}
.ia-btn-portada:active { transform: scale(0.93); }

/* Pulso cuando hay canción en Digital Wave */
.ia-btn-portada.pulse {
    animation: ia-portada-pulse 1.5s ease-in-out infinite;
}
@keyframes ia-portada-pulse {
    0%,100% { box-shadow: 0 0 0 0 var(--ia-shadow); }
    50%      { box-shadow: 0 0 0 8px transparent; }
}

/* ── Modos — colores ───────────────────────────────────────── */
.ia-mode-ia_radio  { --ia-color: #00bcd4; --ia-shadow: rgba(0,188,212,0.4);  --ia-bg: rgba(0,188,212,0.12);  }
.ia-mode-clasico   { --ia-color: #26a69a; --ia-shadow: rgba(38,166,154,0.4); --ia-bg: rgba(38,166,154,0.12); }
.ia-mode-grupero   { --ia-color: #ff4569; --ia-shadow: rgba(255,69,105,0.4); --ia-bg: rgba(255,69,105,0.12); }
.ia-mode-espiritual{ --ia-color: #e0e0e0; --ia-shadow: rgba(224,224,224,0.3);--ia-bg: rgba(224,224,224,0.08);}

.ia-mode-grupero .ia-btn-play {
    background: linear-gradient(135deg, #ff4569 0%, #c62828 100%);
}
.ia-mode-clasico .ia-btn-play {
    background: linear-gradient(135deg, #26a69a 0%, #00695c 100%);
}
.ia-mode-espiritual .ia-btn-play {
    background: linear-gradient(135deg, #f5f5f5 0%, #9e9e9e 100%);
    color: #111;
}

/* ── Modal Portada ─────────────────────────────────────────── */
.ia-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: ia-fadein 0.3s ease;
}
.ia-modal.active { display: flex; }

@keyframes ia-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ia-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid var(--ia-color);
    border-radius: 20px;
    padding: 28px 24px 24px;
    max-width: 380px;
    width: 90%;
    position: relative;
    animation: ia-slidein 0.3s ease;
    box-shadow: 0 10px 50px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* En mobile reducir portada para que quepa todo */
@media (max-height: 700px) {
    .ia-modal-artwork {
        width: 60% !important;
        margin: 0 auto 12px !important;
    }
    .ia-modal-content {
        padding: 20px 18px 18px;
    }
}

@media (max-height: 600px) {
    .ia-modal-artwork { display: none !important; }
}
@keyframes ia-slidein {
    from { transform: translateY(-30px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.ia-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,0,0,0.2);
    border: 1px solid rgba(255,0,0,0.4);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.ia-modal-close:hover { background: rgba(255,0,0,0.5); }

.ia-modal-artwork {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 16px;
    overflow: hidden;
}
.ia-modal-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Barra de progreso */
.ia-modal-progress-wrap { margin-bottom: 14px; }
.ia-modal-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}
.ia-modal-progress-fill {
    height: 100%;
    background: var(--ia-color);
    border-radius: 2px;
    width: 0%;
    transition: width 1s linear;
}
.ia-modal-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}

.ia-modal-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--ia-color);
    text-align: center;
    margin-bottom: 6px;
    word-break: break-word;
}
.ia-modal-artist {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-bottom: 18px;
}

.ia-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ia-modal-btn {
    background: linear-gradient(135deg, var(--ia-color) 0%, #007c91 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.ia-modal-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.ia-modal-btn:active { transform: translateY(0); }

.ia-modal-btn-buy {
    background: linear-gradient(135deg, #ffb700 0%, #ff8c00 100%);
}

/* ── Banner Digital Wave ───────────────────────────────────── */
.ia-dw-banner-desktop,
.ia-dw-banner-mobile {
    position: fixed;
    z-index: 9980;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #ffb700;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: ia-fadein 0.3s ease;
    box-shadow: 0 4px 20px rgba(255,183,0,0.3);
    font-size: 13px;
    color: #fff;
}
.ia-dw-banner-desktop {
    top: 150px;
    left: 20px;
    max-width: 340px;
}
.ia-dw-banner-mobile {
    bottom: 80px;
    left: 10px;
    right: 10px;
    justify-content: space-between;
}
.ia-dw-banner-desktop button,
.ia-dw-banner-mobile button {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

@media (min-width: 769px) { .ia-dw-banner-mobile  { display: none !important; } }
@media (max-width: 768px) { .ia-dw-banner-desktop { display: none !important; } }

/* ── Link Súper Conductor Plus ─────────────────────────────── */
.ia-modal-scp-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #ffb700;
    font-size: 12px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.ia-modal-scp-link:hover { opacity: 1; }

/* ── Share Panel ───────────────────────────────────────────── */
.ia-share-panel {
    margin-top: 14px;
    background: rgba(0,0,0,0.3);
    border-radius: 14px;
    padding: 16px;
    animation: ia-fadein 0.25s ease;
}
.ia-share-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--ia-color);
    text-align: center;
    margin-bottom: 12px;
}
.ia-share-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}
.ia-share-btn {
    padding: 8px 4px;
    border-radius: 10px;
    border: none;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    color: #fff;
}
.ia-share-btn:active { transform: scale(0.95); }
.ia-share-ws   { background: #25d366; }
.ia-share-fb   { background: #1877f2; }
.ia-share-tw   { background: #000; }
.ia-share-sms  { background: #5856d6; }
.ia-share-mail { background: #ea4335; }
.ia-share-copy { background: #555; }

.ia-share-qr-wrap {
    text-align: center;
    margin-bottom: 10px;
}
.ia-share-qr-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
}
.ia-share-qr {
    width: 100px !important;
    height: 100px !important;
    border-radius: 10px;
    background: #fff;
    padding: 5px;
}
.ia-share-close {
    display: block;
    width: 100%;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #888;
    font-size: 12px;
    padding: 7px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ia-share-close:hover { border-color: rgba(255,255,255,0.35); color: #fff; }
#iaModeToast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0,0,0,0.88);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 99990;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}
#iaModeToast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@media (min-width: 769px) {
    #iaModeToast { bottom: auto; top: 160px; left: 20px; transform: none; }
    #iaModeToast.visible { transform: none; }
}
