/* Menu Rework — header + mobile bottom bar. See menu-rework.php. */

/* ===== Header ===== */

/* Social icons leave the header at every width (footer on desktop, @ panel on phones). */
.navbar-nav .nav-items .nav-item.link-icon:has(a[title="Instagram"], a[title="Tiktok"], a[title="Facebook"], a[title="Youtube"]) { display: none !important; }

/* All Listings / New Devs / Resources as text links from tablet up
   (the compiled theme css only shows .nav-item.location from 1440px). */
@media (min-width: 768px) {
    ul.navbar-nav .nav-item.location { display: inherit; }
}
/* Tablet: the text links win the space — drop the email / phone icons. */
@media (max-width: 991px) {
    ul.navbar-nav .nav-item.link-icon ~ .link-icon { display: none; }
}
/* Phones: the favorites heart is in the burger dropdown. */
@media (max-width: 767px) {
    ul.navbar-nav .nav-item.link-icon:has(#favListings) { display: none; }
}

/* Burger dropdown: phones only, far right (flex order), gold disc like the language switch. */
.navbar-nav .nav-items .nav-item.rlm-links-menu { order: 99; flex: 0 0 auto; }
@media (min-width: 768px) {
    .navbar-nav .nav-items .nav-item.rlm-links-menu { display: none !important; }
}
.rlm-links-menu .dropdown-divider { margin: 4px 0; }
.rlm-links-menu .dropdown-item img { vertical-align: -2px; margin-right: 2px; }

/* The sticky filters bar's own All Listings / New Devs row (the header has the links now)... */
.before-breadcrumb-wrap .all-posts-links { display: none !important; }
.before-breadcrumb-wrap { justify-content: flex-end !important; }
/* ...except on listing / development singles below 768px, where the theme
   drops the top header entirely (gallery-first layout) — there the row is
   the only way to All Listings / New Devs, so it stays. */
@media (max-width: 767px) {
    body.single-listing .before-breadcrumb-wrap .all-posts-links,
    body.single-development .before-breadcrumb-wrap .all-posts-links { display: flex !important; }
    body.single-listing .before-breadcrumb-wrap,
    body.single-development .before-breadcrumb-wrap { justify-content: space-between !important; }
}

/* ===== Mobile bottom bar (< 768px) ===== */

.hero-home .hero-text-wrapper { height: calc(100svh - 170px); }
.single-listing .mobile-fixed-footer, .single-development .mobile-fixed-footer { z-index: unset !important; }

#mobile-cta-footer.rlm-bar {
    --rlm-gold: #bc9d70;
    --rlm-ink: #222;
    --rlm-h: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    width: 100%;
    max-width: none;
    min-height: var(--rlm-h);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -3px 12px rgba(0,0,0,.12);
    transition: transform .3s ease;
}
#mobile-cta-footer.rlm-bar.hide-on-scroll { transform: translateY(100%); }
/* Desktop: no bar. (html prefix also outranks the resources-hub rule that
   hid the old property-only bar on hub pages — this bar belongs there.) */
@media (min-width: 768px) {
    html body #mobile-cta-footer.rlm-bar, html body .rlm-social { display: none !important; }
}
@media (max-width: 767px) {
    html body.rh-hub-page #mobile-cta-footer.rlm-bar { display: flex !important; }
}

#mobile-cta-footer .rlm-item {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    padding: 0; border: 0; background: none;
    color: var(--rlm-ink);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
#mobile-cta-footer .rlm-item svg { width: 32px; height: 32px; }
#mobile-cta-footer .rlm-ring { color: var(--rlm-gold); }
#mobile-cta-footer .rlm-wa { color: #25d366; }
#mobile-cta-footer .rlm-item.is-active { color: var(--rlm-gold); }
#mobile-cta-footer .rlm-social-toggle[aria-expanded="true"] svg { background: var(--rlm-gold); color: #fff; border-radius: 50%; }

#mobile-cta-footer .rlm-tellus {
    display: inline-flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 16px;
    border: 0; border-radius: 10px;
    background: #b5173c !important; /* !important: the listing-page gradient rule in styles.css */
    color: #fff;
    font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
    white-space: nowrap;
}
#mobile-cta-footer .rlm-tellus:hover, #mobile-cta-footer .rlm-tellus:focus { color: #fff; opacity: .9; }
#mobile-cta-footer .rlm-tellus svg { width: 16px; height: 16px; }

/* "Follow us" popover above the @ icon */
.rlm-social {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom) + 10px);
    z-index: 998;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    background: #fff; border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    font-size: 15px; color: #222;
    transform: translateY(12px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility 0s .2s;
}
.rlm-social.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.rlm-social::after {
    content: ""; position: absolute; left: 50%; bottom: -8px;
    width: 16px; height: 16px; background: #fff;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 4px 4px 8px rgba(0,0,0,.06);
}
.rlm-social .rlm-social-label { margin-right: auto; white-space: nowrap; }
.rlm-social .rlm-social-links { display: flex; gap: 10px; }
.rlm-social .rlm-social-links a {
    display: block; width: 40px; height: 40px; border-radius: 50%;
    background: var(--c, #bc9d70);
    -webkit-tap-highlight-color: transparent;
}
.rlm-social .rlm-social-links a span {
    display: block; width: 100%; height: 100%;
    background: #fff;
    -webkit-mask: var(--i) center / 20px 20px no-repeat;
            mask: var(--i) center / 20px 20px no-repeat;
}
.rlm-social .rlm-social-close {
    width: 32px; height: 32px; margin-left: 2px;
    padding: 0; border: 0; background: none; color: #555; font-size: 22px; line-height: 1;
}
@media (max-width: 400px) {
    .rlm-social .rlm-social-label { display: none; }
    .rlm-social .rlm-social-links { margin: 0 auto; }
}

/* Phones: things that must clear or defer to the bar */
@media (max-width: 767px) {
    /* footer social row — the @ panel has them */
    .site-footer .social-icons { display: none; }
    /* AI search assistant mic bubble + panel sit above the bar */
    #aifa-bubble { bottom: calc(72px + 16px + env(safe-area-inset-bottom)) !important; }
    #aifa-panel  { bottom: calc(72px + 80px + env(safe-area-inset-bottom)) !important; height: calc(100vh - 72px - 100px) !important; max-height: 70vh; }
    /* ...and the bubble steps aside while the Follow us panel is open */
    body:has(.rlm-social.is-open) #aifa-bubble { visibility: hidden; }
    /* cookie notice above the bar instead of covering it */
    #moove_gdpr_cookie_info_bar.gdpr_infobar_postion_bottom { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
