/* assets/css/feed.css - the styles Home, Video Feed and My Feed share (2026-11-16, base fix stage 4).
 * Each of the three pages carried its own copy of these rules. Each page loads this file first, then its own
 * (home.css, video-feed.css, my-feed.css), which keeps only what is truly its own. */

/* assets/css/home.css - the styles that used to be written inside index.php (moved 2026-11-15, unchanged). */

/* ---- index.php, block from line 1258 ---- */
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        margin: 0;
        padding: 0;
        min-height: 100vh;
        overflow-x: hidden;
        scroll-behavior: smooth;
    }
    .app-container {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        min-height: 100vh;
        position: relative;
        padding-bottom: 80px;
    }
    .fixed-header {
        position: sticky;
        top: 0;
        background: linear-gradient(180deg, #3498db, #2c3e50);
        color: white;
        padding: 12px 16px;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .fixed-header .user-info {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .fixed-header img.profile-pic, .fixed-header .placeholder-pic {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid #ffffff;
    }
    .fixed-header .placeholder-pic {
        background: linear-gradient(135deg, #bdc3c7, #7f8c8d);
    }
    .bottom-nav a:active {
        transform: scale(0.95);
    }
    .feed-container {
        padding: 10px;
    }
        /* The top nav WRAPS; it never scrolls. A horizontal scroller hides
           items while looking complete — Nick could see 3 of 13. Wrapping
           costs a second row on a narrow phone and hides nothing. */
        .top-nav {
            padding: 6px 4px;
            position: sticky;
            top: 60px;
            z-index: 900;
        }
        .nav-count {
            position: absolute;
            top: -2px;
            left: 50%;
            margin-left: 4px;          /* just off the icon's right edge */
            background: #c0392b;
            color: #fff;
            border-radius: 9px;
            min-width: 15px;
            height: 15px;
            padding: 0 4px;
            font-size: 0.58rem;
            line-height: 15px;
            font-weight: 700;
            text-align: center;
            box-shadow: 0 0 0 2px #fff;   /* lifts it off the icon */
        }
        /* ── Header menu ───────────────────────────────────────────────
           The avatar has always been decorative, so members have learned it
           does nothing. A bare avatar would stay unclicked: the ☰ next to it
           is the affordance. The glow teaches and then retires — a permanent
           animation becomes noise within a day and starts to look like a bug. */
        .hdr-menu-btn {
            background: none; border: none; color: #fff; font-size: 1.25em;
            padding: 6px 8px; cursor: pointer; border-radius: 9px;
        }
        .hdr-menu-btn:active { background: rgba(255,255,255,0.18); }
        .avatar-hint { position: relative; }
        .avatar-hint::after {
            content: ''; position: absolute; inset: -3px; border-radius: 50%;
            border: 2px solid #63b6f2; animation: avpulse 1.8s ease-out 3;
            pointer-events: none;
        }
        .hdr-sheet {
            display: none; position: fixed; inset: 0; z-index: 2000;
            background: rgba(20,30,40,0.5);
        }
        .hdr-sheet.on { display: block; }
        .hdr-sheet-inner {
            position: absolute; top: 58px; right: 8px; min-width: 216px;
            background: #fff; border-radius: 14px; overflow: hidden;
            box-shadow: 0 10px 34px rgba(0,0,0,0.28);
        }
        .hdr-sheet a {
            display: flex; align-items: center; gap: 11px;
            padding: 12px 15px; color: #2c3e50; text-decoration: none;
            font-size: 0.9em; border-bottom: 1px solid #f2f6f9;
        }
        .hdr-sheet a:last-child { border-bottom: none; }
        .hdr-sheet a:active { background: #eef4f9; }
        .hdr-sheet a i { color: #7b8b97; width: 17px; text-align: center; }
        .hdr-sheet a.danger { color: #c0392b; }
        .hdr-sheet a.danger i { color: #c0392b; }
        .hdr-sheet .count {
            margin-left: auto; background: #c0392b; color: #fff;
            border-radius: 9px; padding: 0 7px; font-size: 0.78em; font-weight: 700;
        }
    .top-nav::-webkit-scrollbar {
        height: 6px;
    }
    .top-nav::-webkit-scrollbar-track {
        background: #f4f7fa;
        border-radius: 8px;
    }
    .top-nav::-webkit-scrollbar-thumb {
        background: #3498db;
        border-radius: 8px;
    }
    
    /* Post styles */
    .post {
        margin-bottom: 16px;
        transition: transform 0.2s;
        position: relative;
    }
    /* .post:active { transform: scale(0.98) } REMOVED 2026-08-26.
     *
     * The whole card shrank 2% on any touch, anywhere on it. While posts
     * were short that read as a press response. Once "View all" could
     * expand a card to a screenful of reflection, the same 2% moved the
     * text under the reader's fingertip by a visible jump - Nick: "the
     * card bounces or shakes" - and it was worst at the exact moment
     * someone was trying to tap a link inside the text.
     *
     * post.php never had this rule, which is why the same post was
     * steady there and restless in the feed.
     *
     * Nothing replaces it: the card is not a button. Tapping the card
     * itself does nothing, so it should not answer a touch at all. The
     * controls inside it - buttons, links - keep their own feedback. */
    .post-header {
        display: flex;
        align-items: center;
    }
    .post-header img.profile-pic, .comment img.profile-pic {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 2px solid #3498db;
        margin-right: 12px;
        flex-shrink: 0;
    }
    .post-header .placeholder-pic, .comment .placeholder-pic {
        border-radius: 50%;
        background: linear-gradient(135deg, #bdc3c7, #7f8c8d);
        flex-shrink: 0;
    }
    .post-header .username {
        color: #2c3e50;
    }
    .post-header .username a:hover {
        color: #3498db !important;
        text-decoration: underline !important;
    }
    .post-header .profile-pic-link {
        text-decoration: none;
        display: inline-block;
        border-radius: 50%;
        transition: transform 0.2s ease, opacity 0.2s ease;
        cursor: pointer;
    }
    .post-header .profile-pic-link:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }
    .post-header .profile-pic-link:active {
        transform: scale(0.98);
    }
    .post-header .profile-pic-link img.profile-pic,
    .post-header .profile-pic-link .placeholder-pic {
        display: block;
        margin-right: 0;
    }
    .post-header .profile-pic-link {
        flex-shrink: 0;
    }
    .more-icon {
        position: absolute;
        top: 16px;
        right: 16px;
        color: #3498db;
        font-size: 1.2em;
        cursor: pointer;
    }
    .post-content h3 {
        color: #2c3e50;
    }
    .post-content p {
        color: #34495e;
        font-size: 1em;
        margin: 8px 0;
        line-height: 1.5;
        white-space: pre-wrap;
    }
    
    /* Enhanced text formatting for expanded content */
    .prayer-content {
        word-wrap: break-word;
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }
    
    .prayer-content p {
        margin: 0 0 1em 0;
        line-height: 1.6;
        color: #34495e;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    .prayer-content p:last-child {
        margin-bottom: 0;
    }
    
    /* Clean paragraph spacing */
    .prayer-content.expanded p {
        animation: fadeInParagraph 0.3s ease forwards;
    }
    
    /* Better link styling for admin posts */
    .prayer-content a {
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: border-color 0.2s;
    }
    
    .prayer-content a:hover {
        border-bottom-color: #3498db;
    }
    .post-content img {
        
        loading: lazy;
    }
  
  .prayer-content.preserve-formatting {
    white-space: pre-line;       /* Preserves line breaks and collapses multiple spaces */
    word-wrap: break-word;        /* Allows long words to break */
    font-family: inherit;         /* Use the same font as the rest */
}
.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}
.carousel-nav.prev {
    left: 10px;
}
.carousel-nav.next {
    right: 10px;
}
.single-image-container:hover {
    transform: scale(0.98);
}
.single-image-container img {
    height: auto;
}
/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 2em;
    cursor: pointer;
    z-index: 10001;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}
.lightbox-nav.prev {
    left: 20px;
}
.lightbox-nav.next {
    right: 20px;
}
    
    /* Video Container Styles */
    .video-container {
        position: relative;
        background: #000;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: 16 / 9;
    }
    .video-container.vertical {
        aspect-ratio: 9 / 16;
        max-height: 500px;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .video-container.square {
        aspect-ratio: 1 / 1;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .video-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    .video-container:active {
        transform: scale(0.98);
    }
    .video-container.loading {
        cursor: wait;
    }
    .video-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        transition: all 0.4s ease;
    }
    .video-container:hover .video-placeholder {
        background: linear-gradient(135deg, 
            rgba(44, 62, 80, 0.8) 0%, 
            rgba(52, 152, 219, 0.75) 50%,
            rgba(155, 89, 182, 0.8) 100%);
    }
    
.play-button {
        position: relative;
        width: 70px;
        height: 70px;
        background: linear-gradient(135deg, #ff6b6b, #ee5a24);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 
            0 4px 15px rgba(238, 90, 36, 0.4),
            inset 0 -2px 5px rgba(0, 0, 0, 0.2);
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 2;
    }
    .video-container:hover .play-button {
        transform: scale(1.1);
        background: linear-gradient(135deg, #ff7979, #ff6348);
        box-shadow: 
            0 6px 20px rgba(238, 90, 36, 0.6),
            inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    }
    .play-icon {
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 15px 0 15px 25px;
        border-color: transparent transparent transparent #ffffff;
        margin-left: 5px;
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
        transition: all 0.3s ease;
    }
    .video-container:hover .play-icon {
        border-width: 16px 0 16px 27px;
        filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    }
    .play-button::before {
        content: '';
        position: absolute;
        inset: -15px;
        background: radial-gradient(
            circle,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 70%
        );
        opacity: 0;
        transition: opacity 0.3s ease;
        animation: glowPulse 2s ease-in-out infinite;
    }
    .video-container:hover .play-button::before {
        opacity: 1;
    }
    .video-title-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 20px;
        background: linear-gradient(to top, 
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            transparent 100%
        );
        color: white;
        font-size: 0.9em;
        font-weight: 500;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        transition: transform 0.3s ease;
    }
    .video-container:hover .video-title-overlay {
        transform: translateY(-5px);
    }
    .video-container.playing .video-placeholder {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.5s ease;
    }
    .video-container .lazy-video {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        background: #000;
        opacity: 0;
        transition: opacity 0.5s ease;
        position: absolute;
        top: 0;
        left: 0;
    }
    .video-container.playing .lazy-video {
        opacity: 1;
    }
    .video-loading-spinner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 60px;
        height: 60px;
        display: none;
        z-index: 3;
    }
    .video-container.loading .video-loading-spinner {
        display: block;
    }
    .video-loading-spinner::after {
        content: '';
        display: block;
        width: 50px;
        height: 50px;
        margin: 5px;
        border-radius: 50%;
        border: 4px solid rgba(255, 255, 255, 0.3);
        border-top-color: #ffffff;
        animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    }
    
    /* Action Bar */
    .action-bar {
        align-items: center;
    }
    .action-btn {
        background: none;
        border: none;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        position: relative;
        font-family: inherit;
        outline: none;
    }
    .action-btn:hover:not(.disabled) {
        background: rgba(52, 152, 219, 0.08);
        color: #3498db;
    }
    .action-btn:active:not(.disabled) {
        transform: scale(0.95);
    }
    .action-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    .action-btn i {
        transition: all 0.3s ease;
    }
    .action-btn.like-button.liked {
        color: #e74c3c;
    }
    .action-btn.like-button.liked i {
        animation: heartBeat 0.8s;
    }
    .action-btn.like-button:hover i {
        transform: scale(1.1);
    }
    .action-btn.comment-btn:hover i {
        transform: rotateY(180deg);
    }
    .action-btn.share-button:hover i {
        transform: rotate(15deg);
    }
    .action-btn.edit-btn:hover {
        background: rgba(39, 174, 96, 0.08);
        color: #27ae60;
    }
    .action-btn.edit-btn:hover i {
        transform: rotate(-15deg);
    }
    .action-btn.delete-btn:hover {
        background: rgba(231, 76, 60, 0.08);
        color: #c0392b;
    }
    .action-btn.delete-btn:hover i {
        animation: shake 0.5s;
    }
    .action-btn::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) scale(0);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.75em;
        white-space: nowrap;
        pointer-events: none;
        transition: all 0.3s ease;
        margin-bottom: 4px;
        opacity: 0;
    }
    .action-btn:hover::after {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

@media (hover: none) {
            .action-btn:active:not(.disabled) {
                background: rgba(52, 152, 219, 0.15);
            }
}

    .action-bar .action-btn i {
        animation: slideIn 0.5s ease backwards;
    }
    .action-bar .action-btn:nth-child(1) i { animation-delay: 0.1s; }
    .action-bar .action-btn:nth-child(2) i { animation-delay: 0.2s; }
    .action-bar .action-btn:nth-child(3) i { animation-delay: 0.3s; }
    .action-bar .action-btn:nth-child(4) i { animation-delay: 0.4s; }
    .action-bar .action-btn:nth-child(5) i { animation-delay: 0.5s; }
    
    /* Comment Section */
        .inline-reply {
        display: inline-block; margin-top: 2px; padding: 4px 2px;
        font-size: 0.78em; font-weight: 600; color: #7b8b97;
        text-decoration: none;
    }
    .inline-reply:active { color: #3498db; }
    .comment-section {
        margin-top: 12px;
        border-top: 1px solid #bdc3c7;
        padding-top: 12px;
    }
    .comment {
        display: flex;
        align-items: flex-start;
        margin: 8px 0;
        padding: 12px;
        border-bottom: 1px solid #e0e0e0;
        background-color: #f9f9f9;
        border-radius: 8px;
        opacity: 0;
        animation: fadeIn 0.3s ease-in forwards;
        position: relative;
        transition: background-color 0.2s;
    }
    .comment:hover {
        background-color: #f1f3f5;
    }
    .comment img.profile-pic {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 2px solid #3498db;
        margin-right: 12px;
        object-fit: cover;
        flex-shrink: 0;
    }
    .comment .placeholder-pic {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #bdc3c7, #7f8c8d);
        margin-right: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-size: 0.9em;
        font-weight: 600;
        flex-shrink: 0;
    }
    .comment p {
        color: #2c3e50;
        font-size: 0.9em;
        margin: 0;
        flex-grow: 1;
        line-height: 1.5;
    }
    .comment p strong a {
        color: #2c3e50;
        font-weight: 600;
        font-size: 0.9em;
        text-decoration: none;
    }
    .comment p strong a:hover {
        text-decoration: underline;
    }
    .comment .delete-comment {
        color: #e74c3c;
        font-size: 0.85em;
        cursor: pointer;
        padding: 6px 10px;
        border-radius: 4px;
        transition: background-color 0.2s, transform 0.2s;
        flex-shrink: 0;
        margin-left: 8px;
    }
    .comment .delete-comment:hover {
        background-color: #e74c3c33;
    }
    .comment .delete-comment:active {
        transform: scale(0.95);
    }
    .comment-form {
        display: flex;
        align-items: center;
        gap: 12px;
        position: relative;
        margin-top: 12px;
    }
    .comment-form input[type="text"] {
        flex-grow: 1;
        padding: 10px 48px 10px 16px;
        border: 1px solid #bdc3c7;
        border-radius: 24px;
        font-size: 0.9em;
        outline: none;
        min-height: 48px;
        background-color: #f4f7fa;
    }
    .comment-form input[type="submit"] {
        background-color: #3498db;
        color: white;
        padding: 10px 16px;
        border: none;
        border-radius: 24px;
        cursor: pointer;
        font-size: 0.9em;
        min-height: 48px;
        position: absolute;
        right: 8px;
        transition: transform 0.2s;
    }
    .comment-form input[type="submit"]:active {
        transform: scale(0.95);
    }
    .comment-form .loading {
        display: none;
        position: absolute;
        right: 16px;
        font-size: 0.9em;
        color: #7f8c8d;
    }
    .comment-profile-link {
        text-decoration: none;
        display: inline-block;
        border-radius: 50%;
        transition: transform 0.2s ease, opacity 0.2s ease;
        cursor: pointer;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .comment-profile-link:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }
    .comment-profile-link:active {
        transform: scale(0.98);
    }
    .comment-profile-link img.profile-pic,
    .comment-profile-link .placeholder-pic {
        display: block;
        margin-right: 0;
    }
    .comment-profile-link:hover img.profile-pic,
    .comment-profile-link:hover .placeholder-pic {
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
    }
    
    /* View More Button */
    .view-more {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 8px;
        padding: 8px 16px;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border: 1px solid #dee2e6;
        border-radius: 20px;
        color: #3498db;
        font-size: 0.9em;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        outline: none;
        justify-content: center;
        align-items: center;  
        overflow: hidden;
    }
    .view-more::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(52, 152, 219, 0.1);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }
    .view-more:hover::before {
        width: 100px;
        height: 100px;
    }
    .view-more:hover {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        border-color: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    }
    .view-more:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    }
    .view-more i {
        transition: transform 0.3s ease;
        font-size: 0.85em;
    }
    
    /* Text truncation and expansion */
    .prayer-content-wrapper {
        position: relative;
    }
    .prayer-content.expanded {
        max-height: none;
        animation: expandText 0.5s ease-out;
    }
    .view-toggle-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(52, 152, 219, 0.1);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }
    .view-toggle-btn:hover::before {
        width: 100px;
        height: 100px;
    }
    .view-toggle-btn:hover {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        border-color: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    }
    .view-toggle-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    }
    .view-toggle-btn i {
        transition: transform 0.3s ease;
        font-size: 0.85em;
    }
    .view-toggle-btn[data-expanded="true"] i {
        transform: rotate(180deg);
    }
    .view-toggle-btn .btn-text {
        transition: all 0.3s ease;
    }
    .view-toggle-btn.loading {
        pointer-events: none;
        opacity: 0.7;
    }
    .view-toggle-btn.loading i {
        animation: spin 1s linear infinite;
    }
    .view-toggle-btn.compact {
        padding: 6px 12px;
        font-size: 0.85em;
        background: transparent;
        border: none;
        color: #3498db;
    }
    .view-toggle-btn.compact:hover {
        background: rgba(52, 152, 219, 0.1);
        border: none;
    }
  
/* 2026-07-29: quotations and lists in post bodies (includes/format_text.php) */
.fq { margin: 8px 0; padding: 6px 0 6px 14px; border-left: 3px solid #bcd6ea;
      color: #4a6072; font-style: italic; }
.fl { margin: 8px 0 8px 22px; padding: 0; }
.fl li { margin-bottom: 5px; }
    /* youtube-embed 2026-08-01: facade image, play button, player */
    /* the facade IS the native .video-placeholder - no thumbnail, full
       visual parity with uploaded videos until the member taps play */
    .video-container.yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
/* ---- index.php, block from line 3071 ---- */
    /* Modal Styles */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(6px);
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        box-sizing: border-box;
        animation: fadeInModal 0.3s ease-out;
    }
    .modal-content {
        background-color: #ffffff;
        width: 100%;
        max-height: 85vh;
        box-sizing: border-box;
        transform: translateY(30px);
        animation: slideUp 0.3s ease-out forwards;
    }
    .modal-comment-form input[type="submit"]:hover {
        background: linear-gradient(135deg, #2980b9, #2c3e50);
    }
    .modal-comment-form input[type="submit"]:active {
        transform: scale(0.95);
    }
    /* Alert Modal */
    .alert-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: 3000;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
        animation: fadeInAlert 0.3s ease-out;
    }
    .alert-content {
        background-color: #ffffff;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        width: 100%;
        max-width: 400px;
        text-align: center;
        transform: translateY(30px);
        animation: slideUpAlert 0.3s ease-out forwards;
        overflow: hidden;
    }
    .alert-header {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        padding: 20px;
        border-radius: 16px 16px 0 0;
    }
    .alert-header.error {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
    }
    .alert-header.success {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
    }
    .alert-header.warning {
        background: linear-gradient(135deg, #f39c12, #e67e22);
    }
    .alert-icon {
        font-size: 2.5em;
        margin-bottom: 10px;
        display: block;
    }
    .alert-title {
        font-size: 1.2em;
        font-weight: 600;
        margin: 0;
    }
    .alert-body {
        padding: 25px 20px;
    }
    .alert-message {
        color: #2c3e50;
        font-size: 1em;
        line-height: 1.5;
        margin: 0 0 25px 0;
    }
    .alert-actions {
        display: flex;
        gap: 12px;
        justify-content: center;
    }
    .alert-button {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px 24px;
        font-size: 1em;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        min-width: 80px;
    }
    .alert-button:hover {
        background: linear-gradient(135deg, #2980b9, #2c3e50);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    .alert-button:active {
        transform: translateY(0);
    }
    .alert-button.secondary {
        background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    }
    .alert-button.secondary:hover {
        background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    }
/* ---- index.php, block from line 3535 ---- */
/* feed-ceramic 2026-11-05: white glazed cards on a soft page (Nick chose screen 5).
   Gradients and shadows only, no blur, so low-cost phones are not slowed down.
   Everything is scoped to this page, and #posts-container lets these rules win
   over the older card rules, including those further down the file. */
html body, html body .app-container { background-color: #e4ebf1; }
/* The two white bars get the same glaze as the cards, without the diagonal band: they
   are too thin to show it. A bright edge, gentle shading and a soft shadow do the work. */
html body .top-nav { margin: -10px -10px 12px; border-bottom: 0; background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 55%, #f3f6f9 100%); box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(150,170,190,.16), 0 3px 8px rgba(23,43,77,.09); }
html body .bottom-nav { background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 50%, #f4f7fa 100%); box-shadow: inset 0 1px 0 #ffffff, 0 -1px 0 rgba(120,140,160,.12), 0 -4px 12px rgba(23,43,77,.1); }
#posts-container .post {
    padding: 14px 14px 0;
    border-radius: 18px;
    color: #2c3e50;
    background-color: #ffffff;
    background-image: linear-gradient(112deg, rgba(255,255,255,0) 12%, #ffffff 28%, rgba(255,255,255,0) 46%), linear-gradient(168deg, #ffffff 0%, #fbfcfd 60%, #f6f9fb 100%);
    box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 2px rgba(150,170,190,.2), 0 1px 1px rgba(23,43,77,.09), 0 8px 20px rgba(23,43,77,.13);
}
/* Header: picture without the ring, name above the time. */
#posts-container .post-header { margin-bottom: 10px; }
#posts-container .post-header img.profile-pic,
#posts-container .post-header .placeholder-pic { width: 44px; height: 44px; border: 0; object-fit: cover; }
#posts-container .post-header .profile-pic-link { margin-right: 10px; }
#posts-container .feed-follow-btn { background: transparent; color: #2c6f9f; font-size: 13px; min-height: 36px; }
/* Text sits on the card itself, cut at a whole line. */
#posts-container .post-content h3 { margin: 0 0 6px; font-size: 17.5px; line-height: 1.3; font-weight: 700; }
#posts-container .prayer-content-wrapper { margin: 0; }
#posts-container .prayer-content.preserve-formatting { margin: 0; padding: 0; border-left: 0; background: none; color: #2c3e50; font-size: 15.5px; line-height: 23px; }
#posts-container .prayer-content.truncated { max-height: 92px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
#posts-container .prayer-content.expanded { max-height: none; }
#posts-container .prayer-content a { color: #2c6f9f; }
#posts-container .view-toggle-btn,
#posts-container .view-toggle-btn:hover,
#posts-container .view-toggle-btn:active { display: flex; justify-content: flex-start; width: 100%; min-height: 44px; margin: -2px 0 -6px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; color: #2c6f9f; font-size: 14.5px; font-weight: 600; }
#posts-container .view-toggle-btn::before { display: none; }
#posts-container .view-toggle-btn i { display: none; }
/* Pictures and every video run the full width of the card. !important on the video
   because the player writes its own max-width when it starts, which would pull the
   frame back in from the edges. An upright video plays centred on its black frame. */
#posts-container .single-image-container,
#posts-container .image-carousel,
#posts-container .video-container { width: calc(100% + 28px); margin: 10px -14px 0; border-radius: 0; box-shadow: none; }
#posts-container .single-image-container,
#posts-container .image-carousel { max-width: none; }
/* video-frame 2026-11-05: the frame stops where the video stops. The page capped the video
   at 72vh but let an upright frame grow to 80vh, leaving a black band under the picture. */
#posts-container .video-container { max-width: none !important; max-height: 72vh !important; }
/* The action row keeps 8px from text, but a picture or wide video meets it directly. */
#posts-container .single-image-container,
#posts-container .video-container { margin-bottom: -8px; }
/* video-frame 2026-11-05: 1px, not 0. Square corners came in with the blank-video reports;
   the slight rounding may keep the phone drawing the video with the page. Not yet proven. */
#posts-container .video-container .lazy-video { border-radius: 1px; }
/* A phone keeps "hover" after a tap, which lifted this band off the bottom edge. */
#posts-container .video-container:hover .video-title-overlay { transform: none; }
#posts-container .single-image-container:hover,
#posts-container .video-container:hover { transform: none; box-shadow: none; }
#posts-container .single-image-container img { margin-top: 0; margin-bottom: 0; border-radius: 0; }
/* A picture too narrow to reach both edges sits on a blurred copy of itself, the way
   albums already do. The neutral colour shows until then, or if the blur cannot run. */
#posts-container .single-image-container { background-color: #eef3f7; }
#posts-container .single-image-container img { position: relative; z-index: 1; }
#posts-container .single-image-container .img-blur { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(20px); transform: scale(1.15); }
#posts-container .carousel-slide img { margin: 0; border-radius: 0; }
#posts-container .carousel-slide { background-color: #ffffff; }
/* Actions: icons spread evenly in one colour, comfortable to tap, no words. */
#posts-container .action-bar { display: flex; flex-wrap: nowrap; justify-content: stretch; gap: 0; margin: 8px -14px 0; padding: 0; border-top: 1px solid rgba(120,140,160,.15); }
#posts-container .action-bar > .action-btn,
#posts-container .action-bar > form { flex: 1 1 0; min-width: 0; display: flex; margin: 0; }
#posts-container .action-bar .action-btn { justify-content: center; width: 100%; min-height: 46px; padding: 0 2px; border-radius: 0; color: #4d6373; font-size: 14px; font-weight: 600; }
#posts-container .action-bar .action-btn i { font-size: 20px; color: inherit; }
#posts-container .action-bar .action-count { font-size: 14px; font-weight: 600; color: inherit; }
#posts-container .action-bar .action-btn:hover:not(.disabled) { background: rgba(44,111,159,.06); color: #4d6373; }
#posts-container .action-bar .action-btn:active:not(.disabled) { background: rgba(44,111,159,.1); transform: none; }
#posts-container .action-bar .like-button.liked,
#posts-container .action-bar .like-button.liked:hover:not(.disabled) { color: #d93a2b; }
#posts-container .action-bar .delete-btn,
#posts-container .action-bar .delete-btn:hover:not(.disabled) { color: #a4261d; }
/* The comment button already leads to the conversation. */
#posts-container .view-all-comments { display: none; }
/* ---- index.php, block from line 3772 ---- */
    #share-modal .modal-content {
        max-width: 420px;
        padding: 0;
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        border: 1px solid #e0e0e0;
    }
    #share-modal .modal-content h3 {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        margin: 0;
        padding: 20px;
        font-size: 1.2em;
        font-weight: 600;
        text-align: center;
        border-radius: 18px 18px 0 0;
    }
    #share-modal textarea {
        width: calc(100% - 32px);
        margin: 20px 16px 16px;
        padding: 14px;
        border: 1px solid #bdc3c7;
        border-radius: 12px;
        font-family: inherit;
        font-size: 0.95em;
        resize: vertical;
        min-height: 80px;
        max-height: 120px;
        background-color: #f8f9fa;
        outline: none;
        transition: border-color 0.2s, background-color 0.2s;
        box-sizing: border-box;
    }
    #share-modal textarea:focus {
        border-color: #3498db;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }
    #share-modal textarea::placeholder {
        color: #95a5a6;
        font-style: italic;
    }
    .share-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0 16px 16px;
        margin-bottom: 8px;
    }
    .share-buttons button {
        background: linear-gradient(135deg, #ffffff, #f8f9fa);
        color: #2c3e50;
        border: 1.5px solid #e0e0e0;
        border-radius: 10px;
        padding: 12px 8px;
        font-size: 0.9em;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        position: relative;
        overflow: hidden;
    }
    .share-buttons button:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
        border-color: #3498db;
    }
    .share-buttons button:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }
    .share-buttons .share-internal {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        border-color: #2980b9;
        grid-column: 1 / -1;
        font-weight: 600;
    }
    .share-buttons .share-internal:hover {
        background: linear-gradient(135deg, #2980b9, #2c3e50);
        border-color: #2c3e50;
    }
    .share-buttons .share-copy {
        background: linear-gradient(135deg, #95a5a6, #7f8c8d);
        color: white;
        border-color: #2980b9;
        grid-column: 1 / -1;
        font-weight: 600;
    }
    .share-buttons .share-copy:hover {
        background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
        border-color: #6c7b7d;
    }
    #share-modal .cancel {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        color: white;
        border: none;
        border-radius: 0 0 18px 18px;
        padding: 16px;
        font-size: 1em;
        font-weight: 500;
        cursor: pointer;
        width: 100%;
        transition: background 0.2s, transform 0.2s;
        margin: 0;
    }
    #share-modal .cancel:hover {
        background: linear-gradient(135deg, #c0392b, #a93226);
    }
    #share-modal .cancel:active {
        transform: scale(0.98);
    }

@media (max-width: 600px) {
            .action-bar {
                gap: 4px;
            }
            .action-btn {
                padding: 8px 12px;
                font-size: 0.9em;
            }
            .action-btn i {
                font-size: 1em;
            }
            .action-count {
                font-size: 0.8em;
            }
            .action-btn::after {
                display: none;
            }
            .prayer-content.truncated {
                max-height: 100px;
            }
            .view-toggle-btn {
                padding: 6px 14px;
                font-size: 0.85em;
            }
}

            

/* ---- index.php, block from line 6513 ---- */
/* Scroll-aware bars: free the screen while reading on phones */
.fixed-header, .top-nav, .bottom-nav {
    transition: transform 0.25s ease;
    will-change: transform;
}
.nav-tucked .fixed-header { transform: translateY(-110%); }
.nav-tucked .top-nav { transform: translateY(-140px); }
.nav-tucked .bottom-nav { transform: translateY(110%); }
.view-all-comments {
    padding: 2px 16px 12px;
    color: #8a929c;
    font-size: 0.92em;
    text-decoration: none;
}
.view-all-comments:hover {
    color: #5f6a76;
}
/* Feed media cap: posts never exceed ~3/4 of the screen, images scale
   down whole (never cropped) so the action row always rides into view.
   Tap still opens full size in the lightbox. */
.post-content img,
.single-image-container img,
.carousel-container,
.video-container video,
.video-container .lazy-video {
    max-height: 72vh !important;
}
.share-buttons .share-tochat {
    grid-column: 1 / -1;
    font-weight: 600;
}
