/*
 * GLRCF shared UI layer — one typeface and consistent basics across all six sites.
 * Loaded on every page by shared/glrcf_asset_extract.php (before </head>).
 * Deliberately low-risk: typography, focus, forms, media and phone safeguards only —
 * each site keeps its own colours and layouts.
 * Inter (SIL Open Font License, see /assets/fonts/LICENSE-Inter.txt) is self-hosted.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/GLRCF_Mission/assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/GLRCF_Mission/assets/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Arabic, Urdu, Tamil etc. fall back to the device's native fonts */
  --glrcf-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Naskh Arabic', 'Helvetica Neue', Arial, sans-serif;
  --glrcf-focus: #2563eb;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--glrcf-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}

/* Headings and controls follow the same family unless a component sets its own */
h1, h2, h3, h4, h5, h6, button, input, select, textarea, optgroup {
  font-family: inherit;
}
h1, h2, h3 { letter-spacing: -0.015em; }

/* Media never wider than its container */
img, video, canvas, iframe, svg { max-width: 100%; }

/* Clear, consistent keyboard focus (mouse clicks unaffected) */
:focus-visible {
  outline: 3px solid var(--glrcf-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Long words / URLs / emails never push the page sideways */
p, li, td, dd, blockquote, .policy-section, .contact-box { overflow-wrap: anywhere; }

/* Respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Phones & small tablets ---------- */
@media (max-width: 768px) {
  /* 16px inputs stop iOS from zooming in when a field is tapped */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; }
  /* Safety net: nothing can make the page scroll sideways */
  html, body { overflow-x: clip; max-width: 100%; }
  /* Tables scroll inside themselves instead of stretching the page */
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* header-main.css sizes EVERY <header> to 80px / z-index 10000 (meant for the site header only).
   Section headers inside page content must size to their content, or they spill over what follows. */
main header, .content-area header, .main-content header, article header, section header,
.gallery-container header, .policy-container header, header.ilf-hero, header.gallery-header {
  height: auto !important;
  max-height: none !important;
  z-index: auto !important;
}

@media (max-width: 768px) {
  /* Logo stays tappable: the header rows that overlap it let taps through their empty space
     (their buttons, links and menus still receive taps normally). */
  html body #mainHeader #headerMiddlePanel #headerSecondRow,
  html body #mainHeader #headerMiddlePanel .mobile-header-row1 { pointer-events: none !important; }
  html body #mainHeader #headerMiddlePanel #headerSecondRow > *,
  html body #mainHeader #headerMiddlePanel .mobile-header-row1 > * { pointer-events: auto !important; }
  /* Deen-ul-Islam's nav row starts at the left edge, under the logo: leave room for the logo */
  /* (its items carry inline !important styles, so a pseudo-element spacer is used) */
  html body #mainHeader #headerMiddlePanel #navigator-container:has(> .prayer-nav-item)::before { content: ''; flex: 0 0 48px; height: 1px; }
  html body #mainHeader #headerMiddlePanel #headerSecondRow .header-center,
  html body #mainHeader #headerMiddlePanel #navigator-container { pointer-events: none !important; }
  html body #mainHeader #headerMiddlePanel #navigator-container > * { pointer-events: auto !important; }
  /* The header search form can be stretched vertically by page CSS (e.g. help centre), covering the nav row */
  html body #mainHeader #searchWrapper, html body #mainHeader #searchForm { max-height: 48px !important; align-self: center !important; }
  /* One-line donation ticker (it scrolls; extra lines were hidden under content) */
  #scrollingBanner .scroll-content { white-space: nowrap; }
}
@media (max-width: 480px) {
  /* Top bar: icons only for "Sidebar" and "Resources" so nothing slides under the language button */
  html body #mainHeader .header-top-bar .top-bar-left .top-bar-link-label,
  html body .header-top-bar .top-bar-left .top-bar-link-label { display: none !important; }
  .top-bar-left { min-width: 0; }
}

/* Display button (2026-11-14): one small, modern round icon button on every site.
   Desktop: floating 40px button bottom-left. Phones: 30px icon docked at the end of the menu row (see glrcf_ui.js). */
html body #glrcf-appearance-fab { display: none !important; }
html body #glrcf-appearance-open-text {
  position: fixed !important; left: 16px !important; bottom: 16px !important; right: auto !important; top: auto !important;
  width: 40px !important; height: 40px !important; min-width: 40px !important; max-width: 40px !important; min-height: 0 !important; max-height: 40px !important; box-sizing: border-box !important;
  padding: 0 !important; margin: 0 !important; border-radius: 50% !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  background: rgba(255, 255, 255, .88) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .14) !important;
  font-size: 0 !important; line-height: 0 !important; color: #334155 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  z-index: 2147482000 !important; /* always above page content (cards, badges) so a click can never land on something else */
}
html body #glrcf-appearance-open-text:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15, 23, 42, .18) !important; background: #fff !important; }
html body #glrcf-appearance-open-text:focus-visible { outline: 2px solid #2563eb !important; outline-offset: 2px; }
html body #glrcf-appearance-open-text::before {
  content: ''; display: block; width: 19px; height: 19px; border: 0; border-radius: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8.5' fill='none' stroke='black' stroke-width='2'/><path d='M12 3.5a8.5 8.5 0 0 1 0 17z' fill='black'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8.5' fill='none' stroke='black' stroke-width='2'/><path d='M12 3.5a8.5 8.5 0 0 1 0 17z' fill='black'/></svg>") center / contain no-repeat;
}
/* docked in the phone menu row: plain icon, no outline or oval from the menu styles */
html body #navigator-container > .glrcf-display-nav-item {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 auto !important;
  padding: 0 4px !important; margin: 0 !important; border: 0 !important; outline: 0 !important;
  background: transparent !important; box-shadow: none !important; width: auto !important; min-width: 0 !important; height: auto !important; min-height: 0 !important;
}
html body #glrcf-appearance-open-text.glrcf-display-in-bar {
  position: static !important; width: 30px !important; height: 30px !important; min-width: 30px !important; max-width: 30px !important; max-height: 30px !important;
  flex: 0 0 30px !important; align-self: center; margin: 0 !important;
  border: 0 !important; background: rgba(15, 23, 42, .06) !important; box-shadow: none !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html body #glrcf-appearance-open-text.glrcf-display-in-bar:hover { transform: none; background: rgba(15, 23, 42, .12) !important; }
html body #glrcf-appearance-open-text.glrcf-display-in-bar::before { width: 17px; height: 17px; }

/* Policy / information pages: comfortable reading on every screen */
.policy-container { max-width: min(1000px, 100% - 24px) !important; }
@media (max-width: 640px) {
  .policy-container { padding: 20px 16px !important; margin: 16px auto !important; }
  .policy-header h1 { font-size: 1.6rem !important; }
}

/* Search filter icon stays clickable: the language menu's invisible hover area no longer sits on top of it */
html body #mainHeader #filterLink { position: relative !important; z-index: 2147483647 !important; }

/* Gallery carousels: arrows stay above the neighbouring row of video cards */
[id^="carousel-"]:has(> .nav-arrow) { position: relative; z-index: 3; }
/* (the language menu's hover "bridge" pseudo-elements reach over the filter icon — let clicks pass through) */
html body #mainHeader .aeris-lang-top-wrap::before,
html body #mainHeader .aeris-lang-top-wrap::after { pointer-events: none !important; }

/* ---------------------------------------------------------------------------------------------
   Display: Automatic / Light / Dark + text size (2026-11-14). Replaces the old 12-colour picker.
   Dark mode inverts the whole page (like the Dark Reader extension) so every page, including
   inline-styled ones, turns dark; photos, videos and maps are flipped back to their real colours.
   --------------------------------------------------------------------------------------------- */
html.glrcf-display-dark{filter:invert(1) hue-rotate(180deg)!important;background:#f4f4f4!important}
html.glrcf-display-dark :is(img,video,iframe,canvas,picture,embed,object,.glrcf-noinv),
html.glrcf-display-dark [style*="background-image"]{filter:invert(1) hue-rotate(180deg)!important}
html.glrcf-display-dark :is(img,video,iframe,canvas,picture,embed,object,.glrcf-noinv) :is(img,video,iframe,canvas,picture){filter:none!important}
@media (prefers-color-scheme: dark){
  html.glrcf-display-auto{filter:invert(1) hue-rotate(180deg)!important;background:#f4f4f4!important}
  html.glrcf-display-auto :is(img,video,iframe,canvas,picture,embed,object,.glrcf-noinv),
  html.glrcf-display-auto [style*="background-image"]{filter:invert(1) hue-rotate(180deg)!important}
  html.glrcf-display-auto :is(img,video,iframe,canvas,picture,embed,object,.glrcf-noinv) :is(img,video,iframe,canvas,picture){filter:none!important}
}
/* text size (accessible font scaling without body zoom, preventing touch target drift, fixed header distortion, and mobile dropdown failures) */
html.glrcf-text-2 { font-size: 110% !important; }
html.glrcf-text-3 { font-size: 120% !important; }
html.glrcf-text-2 body,
html.glrcf-text-3 body { zoom: 1 !important; }
html.glrcf-text-2 :is(p, article, section, main, .content, .container, li, td, th, h1, h2, h3, h4, h5, h6, label, input, select, textarea, .text, .card, .card-body, .card-title, .card-text, .prayer-table, .hadith-card, .ayah-card, [class*="islamic-"][class*="-dropdown"] a) { font-size: 1.08em; }
html.glrcf-text-3 :is(p, article, section, main, .content, .container, li, td, th, h1, h2, h3, h4, h5, h6, label, input, select, textarea, .text, .card, .card-body, .card-title, .card-text, .prayer-table, .hadith-card, .ayah-card, [class*="islamic-"][class*="-dropdown"] a) { font-size: 1.16em; }
@media (max-width: 980px) {
  html.glrcf-text-2 #mainHeader, html.glrcf-text-3 #mainHeader { font-size: 16px !important; }
  html.glrcf-text-2 #mainHeader .header-top-bar, html.glrcf-text-3 #mainHeader .header-top-bar { font-size: 10px !important; }
  html.glrcf-text-2 #navigator-container .nav-btn, html.glrcf-text-3 #navigator-container .nav-btn { font-size: 7px !important; }
  html.glrcf-text-2 #glrcf_assist_beacon, html.glrcf-text-3 #glrcf_assist_beacon { font-size: 14px !important; transform: scale(0.88) !important; }
}
/* the old 12-colour tile popup is retired; its button opens the Display panel instead */
#settingsThemePopup{display:none!important}

/* Display panel */
#glrcf-display-panel{position:fixed;z-index:2147483000;width:min(320px,calc(100vw - 24px));background:#fff;color:#0f172a;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 18px 50px rgba(15,23,42,.22);padding:14px;font:15px/1.4 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;display:none}
#glrcf-display-panel.open{display:block}
#glrcf-display-panel h3{margin:0 0 10px;font-size:15px;font-weight:800;display:flex;justify-content:space-between;align-items:center}
#glrcf-display-panel .gd-close{border:0;background:#f1f5f9;border-radius:8px;width:30px;height:30px;font-size:18px;line-height:1;cursor:pointer;color:#334155}
#glrcf-display-panel .gd-label{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#64748b;margin:10px 0 6px}
#glrcf-display-panel .gd-seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;background:#f1f5f9;padding:4px;border-radius:12px}
#glrcf-display-panel .gd-seg button{border:0;background:transparent;border-radius:9px;padding:9px 4px;font:inherit;font-size:13.5px;font-weight:600;color:#334155;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px}
#glrcf-display-panel .gd-seg button .gd-ico{font-size:17px;line-height:1}
#glrcf-display-panel .gd-seg button[aria-pressed="true"]{background:#fff;color:#0f172a;box-shadow:0 1px 4px rgba(15,23,42,.14)}
#glrcf-display-panel .gd-seg button:focus-visible{outline:2px solid #2563eb;outline-offset:1px}
#glrcf-display-panel .gd-note{font-size:12px;color:#64748b;margin:8px 2px 0}
@media (max-width:600px){#glrcf-display-panel{left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto}}
/* phone menu: keep the Display icon a true 30px circle even where menu button styles force taller buttons */
html body #mainHeader #navigator-container .glrcf-display-nav-item #glrcf-appearance-open-text.glrcf-display-in-bar,
html body #navigator-container .glrcf-display-nav-item #glrcf-appearance-open-text.glrcf-display-in-bar {
  width: 30px !important; height: 30px !important; min-height: 0 !important; max-height: 30px !important; block-size: 30px !important;
  aspect-ratio: 1 / 1; padding: 0 !important; color: #334155 !important; border-radius: 50% !important; line-height: 0 !important;
}

/* "Our Sites" menu on the Gtrado-run sites (2026-11-14). The trigger copies each site's own menu-button look;
   the menu floats above the page (never clipped by a scrolling menu bar). */
#glrcf-oursites-menu{position:fixed;z-index:2147482500;width:300px;background:#fff;color:#0f172a;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 16px 40px rgba(15,23,42,.18);padding:6px;display:none;font:14px/1.35 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
#glrcf-oursites-menu.open{display:block}
#glrcf-oursites-menu::before{content:'';position:absolute;left:0;right:0;top:-12px;height:12px}
#glrcf-oursites-menu a{display:flex;gap:11px;align-items:flex-start;padding:9px 10px;border-radius:10px;color:#0f172a;text-decoration:none}
/* (21 Nov 2026) rows keep their full width and normal word wrapping, whatever other phone rules say about links */
#glrcf-oursites-menu a{max-width:none!important;width:auto!important;font-size:inherit!important;line-height:1.35!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important}
#glrcf-oursites-menu a>span:last-child{flex:1 1 auto!important;min-width:0!important;max-width:none!important}
#glrcf-oursites-menu a:hover,#glrcf-oursites-menu a:focus-visible{background:#f1f5f9;outline:none}
#glrcf-oursites-menu .os-ico{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:none;font-size:14px}
#glrcf-oursites-menu .os-name{display:block;font-weight:700}
#glrcf-oursites-menu .os-desc{display:block;font-size:12.5px;color:#64748b;margin-top:1px}
#glrcf-oursites-menu .os-head{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#64748b;padding:8px 10px 4px}
#glrcf-oursites-menu .os-sep{border-top:1px solid #eef2f7;margin:4px 6px}
@media (max-width:760px){#glrcf-oursites-menu{left:12px!important;right:12px!important;width:auto;max-height:calc(100vh - var(--glrcf-os-top,120px) - 16px);overflow-y:auto}}

/* Gtrado preview notice (site audit, 14 Nov 2026) */
#glrcf-preview-note{margin:8px 10px 6px;padding:9px 14px;border-radius:12px;background:#fffbeb;border:1px solid #fcd34d;color:#78350f;font:500 13.5px/1.45 Inter,system-ui,sans-serif;text-align:center;position:relative;z-index:5}
#glrcf-preview-note i{color:#d97706;margin-right:4px}

/* Links inside a sentence stay in the sentence on phones (site audit 15 Nov 2026). mobile-responsive.css makes every
   <a> a flex box for bigger touch targets, which split "see our Returns and Shopping Terms" onto separate lines. */
@media (max-width: 1024px) {
  p a:not(.btn):not([class*="btn"]):not([class*="button"]):not([class*="cta"]) { display: inline !important; min-height: 0 !important; }
}

/* Footer social icons wrap on narrow phones instead of being cut off at the edges (15 Nov 2026). */
@media (max-width: 480px) { .layer-social > div { flex-wrap: wrap !important; justify-content: center !important; row-gap: 8px; max-width: 100%; } }

/* (22 Nov 2026, owner: "first row links have dead click") phones/tablets, every site: the top-row menus (account, resources,
   language, settings) are marked open by the header scripts (.at-top-bar-dropdown-open) but on several sites no rule showed
   them. Show the open menu inside the screen, with readable items (the top row itself is icon-only on phones). */
@media (max-width: 980px) {
  html body #mainHeader .header-top-bar .top-bar-dropdown-wrap.at-top-bar-dropdown-open { z-index: 10052 !important; }
  html body #mainHeader .header-top-bar .top-bar-dropdown-wrap.at-top-bar-dropdown-open > .top-bar-dropdown,
  html body #mainHeader .header-top-bar .top-bar-dropdown-wrap.at-top-bar-dropdown-open .top-bar-dropdown {
    display: block !important; visibility: visible !important; opacity: 1 !important; pointer-events: auto !important;
    z-index: 2147483647 !important; max-width: calc(100vw - 16px) !important; max-height: 70vh !important; overflow-y: auto !important;
  }
  html body #mainHeader .header-top-bar .top-bar-left .top-bar-dropdown a,
  html body #mainHeader .header-top-bar .top-bar-right .top-bar-dropdown a,
  html body #mainHeader .header-top-bar .top-bar-dropdown-wrap .top-bar-dropdown a {
    font-size: 14px !important; line-height: 1.3 !important; display: flex !important; align-items: center !important; gap: 10px !important;
    padding: 10px 14px !important; white-space: normal !important; width: auto !important; min-width: 170px !important; color: #1f2937 !important;
  }
  html body #mainHeader .header-top-bar .top-bar-dropdown a i { font-size: 15px !important; width: 18px !important; text-align: center !important; }
}

/* ==========================================================================
   GLOBAL BRAND HEADER ALIGNMENT (Logo: Bottom-Left Corner | Title: Center Top Row)
   ========================================================================== */

/* 1. Website Title: Centered in the top row of the header across all viewports */
html body #mainHeader .header-top-bar,
html body .header-container .header-top-bar {
  position: relative !important;
}

html body #mainHeader .header-top-bar .top-bar-brand-mobile,
html body #mainHeader .header-top-bar .glrcf-mid-brand {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  padding: 0 4px !important;
  text-align: center !important;
  white-space: nowrap !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  z-index: 10 !important;
  pointer-events: auto !important;
  text-decoration: none !important;
  color: var(--glrcf-header-fg, inherit) !important;
}

html body #mainHeader .header-top-bar .top-bar-brand-mobile span,
html body #mainHeader .header-top-bar .glrcf-mid-brand span {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* On mobile phones (<= 768px), keep top bar title compact so it never overlaps left/right icons */
@media (max-width: 768px) {
  html body #mainHeader .header-top-bar .top-bar-brand-mobile,
  html body #mainHeader .header-top-bar .glrcf-mid-brand {
    font-size: 11px !important;
    max-width: 44vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* Brand specific colors when CSS variables fall back */
html body #mainHeader .top-bar-brand-mobile,
html body:not([class*="-site"]) #mainHeader .top-bar-brand-mobile { color: #0b4ea2 !important; }
html body.gtrado-page #mainHeader .top-bar-brand-mobile,
html body.gtrado-site #mainHeader .top-bar-brand-mobile,
html body.gtrado-page #mainHeader .glrcf-mid-brand { color: #0b4ea2 !important; }

html body.glrelief-page #mainHeader .top-bar-brand-mobile,
html body.glrelief-site #mainHeader .top-bar-brand-mobile { color: #0f172a !important; }

html body.deenulislam-page #mainHeader .top-bar-brand-mobile,
html body.deenulislam-site #mainHeader .top-bar-brand-mobile { color: #047857 !important; }

html body.ilearnfree-page #mainHeader .top-bar-brand-mobile,
html body.ilearnfree-site #mainHeader .top-bar-brand-mobile { color: #1d4ed8 !important; }

html body.muslimancestry-site #mainHeader .top-bar-brand-mobile { color: #7c3aed !important; }

html body.nikahfinder-site #mainHeader .top-bar-brand-mobile { color: #be185d !important; }

/* 2. Logo: Anchored at the Bottom-Left corner of the header without overlapping anything */
html body #mainHeader #headerMiddlePanel,
html body #mainHeader .header-container {
  position: relative !important;
}

/* Desktop layout (>= 981px): logo sits at bottom-left corner of the header */
@media (min-width: 981px) {
  html body #mainHeader .logo-wrapper,
  html body #headerMiddlePanel .logo-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    left: 10px !important;
    bottom: 4px !important;
    top: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10025 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    pointer-events: auto !important;
  }

  html body #mainHeader .logo-wrapper a,
  html body #headerMiddlePanel .logo-wrapper a {
    display: block !important;
    line-height: 0 !important;
    text-decoration: none !important;
  }

  html body #mainHeader .logo-wrapper img,
  html body #headerMiddlePanel .logo-wrapper img {
    height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: left center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.12)) !important;
  }

  /* Ensure navigator links row never overlaps bottom-left logo */
  html body #mainHeader #navigator-container,
  html body #mainHeader .header-second-row .header-center,
  html body #mainHeader .muslimancestry-nav,
  html body #mainHeader .nikahfinder-nav {
    margin-left: 200px !important;
    margin-right: 200px !important;
    justify-content: center !important;
  }
}

/* Mobile layout (<= 980px): logo sits on the left of row 2 (search row) where 52px padding-left is reserved */
@media (max-width: 980px) {
  html body #mainHeader .logo-wrapper,
  html body #headerMiddlePanel .logo-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    left: 10px !important;
    bottom: 4px !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    max-width: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    z-index: 10020 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body #mainHeader .logo-wrapper a,
  html body #headerMiddlePanel .logo-wrapper a {
    display: block !important;
    line-height: 0 !important;
    overflow: visible !important;
  }

  html body #mainHeader .logo-wrapper img,
  html body #headerMiddlePanel .logo-wrapper img {
    height: 28px !important;
    max-height: 28px !important;
    max-width: none !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: left center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Ensure row 2 and navigator leave ample clearance for the logo on the left */
  html body #mainHeader .mobile-header-row1,
  html body #mainHeader .header-row1 {
    padding-left: 52px !important;
  }
  html body #mainHeader #navigator-container {
    padding-left: 52px !important;
  }
}

/* (27 Nov 2026) Gtrado preview notice: Notify-me button, and shorter on phones */
#glrcf-preview-note .glrcf-notify-btn{margin:6px 0 0 6px;background:#d97706;color:#fff;box-shadow:none;min-height:34px}
@media (max-width:700px){#glrcf-preview-note{margin:8px 8px 4px;padding:8px 10px;font-size:12.5px;line-height:1.4}}
/* (27 Nov 2026) while a pop-up form, the Saved panel or the family-tree editor is open, the floating assist bar steps aside (it covered their buttons) */
html.glrcf-layer-open #glrcf_assist_beacon{display:none!important}
/* (27 Nov 2026, owner) phones: the assist bar shows as ONE round chat button; tapping it opens the other buttons (glrcf_ui.js) */
@media (max-width:768px){
  #glrcf_assist_beacon:not(.glrcf-beacon-open) .beacon-btn:not(.chat-btn),
  #glrcf_assist_beacon:not(.glrcf-beacon-open) .beacon-divider,
  #glrcf_assist_beacon:not(.glrcf-beacon-open) .beacon-outer-ring,
  #glrcf_assist_beacon .beacon-label{display:none!important}
}
@media (max-width:768px){
  #glrcf_assist_beacon:not(.glrcf-beacon-open){height:auto!important;min-height:0!important}
  #glrcf_assist_beacon:not(.glrcf-beacon-open) .beacon-body{height:52px!important;width:52px!important;border-radius:50%!important}
}
/* (27 Nov 2026, owner) AI chat off: no AI voice button in the assist bar (the chat button opens "Message us") */
html.glrcf-ai-off #glrcf_assist_beacon .voice-btn,html.glrcf-ai-off #glrcf_assist_beacon .voice-btn + .beacon-divider{display:none!important}
