.md-radio-bar {
    position: relative;
    z-index: 1001;
    width: 100%;
    color: #ffffff;
    background: linear-gradient(110deg, #155bd7 0%, #6832d4 48%, #d91f67 100%);
    box-shadow: 0 5px 18px rgba(42, 58, 112, 0.18);
}

.md-radio-bar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: min(1200px, calc(100% - 32px));
    min-height: 50px;
    margin: 0 auto;
    color: inherit;
    text-decoration: none;
    font-family: inherit;
}

.md-radio-bar__live {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.5);
    animation: mdRadioPulse 1.8s infinite;
}

.md-radio-bar__caption {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 1;
}

.md-radio-bar__brand {
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
}

.md-radio-bar__button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 38px;
    margin-left: auto;
    padding: 0 18px;
    color: #25134e;
    background: linear-gradient(110deg, #fff29a, #ffd33d);
    border: 2px solid #fff3ad;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(24, 9, 61, 0.3);
    animation: mdRadioButtonGlow 2.8s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.md-radio-bar__button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.8) 50%, transparent 75%);
    transform: translateX(-120%);
    animation: mdRadioButtonShine 4.8s ease-in-out infinite;
}

@keyframes mdRadioButtonGlow {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(24, 9, 61, 0.3), 0 0 0 0 rgba(255, 221, 76, 0);
    }
    50% {
        box-shadow: 0 4px 18px rgba(24, 9, 61, 0.3), 0 0 0 4px rgba(255, 221, 76, 0.32), 0 0 20px rgba(255, 221, 76, 0.55);
    }
}

/* Keep the shine above the background and below the label in mobile browsers. */
.md-radio-bar__button > span {
    position: relative;
    z-index: 1;
}

@keyframes mdRadioPlayPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}

@keyframes mdRadioButtonShine {
    0%, 55% { transform: translateX(-120%); }
    85%, 100% { transform: translateX(120%); }
}

.md-radio-bar__link:hover,
.md-radio-bar__link:focus,
.md-radio-bar__link:active,
.md-radio-bar__link:visited {
    color: #ffffff;
    text-decoration: none;
}

.md-radio-bar__link:focus-visible .md-radio-bar__button {
    background: #fff29a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(24, 9, 61, 0.35), 0 0 0 3px rgba(255, 243, 173, 0.55);
}

/* Touch browsers may retain :hover after a tap: never pause their animation. */
@media (hover: hover) and (pointer: fine) {
    .md-radio-bar__link:hover .md-radio-bar__button {
        animation: none;
        background: #fff29a;
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(24, 9, 61, 0.35), 0 0 0 3px rgba(255, 243, 173, 0.55);
    }
}

.md-radio-bar__link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: -3px;
}

.md-radio-bar__mobile-text {
    display: none;
}

/* The theme header is absolutely positioned over the hero section. */
.md-radio-bar + .header {
    top: 50px;
}

@keyframes mdRadioPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }

    55% {
        box-shadow: 0 0 0 7px rgba(255, 255, 255, 0);
    }
}

@media screen and (max-width: 640px) {
    .md-radio-bar__link {
        width: calc(100% - 20px);
        min-height: 54px;
        gap: 8px;
    }

    .md-radio-bar__caption,
    .md-radio-bar__brand,
    .md-radio-bar__desktop-text {
        display: none;
    }

    .md-radio-bar__button {
        flex: 1;
        min-height: 42px;
        margin-left: 0;
        padding: 0 14px;
        font-size: 14px;
    }

    .md-radio-bar__mobile-text {
        display: inline;
    }

    .md-radio-bar__button {
        animation-duration: 1.8s;
    }

    .md-radio-bar__button::before {
        animation-duration: 2.4s;
        animation-delay: -1.4s;
    }

    .md-radio-bar__button > span[aria-hidden="true"] {
        display: inline-block;
        animation: mdRadioPlayPulse 1.4s ease-in-out infinite;
    }

    .md-radio-bar + .header {
        top: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .md-radio-bar__live,
    .md-radio-bar__button,
    .md-radio-bar__button::before,
    .md-radio-bar__button > span[aria-hidden="true"] {
        animation: none;
    }

    .md-radio-bar__button {
        transition: none;
    }

    .md-radio-bar__link:hover .md-radio-bar__button,
    .md-radio-bar__link:focus-visible .md-radio-bar__button {
        transform: none;
    }
}
