/* THEO PROPERTIES — PVQL1 Production Integrity Remediation v1.0
   Release: v1.0.0.8.7.4-PVQL1.1 · 16 November 2026
   Additive, targeted visual integrity fixes only. NO account logic, role checks,
   Supabase configuration, property data, application JS, payment logic or schema changes.
 */

/* 1. Administrator sign-in gate: keep a generated, empty authenticated-only dock
   out of view until the access gate has actually closed. Existing dock renderer
   sets inline display:none but the legacy @media rule overrides it with !important.
   Do NOT hide the dock after admin access is granted and buttons are populated. */
body.theo-admin #theo-admin-mobile-nav.theo-unified-dock:empty,
body.theo-admin #adminGate:not(.hidden) ~ #theo-admin-mobile-nav.theo-unified-dock {
  display:none !important;
  pointer-events:none !important;
  visibility:hidden !important;
}

/* 2. Legal-page header: show all navigation destinations at 320–560px.
   Previous single-line menu clipped the final actions with a hidden scrollbar.
   Wrap only the legal-page navigation; keep desktop and all signed workspaces
   untouched. Preserve sticky header and existing section-anchor navigation. */
@media (max-width:560px) {
  body.legal-page #public-header.global-site-header {
    display:flex !important;
    flex-wrap:wrap !important;
    align-content:center !important;
    justify-content:center !important;
    width:100% !important;
    min-height:0 !important;
    padding:8px 12px 9px !important;
    gap:4px 0 !important;
    box-sizing:border-box !important;
  }
  body.legal-page #public-header.global-site-header .public-brand {
    display:flex !important;
    flex:0 0 100% !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:36px !important;
    margin:0 !important;
    justify-content:flex-start !important;
  }
  body.legal-page #public-header.global-site-header .public-brand img {
    max-width:132px !important;
    max-height:35px !important;
    width:auto !important;
    height:auto !important;
    object-fit:contain !important;
  }
  body.legal-page #public-header.global-site-header nav.global-site-nav {
    order:3 !important;
    display:flex !important;
    flex:0 0 100% !important;
    flex-wrap:wrap !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    gap:2px 5px !important;
    overflow:visible !important;
    white-space:normal !important;
  }
  body.legal-page #public-header.global-site-header nav.global-site-nav a {
    position:relative !important;
    display:inline-flex !important;
    flex:0 0 auto !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:36px !important;
    padding:7px 7px !important;
    margin:0 !important;
    border-radius:7px !important;
    font-size:10.5px !important;
    line-height:1.25 !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    text-align:center !important;
    text-decoration:none !important;
    max-width:100% !important;
  }
  body.legal-page #public-header.global-site-header nav.global-site-nav a:focus-visible,
  body.legal-page #public-header.global-site-header .public-brand:focus-visible {
    outline:2px solid #a97635 !important;
    outline-offset:2px !important;
  }
  /* All five links remain usable by touch and keyboard. Link text is unchanged. */
  body.legal-page .legal-main {
    padding-top:clamp(26px,7vw,38px) !important;
  }
}

/* 3. Avoid a generated admin navigation dock being rendered in print. */
@media print {
  body.theo-admin #theo-admin-mobile-nav.theo-unified-dock {display:none !important;}
}
