/* PRE-LAUNCH: switcher hidden (translations stay built). GO-LIVE TODO: delete this rule. */
html .bx-lang,html .bx-lang.bx-lang--mobile,html .bx-lang.bx-lang--top{display:none !important;}

/* ==================================================================
   Bodotex language switcher — flag dropdown in the header.
   Self-contained; injected on every page by _tools/i18n/build.py.
   ================================================================== */
.bx-lang{position:relative;display:inline-flex;align-items:center;font-family:"Poppins","Raleway",system-ui,-apple-system,Segoe UI,sans-serif;z-index:1200;}

/* ---- sticky header ------------------------------------------------
   The whole header sticks so the language control never scrolls away.
   On tablet/phone the dark utility bar is hidden by Elementor, so only
   the white logo/nav row sticks there. */
body > header[data-elementor-type="header"]{
  position:sticky;top:0;z-index:1000;
  box-shadow:0 1px 0 rgba(17,22,40,.06);
}
/* keep Elementor's own sticky/overlay bits from sitting above the header */
body > header[data-elementor-type="header"] .elementor-element{--z-index:auto;}

/* Desktop placement: in the white header row, just before "Contact us".
   Flag-only — the language name lives in the dropdown, so no EN/DK label
   competing with the nav for attention. */
.bx-lang--top{margin:0 14px 0 0;}
.bx-lang--top .bx-lang__code{display:none;}
.bx-lang--top .bx-lang__btn{color:#111628;border-color:rgba(17,22,40,.18);padding:7px 8px;gap:5px;}
.bx-lang--top .bx-lang__btn:hover{border-color:rgba(17,22,40,.38);background:rgba(17,22,40,.04);}
.bx-lang--top .bx-flag{width:24px;height:17px;flex-basis:24px;}

/* Mobile placement: on the same row as the hamburger, vertically centred */
.bx-lang--mobile{display:none;}
@media (max-width:1024px){
  /* the nav widget holds the (hidden) menu, the switcher and the burger toggle;
     force them into one right-aligned row so flag + burger sit side by side
     (!important to beat Elementor's own container rules) */
  .elementor-element-37707d3.elementor-widget-nav-menu > .elementor-widget-container{
    display:flex !important;flex-direction:row !important;
    align-items:center;justify-content:flex-end;flex-wrap:nowrap;
  }
  .elementor-element-37707d3.elementor-widget-nav-menu > .elementor-widget-container > nav.elementor-nav-menu--main{
    display:none !important;
  }
  /* the desktop flag must not stack above the burger on mobile/tablet */
  .bx-lang--top{display:none !important;}
  .bx-lang--mobile{display:inline-flex !important;margin:0 10px 0 0 !important;order:1;}
  /* flag-only on mobile too, matching the desktop control */
  .bx-lang--mobile .bx-lang__code{display:none;}
  .bx-lang--mobile .bx-flag{width:24px;height:17px;flex-basis:24px;}
  .elementor-menu-toggle{margin:0 !important;position:static !important;order:2;align-self:center;}
  /* keep the pill dark-on-light; don't inherit the theme's link colour */
  .bx-lang.bx-lang--mobile .bx-lang__btn{color:#1a2238 !important;border-color:rgba(17,22,40,.22) !important;}
}
.bx-lang__btn{display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  background:transparent;border:1px solid rgba(17,22,40,.16);border-radius:8px;
  padding:6px 9px;font-size:13px;font-weight:600;line-height:1;color:#111628;
  transition:border-color .18s ease,background-color .18s ease;}
.bx-lang__btn:hover{border-color:rgba(17,22,40,.36);background:rgba(17,22,40,.03);}
.bx-lang__btn:focus-visible{outline:2px solid #007E4C;outline-offset:2px;}
.bx-lang__chev{transition:transform .2s ease;opacity:.6;}
.bx-lang[data-open="true"] .bx-lang__chev{transform:rotate(180deg);}
.bx-lang__code{font-size:12px;font-weight:600;letter-spacing:.04em;line-height:1;}

.bx-flag{display:inline-block;width:20px;height:14px;flex:0 0 20px;border-radius:2px;
  background-size:cover;background-position:center;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.10);}
.bx-flag--gb{background-image:url(/wp-content/custom/flags/gb.svg);}
.bx-flag--dk{background-image:url(/wp-content/custom/flags/dk.svg);}
.bx-flag--se{background-image:url(/wp-content/custom/flags/se.svg);}
.bx-flag--no{background-image:url(/wp-content/custom/flags/no.svg);}
.bx-flag--fi{background-image:url(/wp-content/custom/flags/fi.svg);}

.bx-lang__menu{position:absolute;top:calc(100% + 8px);right:0;min-width:186px;margin:0;padding:6px;
  list-style:none;background:#fff;border:1px solid #E6EAF1;border-radius:12px;
  box-shadow:0 12px 34px rgba(17,22,40,.16);
  opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;}
.bx-lang[data-open="true"] .bx-lang__menu{opacity:1;visibility:visible;transform:none;}
.bx-lang__menu a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;
  text-decoration:none;color:#111628;font-size:14px;font-weight:500;line-height:1;
  transition:background-color .15s ease;}
.bx-lang__menu a:hover{background:#F5F8FC;}
.bx-lang__menu a[aria-current="true"]{background:#eef4ee;font-weight:600;}
.bx-lang__name{flex:1 1 auto;}
.bx-lang__abbr{font-size:11px;letter-spacing:.06em;color:#8a93a6;font-weight:600;}
.bx-lang__menu .bx-lang__abbr{margin-left:auto;}

/* header spacing tweaks so it sits nicely next to the Contact button */
@media (max-width:1024px){
  .bx-lang{margin:0 8px;}
  .bx-lang__btn{padding:6px 8px;}
}
@media (max-width:767px){
  .bx-lang__menu{right:0;left:auto;max-width:calc(100vw - 24px);}
}
@media (prefers-reduced-motion:reduce){
  .bx-lang__chev,.bx-lang__menu{transition:none;}
}
