/*
 * Music ecards: show only a big "Play Music" button instead of the full player bar.
 * Loaded after css/progression-player.css on cards with an <audio> player
 * (see card_player_css_tag() in inc/card_tokens.php).
 */

/* Shrink the player to just the button, centered */
body .responsive-wrapper.responsive-audio .mejs-container.progression-audio-player,
body .mejs-container.progression-audio-player {
    width: 180px !important;
    height: 52px !important;
    margin: 0 auto;
    background: transparent;
    border-radius: 26px;
    overflow: hidden;
}
body .mejs-container.progression-audio-player .mejs-controls {
    width: 180px;
    height: 52px;
    border: 0;
    background: transparent;
    background-image: none;
}

/* Hide everything except play/pause */
body .mejs-container.progression-audio-player .mejs-controls > div:not(.mejs-playpause-button) {
    display: none !important;
}

/* Big labeled play/pause button */
body .mejs-container.progression-audio-player .mejs-controls .mejs-playpause-button {
    width: 180px;
    height: 52px;
    margin: 0;
    border: 0;
    border-radius: 26px;
    background: #61b6cb;
    background-image: none;
}
body .mejs-container.progression-audio-player .mejs-controls .mejs-playpause-button:hover {
    background: #5199ab;
    background-image: none;
}
body .mejs-container.progression-audio-player .mejs-controls .mejs-playpause-button button {
    width: 180px;
    height: 52px;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 0;
    line-height: 52px;
    text-align: center;
    white-space: nowrap;
}
body .mejs-container.progression-audio-player .mejs-controls .mejs-playpause-button button:hover {
    color: #fff;
}
body .mejs-container.progression-audio-player .mejs-controls .mejs-playpause-button button:before {
    font-size: 20px;
    line-height: 52px;
    vertical-align: top;
}
body .mejs-container.progression-audio-player .mejs-controls .mejs-playpause-button button:after {
    content: "Play Music";
    display: inline-block;
    margin-left: 8px;
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    line-height: 52px;
    vertical-align: top;
}
body .mejs-container.progression-audio-player .mejs-controls .mejs-pause button:after {
    content: "Pause";
}

/* Gentle pulse while paused */
body .mejs-container.progression-audio-player .mejs-controls .mejs-play {
    animation: card-player-pulse 1.8s ease-in-out infinite;
}
@keyframes card-player-pulse {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.75); }
}
@media (prefers-reduced-motion: reduce) {
    body .mejs-container.progression-audio-player .mejs-controls .mejs-play {
        animation: none;
    }
}
