
/* Reset theme constraints */
.ast-container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-content .ast-container {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Main container */
.interactive-rosary-app {
    width: 100% !important;
    height: 100vh !important;
    position: relative !important;
    background: #f8f8ff !important;
    overflow: hidden !important;
}

/* Content container */
.rosary-container {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    display: flex !important;
    justify-content: flex-end !important; /* To match Divine Mercy positioning */
    align-items: center !important;
}

/* Mystery Selection */
.mystery-selector {
    position: absolute !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 12px 24px !important;
    border: 2px solid #4b4bc3 !important;
    border-radius: 25px !important;
    background: white !important;
    color: #1e1e76 !important;
    font-size: 16px !important;
    z-index: 1000 !important;
    cursor: pointer !important;
    min-width: 200px !important;
    text-align: center !important;
}

/* Rosary Section */
.rosary-section {
    position: relative !important;
    width: 50% !important;
    height: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-right: 10% !important; /* Match Divine Mercy spacing */
}

.interactive-rosary-app svg {
    transform: scale(0.65) !important; /* Exact scale from Divine Mercy */
}

/* Title */
#current-mystery {
    position: absolute !important;
    top: 80px !important; /* Below mystery selector */
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 28px !important;
    font-weight: bold !important;
    color: #1e1e76 !important;
    z-index: 1000 !important;
    text-align: center !important;
    background: white !important;
    padding: 8px 20px !important;
    border-radius: 15px !important;
    box-shadow: 0 2px 4px rgba(30, 30, 118, 0.1) !important;
}

/* Prayer Box - Desktop */
.prayer-section {
    position: absolute !important;
    left: 5% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 500px !important; /* Exact width from Divine Mercy */
    background: rgba(248, 248, 255, 0.95) !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 12px rgba(30, 30, 118, 0.2) !important;
    z-index: 10 !important;
}

.prayer-text-container {
    padding: 20px !important;
    margin: 10px !important;
    background: white !important;
    border-radius: 12px !important;
    min-height: 300px !important;
    max-height: 450px !important;
    overflow-y: auto !important;
    border: none !important; /* Remove border to match Divine Mercy */
}

#current-prayer {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #1e1e76 !important;
    padding: 10px !important;
    opacity: 1 !important;
}

#current-prayer.prayer-updated {
    animation: prayer-update 0.16s ease-out !important;
}

@keyframes prayer-update {
    from { opacity: 0.55; transform: translateY(1px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Prayer navigation buttons */
.pray-button,
.back-button {
    position: absolute !important;
    bottom: 15% !important;
    padding: 12px 36px !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    min-height: 48px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: rgba(112, 127, 245, 0.25) !important;
    z-index: 20 !important;
    box-shadow: 0 4px 8px rgba(75, 75, 195, 0.3) !important;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, opacity 0.16s ease !important;
}

.pray-button {
    right: calc(50% + 50px) !important;
    background: #4b4bc3 !important;
    color: white !important;
}

.back-button {
    right: calc(50% + 180px) !important;
    background: white !important;
    color: #1e1e76 !important;
    border: 2px solid #4b4bc3 !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.pray-button:hover,
.back-button:hover:not(:disabled) {
    background: #707ff5 !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.pray-button:active,
.pray-button.is-processing,
.back-button:active,
.back-button.is-processing {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 5px rgba(75, 75, 195, 0.35) !important;
}

.pray-button:disabled,
.back-button:disabled {
    opacity: 0.84 !important;
    cursor: wait !important;
}

.back-button:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

.pray-button:focus-visible,
.back-button:focus-visible {
    outline: 3px solid #a195f9 !important;
    outline-offset: 3px !important;
}

/* Start Message */
.start-message {
    position: absolute !important;
    bottom: calc(15% + 60px) !important; /* Position above pray button */
    right: calc(50% + 50px) !important; /* Align with pray button */
    background: white !important;
    padding: 10px 20px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    z-index: 20 !important;
    box-shadow: 0 2px 4px rgba(30, 30, 118, 0.1) !important;
    color: #1e1e76 !important;
    white-space: nowrap !important;
}

/* Highlight Circle */
.highlight-circle {
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 3px solid #707ff5 !important;
    background: rgba(112, 127, 245, 0.15) !important;
    pointer-events: none !important;
    z-index: 15 !important;
    box-shadow: 0 0 15px rgba(161, 149, 249, 0.6) !important;
    animation: pulse 2s infinite !important;
    transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1), top 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes pulse {
    0% { box-shadow: 0 0 15px rgba(161, 149, 249, 0.6) !important; }
    50% { box-shadow: 0 0 20px rgba(161, 149, 249, 0.8) !important; }
    100% { box-shadow: 0 0 15px rgba(161, 149, 249, 0.6) !important; }
}

/* Completion Message */
.completion-container {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    padding: 30px !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 12px rgba(30, 30, 118, 0.2) !important;
    text-align: center !important;
    max-width: 400px !important;
    z-index: 1000 !important;
}

.completion-message {
    color: #1e1e76 !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
}

.completion-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
}

.completion-button {
    padding: 12px 24px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.pray-again-button {
    background: #4b4bc3 !important;
    color: white !important;
}

.donate-button {
    background: #707ff5 !important;
    color: white !important;
}

.completion-back-button {
    background: white !important;
    color: #1e1e76 !important;
    border: 2px solid #4b4bc3 !important;
}

.completion-button:hover {
    transform: translateY(-2px) !important;
    opacity: 0.9 !important;
}

/* Mobile Styles */
@media (max-width: 767px) {
    .rosary-section {
        position: relative !important;
        width: 100% !important;
        margin-top: 60px !important;
        margin-right: 0 !important;
    }

    .interactive-rosary-app svg {
        transform: scale(1.3) !important;
        position: absolute !important;
        left: 65% !important; /* Exact position from Divine Mercy */
        top: 100px !important;
    }

    .rosary-container {
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding-top: 60px !important;
        overflow: visible !important;
    }

    .mystery-selector {
        top: 10px !important;
        width: 80% !important;
        max-width: 300px !important;
    }

    #current-mystery {
        font-size: 22px !important;
        top: 70px !important; /* Moved down to create space */
        white-space: nowrap !important;
    }

    .prayer-section {
        width: 160px !important; /* Exact width from Divine Mercy */
        left: 10px !important;
        right: auto !important;
        transform: translateY(-50%) !important;
    }

    .prayer-text-container {
        min-height: 200px !important;
        max-height: 300px !important;
        padding: 10px !important; /* Match Divine Mercy padding */
        margin: 0 !important; /* Remove margin to match Divine Mercy */
    }

    .pray-button,
    .back-button {
        position: absolute !important;
        bottom: auto !important;
        top: 85% !important;
        left: auto !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .pray-button {
        right: 20% !important;
    }

    .back-button {
        right: calc(20% + 118px) !important;
    }

    .start-message {
        position: absolute !important;
        bottom: auto !important;
        top: 75% !important;
        right: 20% !important;
        left: auto !important;
    }
}

/* Landscape Mode */
@media (max-width: 900px) and (orientation: landscape) {
    #current-mystery {
        font-size: 20px !important;
        top: 5px !important;
    }

    .mystery-selector {
        top: 10px !important;
        left: 20px !important; /* Moved to the left */
        transform: none !important; /* Remove center transform */
        width: auto !important;
        min-width: 200px !important;
    }

    .rosary-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 40px 20px 20px 20px !important;
        height: calc(100vh - 40px) !important;
        overflow: visible !important;
    }

    .interactive-rosary-app svg {
        transform: scale(1.0) !important;
        position: absolute !important;
        left: 150% !important; /* Match Divine Mercy positioning */
        top: 0 !important;
    }

    .rosary-section {
        width: 50% !important;
        height: 100% !important;
        position: relative !important;
        margin-top: 0 !important;
        overflow: visible !important;
    }

    .prayer-section {
        width: 50% !important;
        height: auto !important;
        position: absolute !important;
        left: 20px !important;
        top: 55% !important;
        transform: translateY(-50%) !important;
        margin-top: 0 !important;
    }
    .prayer-text-container {
        min-height: 270px !important;
        max-height: 340px !important;
    }
    .pray-button {
        position: fixed !important;
        bottom: 20px !important;
        left: auto !important;
        right: 5% !important;
        transform: none !important;
        padding: 8px 20px !important;
        font-size: 14px !important;
        z-index: 1000 !important;
        width: auto !important;
        margin-right: 20px !important;
    }
    .start-message {
        position: fixed !important;
        bottom: 70px !important;
        left: auto !important;
        right: 22% !important;
        transform: none !important;
        font-size: 12px !important;
        z-index: 1000 !important;
        width: auto !important;
        white-space: nowrap !important;
        padding: 8px 16px !important;
        margin-right: 20px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #current-prayer.prayer-updated,
    .highlight-circle {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
