/* Bible Widget UI */
#bible-widget-btn {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    bottom: 30px;
    left: 30px;
    right: auto;
    width: 70px;
    height: 70px;
    background: transparent;
    border-radius: 50%;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, opacity 0.3s ease;
    border: none;
}

#bible-widget-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

#bible-widget-btn svg {
    width: 35px;
    height: 35px;
    fill: #1c1917;
}

/* Bible Widget Modal */
#bible-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 6, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(10px);
}

#bible-modal.active {
    opacity: 1;
    pointer-events: auto;
}







/* Initial Input State */
#bible-input-container {
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#bible-input-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    position: absolute;
}

#bible-input-title {
    font-family: 'Phudu', sans-serif;
    color: #4a2a18;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

#bible-input-desc {
    font-family: 'Instrument Sans', sans-serif;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.bible-input-box {
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e6c888;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: 'Phudu', sans-serif;
    width: 150px;
    text-align: center;
    outline: none;
    transition: background 0.3s;
}
.bible-input-box:focus {
    background: rgba(255,255,255,0.2);
}

.bible-action-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 400;
    border-radius: 12px;
    border: none;
    background: #e6c888;
    color: #1c1917;
    cursor: pointer;
    margin: 0 0.5rem;
    text-transform: uppercase;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, opacity 0.3s ease;
}
.bible-action-btn:hover {
    transform: translateY(-3px);
    background: #fff;
}

/* 3D Flipping Animation */
#bible-flip-container {
    position: absolute;
    width: 300px;
    height: 400px;
    perspective: 1000px;
    display: none;
    cursor: pointer;
}

#bible-flip-container.active {
    display: block;
}

.bible-book {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}







@keyframes fast-flip {
    0% { transform: rotateY(0deg); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: rotateY(-180deg); opacity: 0; }
}

#bible-flip-hint {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    text-align: left;
    color: #ffffff;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
    animation: pulse 2s infinite;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Final Reveal State */
#bible-reveal-container {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: absolute;
    max-width: 800px;
    width: 90%;
    padding: 4rem;
    background: url('https://www.transparenttextures.com/patterns/old-wall.png'), #f4e4c1;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 50px rgba(139, 90, 43, 0.2);
    border: 8px solid #4a2a18;
    border-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30"><rect x="2" y="2" width="26" height="26" fill="none" stroke="%238b5a2b" stroke-width="2"/><circle cx="5" cy="5" r="2" fill="%238b5a2b"/><circle cx="25" cy="5" r="2" fill="%238b5a2b"/><circle cx="5" cy="25" r="2" fill="%238b5a2b"/><circle cx="25" cy="25" r="2" fill="%238b5a2b"/></svg>') 10 stretch;
    text-align: center;
}

#bible-reveal-container.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    position: relative;
}

.bible-quote-text {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    color: #4a2a18;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
    text-shadow: 0 0 10px rgba(230, 200, 136, 0.8);
}

.bible-quote-text::before, .bible-quote-text::after {
    content: '"';
    font-size: 4rem;
    color: #c8102e;
    opacity: 0.3;
    position: absolute;
}
.bible-quote-text::before { top: -20px; left: -30px; }
.bible-quote-text::after { bottom: -40px; right: -20px; }

.bible-quote-ref {
    font-family: 'Phudu', sans-serif;
    font-size: 1.5rem;
    color: #c8102e;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    #bible-reveal-container { padding: 2rem; }
    .bible-quote-text { font-size: 1.5rem; }
    .bible-quote-ref { font-size: 1.2rem; }
}

.bible-tooltip-container {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: -15px;
    pointer-events: none;
    animation: tooltip-bounce 2s infinite ease-in-out;
    z-index: -1;
}

.bible-tooltip-arrow {
    width: 40px;
    height: auto;
    transform: rotate(90deg); 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}



@keyframes tooltip-bounce {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(10px); }
}

#bible-modal-close {
    position: absolute !important;
    top: 40px !important;
    right: 40px !important;
    left: auto !important;
    width: 60px !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 3rem !important;
    cursor: pointer !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

#bible-modal-close:hover {
    transform: rotate(90deg) scale(1.1) !important;
    background: #e6c888 !important;
    color: #4a2a18 !important;
    border-color: #e6c888 !important;
}
.bible-page-anim {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fdf5e6;
    border-radius: 2px 10px 10px 2px;
    box-shadow: inset 10px 0 20px rgba(0,0,0,0.1), 2px 2px 5px rgba(0,0,0,0.3);
    transform-origin: left center;
    border-left: 5px solid #2a1610; /* Dark leather spine */
    border-right: 3px solid #d4af37; /* Gold leaf edge */
    border-top: 1px solid #d4af37;
    border-bottom: 1px solid #d4af37;
    animation: fast-flip 0.6s linear infinite;
    
    /* Simulate two columns of text */
    background-image: 
        repeating-linear-gradient(to bottom, transparent, transparent 5px, rgba(74, 42, 24, 0.2) 5px, rgba(74, 42, 24, 0.2) 7px),
        repeating-linear-gradient(to bottom, transparent, transparent 5px, rgba(74, 42, 24, 0.2) 5px, rgba(74, 42, 24, 0.2) 7px);
    background-size: 40% 85%, 40% 85%;
    background-position: 8% 8%, 92% 8%;
    background-repeat: no-repeat;
}

.bible-page-anim::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 45%;
    width: 10%;
    height: 90%;
    background: transparent;
    border-left: 1px solid rgba(200, 16, 46, 0.2); /* Red subtle line down center */
}

.bible-page-anim:nth-child(2) { animation-delay: 0.1s; }
.bible-page-anim:nth-child(3) { animation-delay: 0.2s; }
.bible-page-anim:nth-child(4) { animation-delay: 0.3s; }
.bible-page-anim:nth-child(5) { animation-delay: 0.4s; }
.bible-page-anim:nth-child(6) { animation-delay: 0.5s; }

@media (max-width: 768px) {
    #bible-flip-container {
        width: 220px;
        height: 300px;
    }
    
    #bible-flip-hint {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    text-align: left;
    color: #ffffff;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
    animation: pulse 2s infinite;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

    #bible-reveal-container {
        width: 95%;
        padding: 2rem 1.5rem;
    }

    .bible-quote-text {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .bible-quote-ref {
        font-size: 1.1rem;
    }

    .bible-quote-text::before { top: -10px; left: -15px; font-size: 3rem; }
    .bible-quote-text::after { bottom: -25px; right: -10px; font-size: 3rem; }
    
    #bible-modal-close {
        top: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 2rem !important;
    }
    
    #bible-input-container {
        width: 90%;
    }
    
    .bible-input-box {
        width: 100px;
        padding: 0.8rem 1rem;
        font-size: 1.2rem;
    }
    
    .bible-action-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
}

#bible-widget-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.bible-tooltip-text {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #e6c888;
    background: transparent;
    padding: 16px 24px;
    border-radius: 0;
    box-shadow: none;
    white-space: nowrap;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.6);
    letter-spacing: 0.05em;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.bible-tooltip-text::before {
    content: "◈";
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: #e6c888;
    font-size: 0.8rem;
    margin-bottom: 12px;
    background-image: linear-gradient(to right, transparent, #e6c888 20%, #e6c888 40%, transparent 45%, transparent 55%, #e6c888 60%, #e6c888 80%, transparent);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: center;
    text-shadow: none;
}

.bible-tooltip-text::after {
    content: "⬩\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0⬩";
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: #e6c888;
    font-size: 0.5rem;
    margin-top: 12px;
    background-image: linear-gradient(to right, transparent, #e6c888 10%, #e6c888 90%, transparent);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: center;
    text-shadow: none;
    letter-spacing: 0;
}

.bible-shining-particle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 300%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(230, 200, 136, 0.4) 0%, rgba(230, 200, 136, 0) 60%);
    pointer-events: none;
    z-index: -1;
    animation: shine-pulse 3s infinite alternate;
    filter: blur(10px);
}

@keyframes shine-pulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

/* Light Background Adaptations */
#bible-widget-btn.on-light-bg .bible-tooltip-text {
    color: #1c1917 !important;
    text-shadow: none !important;
}
#bible-widget-btn.on-light-bg .bible-shining-particle {
    display: none !important;
}



/* Right Side Prayer Widget & Global Bottom Bar Layout */
#bottom-widgets-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid rgba(230, 200, 136, 0.3);
}

#bottom-widgets-container.visible {
    transform: translateY(0);
}

#bible-widget-btn {
    position: static !important;
    flex: 1;
    width: auto;
    height: 100%;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1 !important;
    pointer-events: auto !important;
    border-right: 1px solid rgba(230, 200, 136, 0.3);
    cursor: pointer;
}

#prayer-widget-btn {
    position: static !important;
    width: 70px;
    height: 100%;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#prayer-widget-btn:hover {
    background: rgba(230, 200, 136, 0.2);
}

.bible-tooltip-container {
    position: static !important;
    transform: none !important;
    animation: none !important;
    margin-left: 10px;
    opacity: 1 !important;
    display: flex;
}

.bible-tooltip-text {
    font-size: 1.15rem !important;
    padding: 0 !important;
    color: #1c1917 !important;
    text-shadow: none !important;
    flex-direction: column;
}

.bible-tooltip-text::before { margin-bottom: 4px; }
.bible-tooltip-text::after { margin-top: 4px; }

.bible-shining-particle {
    display: none !important;
}

/* Chat Menu Styles */
#prayer-chat-menu {
    position: absolute;
    bottom: 80px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#prayer-chat-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.whatsapp-icon { background-color: #25D366; }
.email-icon { background-color: #D44638; }
