/* Holy cross = play / pause control — same look on iOS Safari + desktop */

.holy-cross-wrap {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.audio-controls {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#holyCrossBtn {
    /* Kill iOS / Safari system button chrome */
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;

    box-sizing: border-box;
    width: 112px;
    height: 112px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(212, 168, 75, 0.5);
    border-radius: 50%;
    cursor: pointer;

    /* Avoid double-border quirk: border already set */
    background-color: rgba(8, 6, 14, 0.62);
    background-image: radial-gradient(
        circle at 38% 32%,
        rgba(255, 230, 160, 0.28) 0%,
        rgba(8, 6, 14, 0.55) 62%,
        rgba(8, 6, 14, 0.72) 100%
    );
    /* Solid fallback under gradient for older WebKit */
    color: #e8c56a;
    font: inherit;
    line-height: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 12px 36px rgba(0, 0, 0, 0.55),
        0 0 48px rgba(212, 168, 75, 0.18);

    /* Blur is optional eye-candy; keep light so iOS doesn't over-frost */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);

    transition: background 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
    animation: crossPulse 4.5s ease-in-out infinite;
    will-change: transform;
}

/* Larger phones / tablets still scale a bit, but avoid wild vw swings */
@media (min-width: 400px) {
    #holyCrossBtn {
        width: 124px;
        height: 124px;
    }
}
@media (min-width: 769px) {
    #holyCrossBtn {
        width: 132px;
        height: 132px;
    }
}

#holyCrossBtn:hover {
    filter: brightness(1.06);
}

#holyCrossBtn:active {
    animation: none;
    transform: scale(0.96);
    filter: brightness(0.98);
}

#holyCrossBtn:focus {
    outline: none;
}
#holyCrossBtn:focus-visible {
    outline: 2px solid rgba(232, 197, 106, 0.7);
    outline-offset: 3px;
}

/* SVG cross — identical glyph on every OS */
#holyCrossBtn .cross-icon {
    display: block;
    width: 48%;
    height: 48%;
    max-width: 58px;
    max-height: 58px;
    margin: 0;
    padding: 0;
    line-height: 0;
    pointer-events: none;
    animation: crossIconPulse 4.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 210, 100, 0.45));
}

#holyCrossBtn .cross-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

#holyCrossBtn.is-playing {
    background-color: rgba(12, 8, 20, 0.55);
    background-image: radial-gradient(
        circle at 38% 32%,
        rgba(255, 230, 160, 0.36) 0%,
        rgba(12, 8, 20, 0.5) 65%,
        rgba(12, 8, 20, 0.68) 100%
    );
    animation: crossPulsePlaying 5s ease-in-out infinite;
}

#holyCrossBtn.is-paused {
    opacity: 1;
    animation: crossPulse 4.5s ease-in-out infinite;
}

@keyframes crossPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(212, 168, 75, 0.5),
            0 12px 36px rgba(0, 0, 0, 0.55),
            0 0 36px rgba(212, 168, 75, 0.2);
    }
    50% {
        transform: scale(1.06);
        box-shadow:
            0 0 0 12px rgba(212, 168, 75, 0),
            0 14px 44px rgba(0, 0, 0, 0.55),
            0 0 64px rgba(232, 197, 106, 0.48);
    }
}

@keyframes crossPulsePlaying {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(212, 168, 75, 0.38),
            0 12px 36px rgba(0, 0, 0, 0.55),
            0 0 40px rgba(212, 168, 75, 0.25);
    }
    50% {
        transform: scale(1.04);
        box-shadow:
            0 0 0 10px rgba(212, 168, 75, 0),
            0 14px 42px rgba(0, 0, 0, 0.55),
            0 0 72px rgba(232, 197, 106, 0.42);
    }
}

@keyframes crossIconPulse {
    0%, 100% {
        opacity: 0.92;
        filter: drop-shadow(0 0 8px rgba(255, 210, 100, 0.35));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 16px rgba(255, 230, 150, 0.75));
    }
}

.audio-status {
    position: fixed;
    left: 50%;
    bottom: calc(2.5rem + 5.5rem);
    transform: translateX(-50%);
    z-index: 16;
    max-width: min(90vw, 420px);
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: rgba(230, 220, 190, 0.55);
    pointer-events: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

#kjvAudio {
    display: none !important;
}

@media (max-width: 600px) {
    .audio-status {
        bottom: calc(2.75rem + 5.75rem);
        font-size: 0.7rem;
    }
    #holyCrossBtn {
        width: 104px;
        height: 104px;
    }
}

/* Desktop: sit slightly lower over the artwork */
@media (min-width: 769px) {
    .audio-controls {
        transform: translateY(11vh);
    }
}

@media (prefers-reduced-motion: reduce) {
    #holyCrossBtn,
    #holyCrossBtn.is-playing,
    #holyCrossBtn.is-paused,
    #holyCrossBtn .cross-icon {
        animation: none !important;
    }
}
