/* Styles for the rosary prayer page */
.rosary-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    height: 100%;
}

.fullscreen-prayer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    margin-bottom: 1rem;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1010;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.prayer-container {
    background-color: white;
    width: 100%;
    height: 100%;
    padding: 2rem 1rem;
    padding-top: 45px; /* Increased top padding to account for the progress bar and mystery indicator */
    margin: 0;
    margin-bottom: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center regular text vertically */
    align-items: center;
    text-align: center;
    flex: 1;
    overflow-y: auto;
    transition: all 0.3s ease;
    max-height: calc(100vh - 98px); /* Account for nav controls and progress bar */
}

/* Special styles for litanies to allow scrolling while maintaining vertical space */
.prayer-container[data-prayer-type="litanies"] {
    justify-content: flex-start;
    padding-top: 60px; /* Extra padding for litanies */
    overflow-y: auto;
}

.prayer-title {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    padding-top: 20px;
}

.prayer-text {
    font-size: 1.4rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.timer-display {
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mysteries-container {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 2rem 1rem;
    margin-bottom: 90px;
    overflow-y: auto;
}

.mystery-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.mystery-description {
    font-size: 1.4rem;
    line-height: 1.8;
    max-width: 800px;
}

.navigation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem;
    background-color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1010;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-btn {
    background-color: var(--light-color);
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bead-indicator {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: var(--border-radius);
}

.mystery-indicator {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1020;
    background-color: var(--light-color);
    padding: 0.7rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.exit-fullscreen {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    z-index: 1020;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: none;
}

.exit-fullscreen:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* Compact mode styles */
.compact-mode .prayer-text {
    display: none;
}

/* Exception for litanies - always show them even in compact mode */
.compact-mode[data-prayer-type="litanies"] .prayer-text {
    display: block;
}

.compact-mode .prayer-title {
    font-size: 3rem;
    margin: 2rem 0;
}

/* Joyful Mysteries Theme */
.joyful-theme {
    --mystery-color: var(--joyful-color);
}

/* Sorrowful Mysteries Theme */
.sorrowful-theme {
    --mystery-color: var(--sorrowful-color);
}

/* Glorious Mysteries Theme */
.glorious-theme {
    --mystery-color: var(--glorious-color);
}

/* Luminous Mysteries Theme */
.luminous-theme {
    --mystery-color: var(--luminous-color);
}

/* Mystery title color based on theme */
.prayer-container.joyful-theme .prayer-title,
.mysteries-container.joyful-theme .mystery-title {
    color: var(--joyful-color);
}

.prayer-container.sorrowful-theme .prayer-title,
.mysteries-container.sorrowful-theme .mystery-title {
    color: var(--sorrowful-color);
}

.prayer-container.glorious-theme .prayer-title,
.mysteries-container.glorious-theme .mystery-title {
    color: var(--glorious-color);
}

.prayer-container.luminous-theme .prayer-title,
.mysteries-container.luminous-theme .mystery-title {
    color: var(--luminous-color);
}

/* New styles for after-mystery prayer */
.prayer-text p {
    margin-bottom: 1rem;
}

/* Litany specific styles */
.litany-verse-response {
    text-align: left;
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    padding-bottom: 20px; /* Add bottom padding for better spacing */
}

.litany-verse-response .verse {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.litany-verse-response .response {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
    margin-left: 1rem;
}

.litany-group {
    margin: 1.5rem 0;
    padding-left: 1rem;
}

.litany-group p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.litany-group p:before {
    content: "• ";
    color: var(--primary-color);
}

/* Special Ave Maria styling */
.prayer-container [class*="hail_mary_special"] .prayer-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Special styles for litanies page */
.prayer-container[data-prayer-type="litanies"] {
    padding-top: 60px; /* Extra padding for litanies */
    overflow-y: auto;
}

/* Responsive design for rosary page */
@media (max-width: 768px) {
    .prayer-container {
        padding: 1.5rem 1rem;
        padding-top: 45px; /* Keep more space at top for mobile */
    }
    
    .prayer-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .prayer-text {
        font-size: 1.2rem;
        line-height: 1.6;
    }
    
    .mystery-title {
        font-size: 1.6rem;
    }
    
    .mystery-description {
        font-size: 1.2rem;
    }
    
    .compact-mode .prayer-title {
        font-size: 2.2rem;
    }
    
    .nav-btn {
        padding: 0.7rem;
        margin-top: 1.5rem;
    }
    
    .litany-verse-response {
        font-size: 1.1rem;
    }
    
    .litany-group {
        padding-left: 0.5rem;
    }
}

@media (max-width: 480px) {
    .prayer-container {
        padding: 1rem 0.8rem;
        padding-top: 45px; /* Consistent top padding */
    }
    
    .prayer-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
        padding-top: 30px;
    }
    
    .prayer-text {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .navigation-controls {
        padding: 0.8rem;
    }
    
    .nav-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .bead-indicator {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .mystery-indicator {
        font-size: 0.7rem;
    }
    
    .timer-display {
        font-size: 1rem;
        padding: 0.7rem;
        margin-top: 1.5rem;
    }
}