/**
 * prayer-styles.css
 * Shared Stylesheet for all Daily Prayer files
 * Version: 2.1.6
 * Date: November 2025
 */

/* ============================================
   Base Styles
   ============================================ */
body {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: #f8f9fa;
    color: #333333;
    margin: 0;
    padding: 0;
}

/* ============================================
   Header Styles
   ============================================ */
.app-header {
    background: #ffffff;
    border-bottom: 4px solid #8B0000;
    padding: 1rem 0 0.5rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
}

.header-logo {
    height: auto;
    max-height: 5.5rem;
    width: auto;
    display: block;
    margin-left: 0;
    margin-top: 1rem;
}

.header-center {
    text-align: center;
    grid-column: 2;
}

.header-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2rem;
    color: #8B0000;
    margin: 0;
    font-weight: 600;
}

.header-date {
    font-size: 1.4rem;
    color: #666666;
    margin-top: 0.25rem;
}

.header-proper {
    font-size: 0.85rem;
    color: #4a7c59;
    margin-top: 0.25rem;
    font-style: italic;
}

/* ============================================
   Date Navigation
   ============================================ */
.date-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-date-button {
    padding: 0.375rem 0.875rem;
    background: #f9f9f9;
    color: #4a7c59;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
    font-family: 'Open Sans', sans-serif;
}

.nav-date-button:hover {
    background: #4a7c59;
    color: white;
    border-color: #4a7c59;
}

.current-date {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    min-width: 200px;
    text-align: center;
}

/* ============================================
   Navigation Menu
   ============================================ */
.nav-menu {
    background-color: #333333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
}

.nav-item {
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.nav-item:hover {
    background-color: #444444;
    border-bottom-color: #7f170e;
    color: #fcb222;
}

.nav-item.active {
    background-color: #444444;
    border-bottom-color: #7f170e;
}

/* ============================================
   Content Area
   ============================================ */
.content-wrapper {
    max-width: 936px;
    margin: 0 auto;
    padding: 1rem 20px 20px 20px;
}

.prayer-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem 2rem 2rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.prayer-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.prayer-content h2 {
    color: #8B0000;
    text-align: center;
    margin: 2rem 0;
}

.prayer-content h3 {
    color: #4a7c59;
    font-size: 1.25rem;
    margin: 2rem 0 1rem;

}

.prayer-content h4 {
    font-style: italic;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
}
/* ============================================
   Tooltips
   ============================================ */
.tool-tip {
    position: relative;
    display: inline-block;
}

.tool-tip span:first-child {
    display: inline-block;
    color: #fff;
    background: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    cursor: help;
}

.tool-tip .tool-tiptext {
    visibility: hidden;
    width: max-content;
    max-width: 30vw;
    background: linear-gradient(90deg, #864141, #412020);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    top: -5px;
    left: 110%;
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-tip .tool-tiptext::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #0000ff transparent transparent;
}

.tool-tip:hover .tool-tiptext {
    visibility: visible;
    opacity: 1;
}

/* Dark mode tooltip adjustments */
.dark-mode .tool-tip span:first-child {
    background: #444;
    color: #fff;
}

.dark-mode .tool-tip .tool-tiptext {
    background: linear-gradient(90deg, #4a7c59, #2a5a3a);
}

.dark-mode .tool-tip .tool-tiptext::after {
    border-color: transparent #2a5a3a transparent transparent;
}

/* Mobile adjustments for tooltips */
@media (max-width: 768px) {
    .tool-tip .tool-tiptext {
        left: 50%;
        transform: translateX(-50%);
        top: 100%;
        margin-top: 5px;
        max-width: 80vw;
    }
    
    .tool-tip .tool-tiptext::after {
        top: -5px;
        left: 50%;
        margin-left: -5px;
        border-color: transparent transparent #0000ff transparent;
    }
}

/* ============================================
   Control Panel
   ============================================ */
.control-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 150px;
}

.control-button {
    padding: 0.5rem 0.75rem;
    background: white;
    color: #333;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-button:hover {
    background: #4a7c59;
    color: white;
    border-color: #4a7c59;
}

.bible-selector {
    padding: 0.375rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'Open Sans', sans-serif;
    background: white;
    cursor: pointer;
}

/* ============================================
   Font Size Control
   ============================================ */
.font-size-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f9f9f9;
    border-radius: 6px;
}

.font-size-slider {
    width: 100px;
    height: 4px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    border-radius: 2px;
    cursor: pointer;
}

.font-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #4a7c59;
    cursor: pointer;
    border-radius: 50%;
}

.font-size-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #4a7c59;
    cursor: pointer;
    border-radius: 50%;
}

/* ============================================
   Hide Elements from get_verse.php
   ============================================ */
.story.reading-header[style*="linear-gradient"],
div[style*="linear-gradient"] {
    background: transparent !important;
    background-image: none !important;
}

.prayer-content .reading-header,
.prayer-content .story.reading-header {
    display: none !important;
}

.prayer-content .ld-toggle-cont,
.prayer-content button[onclick*="playPauseAudio"],
.prayer-content button[onclick*="readWebpage"],
.prayer-content a[href*="biblever=NIV"],
.prayer-content button#bibver,
.prayer-content .listen-btn,
.prayer-content a#player {
    display: none !important;
}

.prayer-content table,
.prayer-content tr,
.prayer-content td {
    display: block !important;
    width: 100% !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.prayer-content > br:first-child,
.prayer-content > p:first-child:empty,
.prayer-content > div:first-child:empty {
    display: none !important;
}

.prayer-content .story:first-of-type {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ============================================
   Utility Classes
   ============================================ */
.reading-title {
    margin-top: -3em;
}

/* ============================================
   Footer
   ============================================ */
.footer-links {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.footer-link {
    color: #666;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.875rem;
    font-family: 'Open Sans', sans-serif;
}

.footer-link:hover {
    color: #4a7c59;
}

/* ============================================
   Dark Mode
   ============================================ */
body.dark-mode {
    background: #1a1a1a;
    color: #e5e5e5;
}

.dark-mode .app-header {
    background: #2a2a2a;
}

.dark-mode .prayer-card,
.dark-mode .control-panel {
    background: #2a2a2a;
    color: #e5e5e5;
}

.dark-mode .prayer-content {
    color: #e5e5e5;
}

.dark-mode .nav-date-button,
.dark-mode .control-button,
.dark-mode .bible-selector {
    background: #333;
    color: #e5e5e5;
    border-color: #444;
}

.dark-mode .nav-date-button:hover,
.dark-mode .control-button:hover {
    background: #4a7c59;
    color: white;
}

/* ============================================
   Page-Specific Styles
   ============================================ */
/* Noon Prayer Specific */
.psalm-verse {
    margin: 0.5rem 0;
    padding-left: 3rem;
     position: relative;
}

.verse-number {
    color: #909090;
    font-size: 0.4rem;
    font-weight: 200;
    display: inline-block;
    width: 2.5rem;
    margin-left: -3rem;
    text-align: right;  /* Right-align the numbers */
    position: absolute;
    left: 3rem;  /* Position it correctly */

}

.dark-mode .verse-number {
    color: #909090;
}

/* FAQ Sections */
.faq-section {
    margin-top: 3rem;
    text-align: center;
}

.faq-container {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dark-mode .faq-item {
    background: #2a2a2a;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 0;
}

.faq-item p {
    margin-top: 1rem;
    color: #6b7280;
    line-height: 1.6;
}

.dark-mode .faq-item p {
    color: #9ca3af;
}

/* Prayer Button */
.prayer-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(#a8e063, #56ab2f);
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.875rem;
    margin: 1rem auto;
    transition: all 0.2s;
    cursor: pointer;
}

.prayer-button:hover {
    background: linear-gradient(#56ab2f, #a8e063);
    transform: translateY(-2px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-logo {
        height: auto;
        max-height: 3rem;
        width: auto;
        display: block;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .nav-content {
        flex-wrap: wrap;
    }

    .date-navigation {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .control-panel {
        bottom: 10px;
        right: 10px;
        left: 10px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* Remove extra spacing before scripture headings */
h3[id^="psalm"],
h3[id^="matthew"],
h3[id^="revelation"],
h3[id*="maccabees"] {
    margin-top: 0 !important;
    padding-top: 10px !important; /* Adjust this value as needed */
}

Remove the multiple <br> tags before headings 
h3[id^="psalm"] + br,
h3[id^="matthew"] + br,
h3[id^="revelation"] + br,
h3[id*="maccabees"] + br,
br + br + h3[id^="psalm"],
br + br + h3[id^="matthew"],
br + br + h3[id^="revelation"],
br + br + h3[id*="maccabees"] {
    display: none;
}

/* Target the center elements containing the headings */
center:has(> h3[id^="psalm"]),
center:has(> h3[id^="matthew"]),
center:has(> h3[id^="revelation"]),
center:has(> h3[id*="maccabees"]) {
    margin-top: 0;
    padding-top: 15px; /* Adjust spacing as needed */
}

/* Remove excessive line breaks before scripture sections */
center > h3 {
    margin-top: 15px !important; /* Consistent top margin */
    margin-bottom: 10px !important;
}

/* Limit the height impact of multiple brs 
br + br {
    line-height: 0;
    height: 0;
}
br + br + br {
    display: none;
}
*/

/* Specific targeting for the scripture reading sections */
.story.theme-content br + br + center {
    margin-top: 0;
}

/* If the above doesn't work due to browser compatibility, use this alternative */
.story.theme-content center {
    margin-top: 20px; /* Reduced from whatever it was before */
}

.story.theme-content center:first-of-type {
    margin-top: 10px; /* Even less space for the first one */
}
/* Floating Control Panel Styles */
.control-panel-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: move;
}

.control-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 12px 12px 0 0;
    cursor: move;
    user-select: none;
}

.control-panel-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.control-panel-minimize {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.control-panel-minimize:hover {
    color: #333;
}

.control-panel-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.control-panel-content.collapsed {
    max-height: 0;
    padding: 0 16px;
    overflow: hidden;
}

/* Minimized state */
.control-panel-container.minimized {
    width: auto;
}

.control-panel-container.minimized .control-panel-content {
    display: none;
}

.control-panel-container.minimized .control-panel-header {
    border-radius: 12px;
}

/* Toggle button (shown when panel is minimized) */
.control-panel-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
   background: linear-gradient(135deg, rgba(82, 43, 43, 0.6), rgba(61, 32, 32, 0.6));
    color: white;
    box-shadow: 0 4px 15px rgba(82, 43, 43, 0.4);   border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    display: none;
}

.control-panel-toggle:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(82, 43, 43, 1), rgba(61, 32, 32, 1));
    box-shadow: 0 6px 20px rgba(82, 43, 43, 0.5);
}

.control-panel-toggle.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Control panel elements styling */
.control-panel-container .bible-selector {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.control-panel-container .control-button {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.control-panel-container .control-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

.control-panel-container .font-size-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.control-panel-container .font-size-slider {
    flex: 1;
}

/* Dark mode adjustments */
body.dark-mode .control-panel-container {
    background: #2a2a2a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .control-panel-header {
    background: #333;
}

body.dark-mode .control-panel-title {
    color: #fff;
}

body.dark-mode .control-panel-minimize {
    color: #ccc;
}

body.dark-mode .control-panel-minimize:hover {
    color: #fff;
}

body.dark-mode .control-panel-container .bible-selector,
body.dark-mode .control-panel-container .control-button {
    background: #3a3a3a;
    color: #fff;
    border-color: #555;
}

body.dark-mode .control-panel-container .control-button:hover {
    background: #4a4a4a;
}

body.dark-mode .control-panel-container .font-size-control {
    background: #3a3a3a;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .control-panel-container {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}
