/* --brg-cb-h feeds `bottom` (fallback path), --brg-cb-lift feeds
   `translate` (compositor path). The observer at the foot of this file
   writes both; see the note above the @supports block below. */
:root{ --brg-cb-h:0px; --brg-cb-lift:0px; }

/* Full-bleed wrapper; never blocks the page behind it */
html body #iubenda-cs-banner{
  position:fixed!important; inset:auto 0 0 0!important;
  width:100%!important; max-width:none!important;
  pointer-events:none!important;
}
/* The row below is width:100% with 32px of side padding, so it needs
   border-box or it overflows the viewport by 64px and pushes the Accept
   button off-screen. Both entry points do set it globally (bootstrap.css
   and editorial.css on the marketing pages), but this does not
   depend on either of them staying that way. */
html body #iubenda-cs-banner,
html body #iubenda-cs-banner *{ box-sizing:border-box!important; }
html body #iubenda-cs-banner .iubenda-cs-container{
  width:100%!important; max-width:none!important;
  margin:0!important; padding:0!important; pointer-events:auto!important;
}
html body #iubenda-cs-banner .iubenda-cs-content{
  background:#000!important; width:100%!important; max-width:none!important;
  margin:0!important; padding:0!important;
  border:0!important; border-radius:0!important; box-shadow:none!important;
}

/* Row: notice left, controls right.
   iubenda ships `#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale
   { margin:16px auto!important }` inside a (min-width:992px) query — that
   margin is what inset the bar to 992px and added 32px of height. Its
   specificity is (1 id, 2 classes), so the modifier class is repeated here
   to outrank it. Both position variants are covered so this survives a
   change of `position` in the config above. */
html body #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale,
html body #iubenda-cs-banner.iubenda-cs-default-floating .iubenda-cs-rationale,
html body #iubenda-cs-banner .iubenda-cs-rationale{
  display:flex!important; flex-direction:row!important;
  align-items:center!important; justify-content:space-between!important;
  gap:28px!important; padding:0 32px!important; margin:0!important;
  min-height:60px!important; max-width:none!important; width:100%!important;
}
html body #iubenda-cs-banner .iubenda-cs-close-btn{ display:none!important; }
html body #iubenda-cs-banner .iubenda-banner-content{
  margin:0!important; padding:0!important; flex:1 1 auto!important;
}
/* showTitle:false already removes this; belt-and-braces for older builds */
html body #iubenda-cs-banner #iubenda-cs-title{ display:none!important; }

/* The paragraph also carries .iubenda-cs-small-margin-top, which adds a
   16px top margin — matched explicitly so it is cleared.
   The descendant selector is not cosmetic tidiness. iubenda 1.104.2 moved
   the notice text down into a nested <p class="iub-p"> and ships:
     #iubenda-cs-banner .iubenda-banner-content:not(.iubenda-custom-content) *,
     #iubenda-cs-banner [class*=" iub"], #iubenda-cs-banner [class^="iub"]
     { text-transform:none!important; letter-spacing:normal!important; … }
   A declaration on the child beats anything inherited from the parent, so
   styling only #iubenda-cs-paragraph left the div correct and the visible
   text reverted to sentence case in the system font. Matching the
   descendants outranks their rule — 2 ids to their 1. Verified live on
   1.104.2; harmless on builds that have no inner wrapper. */
html body #iubenda-cs-banner #iubenda-cs-paragraph,
html body #iubenda-cs-banner #iubenda-cs-paragraph.iubenda-cs-small-margin-top,
html body #iubenda-cs-banner #iubenda-cs-paragraph *{
  font-family:'Neue Montreal',-apple-system,'Helvetica Neue',sans-serif!important;
  font-size:11px!important; font-weight:400!important;
  letter-spacing:.16em!important; text-transform:uppercase!important;
  color:rgba(255,255,255,.72)!important;
  margin:0!important; padding:0!important; line-height:1.5!important;
  background:none!important;
}
html body #iubenda-cs-banner #iubenda-cs-paragraph a{
  color:#fff!important; text-decoration:none!important;
  border-bottom:1px solid rgba(184,150,90,.6)!important; padding-bottom:1px!important;
  transition:color .35s ease,border-color .35s ease!important;
}
html body #iubenda-cs-banner #iubenda-cs-paragraph a:hover{
  color:var(--gold,#B8965A)!important; border-color:var(--gold,#B8965A)!important;
}
/* Responsive copy: long line on desktop, short line on phones */
html body #iubenda-cs-banner .brg-cb-short{ display:none!important; }

/* Controls */
html body #iubenda-cs-banner .iubenda-cs-opt-group,
html body #iubenda-cs-banner .iubenda-cs-opt-group-custom,
html body #iubenda-cs-banner .iubenda-cs-opt-group-consent{
  display:flex!important; flex-direction:row!important; align-items:center!important;
  gap:10px!important; margin:0!important; padding:0!important; flex:none!important;
}
html body #iubenda-cs-banner .iubenda-cs-opt-group button{
  font-family:'Neue Montreal',-apple-system,'Helvetica Neue',sans-serif!important;
  font-size:11px!important; font-weight:500!important;
  letter-spacing:.16em!important; text-transform:uppercase!important;
  border-radius:0!important; margin:0!important; white-space:nowrap!important;
  transition:background .4s cubic-bezier(.16,1,.3,1),color .4s cubic-bezier(.16,1,.3,1),border-color .4s cubic-bezier(.16,1,.3,1)!important;
}
/* Accept and Reject: the bar's own colour, hairline outline, gold on
   hover — identical by design. Both carry the same background, border
   and weight so neither choice reads as louder than the other (see the
   compliance note above).
   #000 is stated rather than `transparent` so it matches the value
   the config sends to iubenda exactly; their late rule and this one
   then agree and the colour holds whichever wins. */
html body #iubenda-cs-banner .iubenda-cs-accept-btn,
html body #iubenda-cs-banner .iubenda-cs-reject-btn{
  background:#000!important; color:#fff!important;
  border:1px solid rgba(255,255,255,.34)!important;
  padding:11px 22px!important; line-height:1!important; text-align:center!important;
}
html body #iubenda-cs-banner .iubenda-cs-accept-btn:hover,
html body #iubenda-cs-banner .iubenda-cs-reject-btn:hover{
  background:var(--gold,#B8965A)!important; border-color:var(--gold,#B8965A)!important; color:#000!important;
}
html body #iubenda-cs-banner .iubenda-cs-accept-btn:focus-visible,
html body #iubenda-cs-banner .iubenda-cs-reject-btn:focus-visible,
html body #iubenda-cs-banner .iubenda-cs-customize-btn:focus-visible{
  outline:2px solid var(--gold,#B8965A)!important; outline-offset:2px!important;
}
/* "Preferences" — quieter, it opens the granular modal rather than
   expressing a choice, so it sits outside the accept/reject parity.
   line-height:1 keeps its optical centre on the same baseline as the
   two buttons beside it.
   The `.iubenda-cs-opt-group button` selector above is (1 id, 1 class,
   1 type) and would otherwise hold this button at weight 500; matching
   the type here as well outranks it. */
html body #iubenda-cs-banner .iubenda-cs-opt-group button.iubenda-cs-customize-btn{
  background:none!important; border:0!important;
  color:rgba(255,255,255,.5)!important; padding:11px 6px!important;
  font-weight:400!important; line-height:1!important;
  transition:color .35s ease!important;
}
html body #iubenda-cs-banner .iubenda-cs-opt-group button.iubenda-cs-customize-btn:hover{ color:#fff!important; }

/* Tablets / small laptops: the row still fits on one line, but the
   longer FR and RU notices leave no slack against 32px of side padding
   and a 28px gap. Tightening both keeps them on a single line instead
   of wrapping the notice and growing the bar. */
@media (min-width:861px) and (max-width:1100px){
  html body #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale,
  html body #iubenda-cs-banner.iubenda-cs-default-floating .iubenda-cs-rationale,
  html body #iubenda-cs-banner .iubenda-cs-rationale{
    padding:0 24px!important; gap:20px!important;
  }
  html body #iubenda-cs-banner .iubenda-cs-accept-btn,
  html body #iubenda-cs-banner .iubenda-cs-reject-btn{ padding:11px 18px!important; }
}

/* Phones: stack to three rows — notice, the two consent buttons side by
   side, then "Preferences" beneath. Measured at 131–134px on a 375×812
   phone (~17%) against the 393px (48%) the stock banner occupied. Worst
   case is Russian at 320px, where the notice and the Reject caption each
   take a second line: 162px. */
@media (max-width:860px){
  /* The modifier classes are repeated here for the same reason as in the
     desktop row above — and, just as importantly, so this rule is not
     LESS specific than that one. `html body #iubenda-cs-banner
     .iubenda-cs-rationale` (1 id, 1 class) loses to the desktop
     `…#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale`
     (1 id, 2 classes) no matter which media query comes last, which left
     the banner in its desktop row on phones. Same trap, one level down. */
  html body #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale,
  html body #iubenda-cs-banner.iubenda-cs-default-floating .iubenda-cs-rationale,
  html body #iubenda-cs-banner .iubenda-cs-rationale{
    flex-direction:column!important; align-items:stretch!important;
    gap:12px!important; padding:14px 18px calc(16px + env(safe-area-inset-bottom,0px))!important;
    min-height:0!important;
  }
  html body #iubenda-cs-banner .brg-cb-full{ display:none!important; }
  html body #iubenda-cs-banner .brg-cb-short{ display:inline!important; }
  /* .iubenda-cs-small-margin-top matched again for the same reason: the
     desktop rule that clears its margin also sets font-size, and would
     otherwise hold 11px here. The descendant selector is needed for the
     same reason as above — on 1.104.2 the text lives in a child. */
  html body #iubenda-cs-banner #iubenda-cs-paragraph,
  html body #iubenda-cs-banner #iubenda-cs-paragraph.iubenda-cs-small-margin-top,
  html body #iubenda-cs-banner #iubenda-cs-paragraph *{
    font-size:10px!important; letter-spacing:.14em!important;
  }
  /* column-reverse puts the two consent buttons on top and Preferences
     beneath, as in the mockup. The 12px gap plus the link's own 6px of
     vertical padding gives 18px of optical separation — at the earlier
     8px with no padding the link read as clipped to the buttons. The
     padding also lifts the link to a ~26px tap target. */
  html body #iubenda-cs-banner .iubenda-cs-opt-group{
    flex-direction:column-reverse!important; align-items:stretch!important; gap:12px!important;
  }
  /* align-items:stretch so that when one caption wraps to two lines on a
     narrow handset the other button matches its height instead of
     sitting shorter beside it. */
  html body #iubenda-cs-banner .iubenda-cs-opt-group-consent{
    gap:8px!important; align-items:stretch!important;
  }
  /* white-space:normal + min-width:0 override the nowrap set on the row
     above. Without them the longest caption sets its own button's
     min-content width and the two stop matching — Russian ("Отказаться
     от всех") made Reject 16px wider than Accept at 360px, which is
     exactly the imbalance the compliance note forbids. Wrapping keeps
     them identical at any width, in any language. */
  html body #iubenda-cs-banner .iubenda-cs-opt-group-consent button{
    flex:1 1 0!important; min-width:0!important;
    padding:12px 8px!important; font-size:10px!important; letter-spacing:.12em!important;
    white-space:normal!important; line-height:1.3!important;
  }
  /* Left-aligned so it sits on the same optical margin as the notice
     above it rather than floating in the middle of the bar. */
  html body #iubenda-cs-banner .iubenda-cs-opt-group-custom{ justify-content:flex-start!important; }
  html body #iubenda-cs-banner .iubenda-cs-opt-group button.iubenda-cs-customize-btn{
    text-align:left!important; padding:6px 0!important;
    font-size:10px!important; letter-spacing:.12em!important; line-height:1.4!important;
  }
}
/* ══════════════════════════════════════════════════════════
   FLOATING UI — lifts clear of the banner, settles back after
   ══════════════════════════════════════════════════════════
   .wa-float is re-declared with a hardcoded `bottom` in six page
   templates (home, about, contact, aqva-construction, -project) and in
   footer-listing.php. Those blocks print after footer.php on some
   templates, so patching footer.php alone left the button stranded on
   the homepage. This single authoritative rule lives here — hooked to
   wp_head, which every template calls, standalone or not — and carries
   the specificity and !important needed to outrank all of them at once.
   The template copies are plain `.wa-float` with no !important, so
   `html body .wa-float{...!important}` wins on all of them.

   The two buttons are staggered by 70ms so they read as one
   choreographed movement rather than two things twitching.

   ── FALLBACK PATH ──────────────────────────────────────────
   Animating `bottom` is correct in every engine ever shipped, but it is
   a layout property: every frame relayouts the element, repaints it and
   — on .wa-float and #brg-fav-fab, which are both backdrop-filter glass
   — re-samples the blur behind it. That is the combination that judders
   on a mid-range phone. It is kept only for engines without the
   individual transform properties (Chrome <104, Safari <14.1, FF <72),
   where a slightly heavy lift still beats no lift at all. */
html body .wa-float{
  bottom:calc(32px + var(--brg-cb-h,0px))!important;
  transition:transform .5s var(--ease,cubic-bezier(.16,1,.3,1)),
             opacity .6s var(--ease,cubic-bezier(.16,1,.3,1)),
             bottom .62s cubic-bezier(.22,1,.36,1)!important;
}
@media (max-width:600px){
  html body .wa-float{ bottom:calc(20px + var(--brg-cb-h,0px))!important; }
}

/* ── PREFERRED PATH ────────────────────────────────────────
   `translate` is a compositor-only property, so the lift runs off the
   main thread: no layout, no repaint, no re-blur — the existing glass
   layer is simply moved. Same distance, same easing, same stagger.

   Shadowing --brg-cb-h to 0px ON THESE THREE ELEMENTS neutralises every
   `bottom: calc(… + var(--brg-cb-h))` in the theme at once — the rule
   above, footer.php, include/favorites.php (three breakpoints) and
   single-property.php — so this file never has to restate their
   per-breakpoint offsets, and they cannot drift apart. A custom
   property resolves against the element the declaration lands on, so
   the shadowed 0px is what those calc()s see. The lift then comes from
   --brg-cb-lift, which only these rules read and nothing shadows.

   `translate` composes with `transform` rather than replacing it, so
   .wa-float:hover{transform:scale(1.1)}, #brg-fav-fab's entrance
   translateY and #brg-mab.mab-hide's translateY(110%) all still work,
   each keeping its own duration. That is the reason for using the
   individual property instead of folding the lift into `transform`.

   The rule below is the single source of the lift for all three. What
   each element supplies is only its own transition list: #brg-fav-fab
   and #brg-mab name `translate` in theirs (favorites.php,
   single-property.php), because those lists carry timings this file
   should not be restating — the FAB's 70ms stagger, and a visibility
   delay that differs between its two states. .wa-float has no list
   worth keeping: it is re-declared in eight files (footer.php,
   footer-listing.php, header.php and the five standalone templates),
   none of which knows about the banner, so its transition is set here
   with !important. */
@supports (translate:0px){
  html body .wa-float,
  html body #brg-fav-fab,
  html body #brg-mab{
    --brg-cb-h:0px;
    translate:0 calc(-1 * var(--brg-cb-lift,0px));
  }
  html body .wa-float{
    transition:transform .5s var(--ease,cubic-bezier(.16,1,.3,1)),
               opacity .6s var(--ease,cubic-bezier(.16,1,.3,1)),
               translate .62s cubic-bezier(.22,1,.36,1)!important;
  }
}

@media (prefers-reduced-motion:reduce){
  html body #iubenda-cs-banner *{ transition:none!important; }
  html body .wa-float,
  html body #brg-fav-fab,
  html body #brg-mab{ transition:none!important; }
}





/* ══ BRG DARK THEME — generated, additive; see header.php tokens ══ */

/* ──────────────────────────────────────────────────────────────────────────
   Every rule below is ADDITIVE and scoped to :where(:root[data-theme="dark"]).
   Nothing above this marker was modified, so light mode renders exactly as it
   did before dark mode existed.

   :where() contributes ZERO specificity on purpose. These rules therefore tie
   with the light-mode rules they shadow and win only on source order — which
   means a page template loading after header.php can still override them (that
   is what keeps the photo-hero nav white and transparent).
   ────────────────────────────────────────────────────────────────────────── */
:where(:root[data-theme="dark"]) body #iubenda-cs-banner #iubenda-cs-paragraph a{border-bottom:1px solid rgba(255,255,255,.6)!important}
:where(:root[data-theme="dark"]) body #iubenda-cs-banner .iubenda-cs-accept-btn:hover,:where(:root[data-theme="dark"]) body #iubenda-cs-banner .iubenda-cs-reject-btn:hover{color:var(--on-accent)!important}
/* ══ end BRG DARK THEME ══ */
