/* PWA emissoras.com — paleta roxa original, em todos os estados de interação. */
.em-pwa-inline-mount {
    width: 100%;
    margin: .75rem 0 1rem;
}

.em-pwa-action-card {
    position: relative;
    z-index: 5;
    display: none;
    justify-content: center;
    width: 100%;
    margin: 0 auto 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
}

.em-pwa-action-card.em-pwa-visible {
    display: flex;
}

.em-pwa-action-main {
    appearance: none;
    width: 100%;
    max-width: 420px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #8259E9 0%, #47309F 100%);
    box-shadow: 0 16px 34px rgba(96, 64, 170, .28);
    padding: 13px 18px;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
}

.em-pwa-action-main:disabled {
    cursor: wait;
    opacity: .96;
}

.em-pwa-action-card.em-pwa-updating .em-pwa-action-icon {
    animation: em-pwa-spin 1s linear infinite;
}

@keyframes em-pwa-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.em-pwa-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #7048CE;
    background: rgba(255, 255, 255, .96);
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.em-pwa-action-copy {
    min-width: 0;
    flex: 0 1 auto;
    line-height: 1.22;
}

.em-pwa-action-copy strong {
    display: block;
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
}

.em-pwa-action-copy span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, .86);
}

.em-pwa-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 9px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

@media (max-width: 420px) {
    .em-pwa-action-main {
        max-width: 100%;
        min-height: 56px;
        gap: 10px;
        padding: 12px 14px;
    }

    .em-pwa-action-copy strong {
        font-size: 14px;
    }

    .em-pwa-action-copy span {
        font-size: 11px;
    }
}

/* Mount remains within the existing emissoras.com portal; never overlays the player. */
.em-pwa-inline-mount { clear: both; }
.em-pwa-action-card[hidden] { display: none !important; }
.em-pwa-action-copy { flex: 1 1 auto; }
.em-pwa-action-main:focus-visible { outline: 3px solid #AA91FD; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .em-pwa-action-card.em-pwa-updating .em-pwa-action-icon { animation-duration: 2s; } }

.em-pwa-action-main:disabled:not([aria-busy]) { cursor: default; }

/* Isolado ao cartão PWA: estados que podem ser sobrepostos pelo tema externo. */
.em-pwa-action-card .em-pwa-action-main,
.em-pwa-action-card .em-pwa-action-main:hover,
.em-pwa-action-card .em-pwa-action-main:focus,
.em-pwa-action-card .em-pwa-action-main:active,
.em-pwa-action-card .em-pwa-action-main:disabled,
#em-app .em-pwa-action-card .em-pwa-action-main,
#em-app .em-pwa-action-card .em-pwa-action-main:hover,
#em-app .em-pwa-action-card .em-pwa-action-main:focus,
#em-app .em-pwa-action-card .em-pwa-action-main:active,
#em-app .em-pwa-action-card .em-pwa-action-main:disabled {
    background: linear-gradient(135deg, #8259E9 0%, #47309F 100%);
    border-color: #7048CE;
    color: #ffffff;
}
.em-pwa-action-card .em-pwa-action-main .em-pwa-action-icon,
#em-app .em-pwa-action-card .em-pwa-action-main .em-pwa-action-icon {
    color: #7048CE;
}
.em-pwa-action-card .em-pwa-action-main:focus-visible,
#em-app .em-pwa-action-card .em-pwa-action-main:focus-visible {
    outline: 3px solid #AA91FD;
    outline-offset: 3px;
}


/* 1.0.3: o mesmo cartão de instalação/atualização dentro de Opções.
   Layout totalmente contido no drawer; nenhuma mudança no player, menu ou tema. */
#em-app .em-drawer-options .em-pwa-options-mount {
    width: 100%;
    min-width: 0;
    margin: 0;
}
#em-app .em-drawer-options .em-pwa-options-mount:empty { display: none; }
#em-app .em-drawer-options .em-pwa-action-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    justify-content: stretch;
}
#em-app .em-drawer-options .em-pwa-action-card.em-pwa-visible { margin-top: 10px; }
#em-app .em-drawer-options .em-pwa-action-main {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 64px;
    padding: 12px 13px;
    gap: 10px;
    border-radius: 15px;
    justify-content: flex-start;
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(71, 48, 159, .17);
}
#em-app .em-drawer-options .em-pwa-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}
#em-app .em-drawer-options .em-pwa-action-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
}
#em-app .em-drawer-options .em-pwa-action-copy strong {
    font-size: 14px;
    line-height: 1.25;
}
#em-app .em-drawer-options .em-pwa-action-copy span {
    font-size: 11px;
    line-height: 1.4;
}
#em-app .em-drawer-options .em-pwa-badge {
    font-size: 11px;
    padding: 5px 8px;
}
@media (max-width: 360px) {
    #em-app .em-drawer-options .em-pwa-action-main {
        gap: 8px;
        padding: 11px;
        flex-wrap: wrap;
    }
    #em-app .em-drawer-options .em-pwa-action-icon { width: 34px; height: 34px; }
    #em-app .em-drawer-options .em-pwa-action-copy {
        flex: 1 1 calc(100% - 42px);
    }
    #em-app .em-drawer-options .em-pwa-badge {
        margin-left: 42px;
        font-size: 10px;
    }
}


/* v1.0.5 — cartão principal abaixo da marca do rodapé, antes dos links.
   A grade com Termos e Políticas mantém suas três colunas sem interferência.
   O mount fica oculto por padrão e é exibido somente em estado PWA elegível. */
#em-app .em-site-footer > .em-pwa-footer-mount {
    grid-column: 1 / -1;
    flex: 0 0 100%;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}
#em-app .em-site-footer > .em-pwa-footer-mount[hidden] {
    display: none !important;
}
#em-app .em-site-footer > .em-pwa-footer-mount .em-pwa-action-card {
    width: 100%;
    min-width: 0;
    margin: 0;
}
#em-app .em-site-footer > .em-pwa-footer-mount .em-pwa-action-main {
    box-sizing: border-box;
}
