/*
Theme Name: HOH Child
Template: twentytwentyfive
Version: 1.0
*/


/* Style the bubble */
body.bm-mobile-device #bp-better-messages-mini-mobile-open.bm-initialized {
    width: 64px !important;
    height: 64px !important;
    border-radius: 16px !important;
    background-color: #7a4bd8 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    bottom: 60px !important;
    right: 20px !important;
    z-index: 999999 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* Hide bubble on all mobile pages except home */
body.bm-mobile-device:not(.home) #bp-better-messages-mini-mobile-open.bm-initialized {
    display: none !important;
}

/* Hide bubble when chat overlay is open */
body.bp-messages-full-screen #bp-better-messages-mini-mobile-open {
    display: none !important;
}




/* Icon */
#bp-better-messages-mini-mobile-open .bp-better-messages-mini-mobile-open-icon svg {
    width: 28px !important;
    height: 28px !important;
    color: #ffffff !important;
}

/* Unread bubble */
#bp-better-messages-mini-mobile-open .count {
    background: #ff4d4d !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    padding: 2px 6px !important;
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
}

/* Attach watermark to the overlay layer */
body.home .wp-site-blocks {
    position: relative;
    z-index: 0;
}

body.home .wp-site-blocks::before {
    content: "Heart of Hope";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    font-size: 8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 0.1rem;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
}

body.home .wp-site-blocks::after {
    content: "…because He first loved us";
    position: fixed;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    font-size: 2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.06);
    letter-spacing: 0.05rem;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* Raise all content above the watermark */
body.home .wp-site-blocks > * {
    position: relative;
    z-index: 1;
}










/* ============================================================
   AVATAR BADGE — GLOBAL HEADER STYLING
   ============================================================ */

/* Core avatar styling */
.hoh-avatar-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 6px rgba(0,0,0,0.15);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 20px; /* spacing from nav */
    transition: 0.15s ease;
}

/* Hover polish */
.hoh-avatar-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

/* Mobile refinement */
@media (max-width: 600px) {
    .hoh-avatar-badge {
        width: 36px;
        height: 36px;
    }
}


/* ============================================================
   WORDPRESS BLOCK FIXES — PREVENT COLLAPSE / CLIPPING
   ============================================================ */

/* Prevent Custom HTML wrapper from collapsing */
.wp-block-html {
    display: block !important;
    overflow: visible !important;
    min-height: 42px !important;
}

/* Allow constrained groups in the header to show children */
header .wp-block-group.is-layout-constrained {
    overflow: visible !important;
}

/* Ensure flex rows in the header align items vertically */
header .wp-block-group.is-layout-flex {
    align-items: center !important;
}


/* ============================================================
   MOBILE HEADER BEHAVIOR (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {

    /* Slimmer header padding */
    header.wp-block-template-part {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* Reduce spacing inside header groups */
    header .wp-block-group {
        gap: 10px !important;
    }

    /* Navigation + avatar row stays aligned */
    header .wp-block-group.is-layout-flex {
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    /* Avatar smaller on mobile */
    .hoh-avatar-badge {
        width: 34px;
        height: 34px;
        margin-left: 12px; /* tighter spacing */
    }

    /* Logo text scales down slightly */
    header .wp-block-site-title,
    header .wp-block-site-tagline {
        font-size: 0.9rem !important;
        line-height: 1.1 !important;
    }

    /* Prevent header from becoming too tall */
    header.wp-block-template-part {
        min-height: 60px !important;
    }
}


/* Center the Jitsi iframe on the Meet page */
#jitsiConferenceFrame0 {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Optional: make it responsive */
#jitsiConferenceFrame0 {
    max-width: 100%;
    width: 1080px; /* keep your preferred width */
}
