/* Consent-gated GA4 interface. White + seafoam, matching the Himraahi brand. Visibility itself is
   driven by the [hidden] attribute, so the global `[hidden]{display:none!important}` rule applies. */
.ga4-consent{
  position:fixed;z-index:36;left:max(16px,env(safe-area-inset-left,0px));right:auto;
  --ga4-bottom:calc(16px + env(safe-area-inset-bottom,0px));bottom:var(--ga4-bottom);margin:0;width:380px;max-width:calc(100% - 32px);max-height:calc(100dvh - var(--ga4-bottom) - 24px);overflow:auto;box-sizing:border-box;
  display:grid;gap:8px;padding:12px 14px;border:1px solid #dde7e4;border-radius:12px;background:#fff;color:#24343d;text-align:left;
  box-shadow:0 5px 22px #132c2414;font-family:'DM Sans',Arial,sans-serif;font-size:12px;line-height:1.5;
}
.ga4-consent:focus-visible{outline:3px solid #0f766e;outline-offset:3px}
.ga4-consent__header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.ga4-consent .ga4-consent__title{margin:0;color:#24343d;font-size:13px;line-height:1.5;font-weight:600;letter-spacing:0}
.ga4-consent__text{min-width:0}
.ga4-consent .ga4-consent__copy{margin:0;color:#5a6b72;font-size:12px;line-height:1.5}
.ga4-consent__link{flex:none;display:inline-flex;align-items:center;min-height:24px;color:#435866;font-size:11px;line-height:1.5;text-decoration:underline;text-underline-offset:3px}
.ga4-consent__link:focus-visible{outline:3px solid #0f766e;outline-offset:2px;border-radius:4px}
.ga4-consent__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
/* Equal controls: same size, fill, weight and prominence. */
.ga4-consent .ga4-consent__button{
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;width:100%;margin:0;
  min-height:44px;padding:8px 12px;border:1px solid #dce7e2;border-radius:7px;font:inherit;font-size:12px;
  font-weight:600;line-height:1.25;text-align:center;cursor:pointer;transform:none;transition:background-color .18s,color .18s;
}
.ga4-consent__button--accept,.ga4-consent__button--reject{background:#f1f6f4;color:#304b43}
.ga4-consent__button--accept:hover,.ga4-consent__button--reject:hover{background:#e3eee9}
.ga4-consent__button:focus-visible{outline:3px solid #0f766e;outline-offset:3px}
.ga4-consent__status{margin:0;color:#5d6b68;font-size:12px}
.ga4-consent__status:empty{display:none}
/* The persistent preferences control sits in the footer, alongside the existing quiet links. */
.footer .ga4-preferences-button{
  display:block;flex:none;width:fit-content;margin:0;padding:8px 4px;border:0;background:none;color:#ccc;
  font:inherit;font-size:11px;text-decoration:underline;text-underline-offset:3px;cursor:pointer;
}
.footer .ga4-preferences-button:hover{color:#ff7859}
.footer .ga4-preferences-button:focus-visible{outline:3px solid #8ed8c9;outline-offset:3px}
/* Fallback when a page has no footer to hang it on. */
.ga4-preferences-button--floating{
  position:fixed;z-index:36;left:max(16px,env(safe-area-inset-left,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));
  padding:8px 12px;border:1px solid #cfe4de;border-radius:999px;background:#fff;color:#0b5c56;
  font-family:'DM Sans',Arial,sans-serif;font-size:11px;box-shadow:0 6px 18px #10221d1a;cursor:pointer;
}
.ga4-announcement{
  position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0;
}
@media(max-width:900px){
  .ga4-consent{--ga4-bottom:calc(12px + env(safe-area-inset-bottom,0px));left:max(12px,env(safe-area-inset-left,0px));max-width:calc(100% - max(12px,env(safe-area-inset-left,0px)) - max(12px,env(safe-area-inset-right,0px)))}
  body:has(.package-mobile-quote:not([hidden])) .ga4-consent{--ga4-bottom:calc(var(--quote-dock-height,84px) + 12px)}
  /* Keep the small-screen overlay stack quiet until the visitor makes a choice. */
  body:has(.ga4-consent:not([hidden])) :is(.sticky-call,.sticky-whatsapp,.wa-invitation){visibility:hidden}
}
.ga4-consent[hidden]{display:none!important}
.footer .footer-bottom:has(.ga4-preferences-button){flex-wrap:wrap}
@media(prefers-reduced-motion:reduce){.ga4-consent .ga4-consent__button{transition:none}}
@media print{.ga4-consent,.ga4-preferences-button,.ga4-announcement{display:none!important}}
