/* Shared interaction and readability layer for every public page. */
:root {
  --uts-button-blue: #174f9f;
  --uts-button-blue-hover: #123d72;
  --uts-button-focus: #e6a632;
  --uts-button-radius: 10px;
}

/* Keep paragraph emphasis readable without the visual weight of bold spans. */
body p strong,
body p b,
body p.uts-routine-lede strong,
body p.uts-routine-lede b {
  font-weight: 500 !important;
}

/* Three reusable size tiers for authored and existing calls to action. */
.uts-button--large,
.uts-button--small,
.uts-button--extra-small,
a.button:not(.added_to_cart),
button.button,
input.button,
input[type="submit"],
button[type="submit"],
.elementor-widget-button .elementor-button,
.wp-block-button__link,
.wpcf7-submit,
.uts-hero-cta,
.uts-motion-cta,
.uts-home-reviews-link,
.uts-shop-active-filter-banner__clear,
.uts-bundle-add-to-cart,
.uts-review-form__submit,
.uts-method-join-button,
.uts-footer-fallback-form button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px !important;
  padding: 0 20px !important;
  border: 1px solid transparent !important;
  border-radius: var(--uts-button-radius) !important;
  background-color: var(--uts-button-blue) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  line-height: 1.2 !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.uts-button--large,
.uts-button--small,
.uts-button--extra-small { width: fit-content; }

.uts-button--large,
.uts-hero-cta,
.uts-motion-cta {
  min-height: 54px !important;
  padding-inline: 26px !important;
  font-size: 13px !important;
}

.uts-button--small,
a.button:not(.added_to_cart),
button.button,
input.button,
input[type="submit"],
button[type="submit"],
.elementor-widget-button .elementor-button,
.wp-block-button__link,
.wpcf7-submit,
.uts-home-reviews-link,
.uts-shop-active-filter-banner__clear,
.uts-review-form__submit,
.uts-method-join-button,
.uts-footer-fallback-form button {
  min-height: 46px !important;
  padding-inline: 20px !important;
}

.uts-button--extra-small,
.uts-bundle-add-to-cart {
  min-height: 38px !important;
  padding-inline: 14px !important;
  font-size: 11px !important;
}

a.button:not(.added_to_cart):hover,
button.button:hover,
input.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.elementor-widget-button .elementor-button:hover,
.wp-block-button__link:hover,
.wpcf7-submit:hover,
.uts-hero-cta:hover,
.uts-motion-cta:hover,
.uts-home-reviews-link:hover,
.uts-shop-active-filter-banner__clear:hover,
.uts-bundle-add-to-cart:hover,
.uts-review-form__submit:hover,
.uts-method-join-button:hover,
.uts-footer-fallback-form button:hover,
.uts-button--large:hover,
.uts-button--small:hover,
.uts-button--extra-small:hover {
  border-color: var(--uts-button-blue-hover) !important;
  background-color: var(--uts-button-blue-hover) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(18, 61, 114, .16);
  transform: translateY(-1px);
}

a.button:not(.added_to_cart):focus-visible,
button.button:focus-visible,
input.button:focus-visible,
input[type="submit"]:focus-visible,
button[type="submit"]:focus-visible,
.elementor-widget-button .elementor-button:focus-visible,
.wp-block-button__link:focus-visible,
.wpcf7-submit:focus-visible,
.uts-hero-cta:focus-visible,
.uts-motion-cta:focus-visible,
.uts-home-reviews-link:focus-visible,
.uts-shop-active-filter-banner__clear:focus-visible,
.uts-bundle-add-to-cart:focus-visible,
.uts-review-form__submit:focus-visible,
.uts-method-join-button:focus-visible,
.uts-footer-fallback-form button:focus-visible,
.uts-button--large:focus-visible,
.uts-button--small:focus-visible,
.uts-button--extra-small:focus-visible {
  outline: 3px solid var(--uts-button-focus) !important;
  outline-offset: 3px;
}

/* The language selector floats just below the header (mounted on <body> by
 * sitewide-polish.js so the sticky header cannot carry it over its links). */
.uts-language-float.uts-language-float--header {
  position: fixed !important;
  top: 138px !important;
  right: clamp(14px, 2vw, 28px) !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 100001 !important;
  display: block !important;
  width: max-content;
  margin: 0;
  direction: ltr;
  font-family: inherit;
}

body.admin-bar .uts-language-float.uts-language-float--header { top: 170px !important; }

/* Sit just below the header so the control never covers header links: the
 * desktop header is 126px tall, the tablet/mobile header 98px (plus the admin
 * bar for logged-in users: 32px, or 46px at 782px and below). */
@media (max-width: 1024px) {
  .uts-language-float.uts-language-float--header { top: 110px !important; }
  body.admin-bar .uts-language-float.uts-language-float--header { top: 142px !important; }
}
@media (max-width: 782px) {
  body.admin-bar .uts-language-float.uts-language-float--header { top: 156px !important; }
}

/* Replace the theme's flag-based top-bar switcher with the text control above. */
.whb-top-bar .wpml-ls { display: none !important; }

.uts-language-float--header .uts-language-float__toggle {
  min-width: 54px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  background: rgba(23, 79, 159, .82) !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .08em;
  box-shadow: 0 8px 20px rgba(13, 47, 94, .22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.uts-language-float--header .uts-language-float__toggle:hover,
.uts-language-float--header .uts-language-float__toggle:focus-visible {
  background: rgba(18, 61, 114, .94) !important;
  outline: 2px solid var(--uts-button-blue);
  outline-offset: 2px;
  transform: none;
}

.uts-language-float--header .uts-language-float__menu {
  top: calc(100% + 7px);
  right: 0;
  bottom: auto;
}

/* Right-to-left pages place the control at the left edge, so open the menu
 * from the button's left edge to keep it on screen. */
html[dir="rtl"] .uts-language-float--header .uts-language-float__menu {
  right: auto;
  left: 0;
}

.uts-language-float--header .uts-language-float__menu a {
  color: #173e7a !important;
}

.whb-top-bar .uts-language-slot,
.whb-general-header .uts-language-slot {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
}

/* Language names remain text links; remove any flags from theme/WPML switchers. */
.wpml-ls-flag,
.wpml-ls-legacy-list-horizontal img,
.wpml-ls-legacy-dropdown img {
  display: none !important;
}

/* Keep supporting copy legible on narrow screens without resizing headings or controls. */
@media (max-width: 767px) {
  .uts-hero-copy,
  .uts-motion-body,
  .uts-method-copy-live p,
  body.uts-method-page .uts-method-series-body,
  body.woodmart-archive-shop .uts-shop-series-feature .uts-method-series-body,
  body.single-product .woocommerce-product-details__short-description,
  body.single-product .woocommerce-product-details__short-description p,
  .wpcf7 form p,
  .elementor-widget-text-editor p {
    font-size: max(14px, 1em) !important;
    line-height: 1.55 !important;
  }

  .uts-button--large,
  .uts-hero-cta,
  .uts-motion-cta { min-height: 50px !important; padding-inline: 19px !important; }

  .uts-button--small,
  a.button:not(.added_to_cart),
  button.button,
  input.button,
  input[type="submit"],
  button[type="submit"],
  .elementor-widget-button .elementor-button,
  .wp-block-button__link,
  .wpcf7-submit { min-height: 44px !important; padding-inline: 16px !important; }

  .uts-button--extra-small,
  .uts-bundle-add-to-cart { min-height: 36px !important; padding-inline: 11px !important; font-size: 10px !important; }

  .whb-general-header .uts-language-slot { justify-content: flex-end; }
  .uts-language-float.uts-language-float--header { top: 110px !important; right: 12px !important; }
  body.admin-bar .uts-language-float.uts-language-float--header { top: 156px !important; }
}

/* Reduce the carousel to clear slide indicators and one accessible motion control. */
.uts-hero-arrow { display: none !important; }
.uts-hero-count { display: none !important; }
.uts-hero-controls { gap: 8px; padding: 5px 8px; border-radius: 999px; box-shadow: 0 5px 18px rgba(8, 39, 78, .12); }
.uts-hero-dots { gap: 7px; }
.uts-hero-dot { width: 20px; height: 24px; }
.uts-hero-dot:after { left: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #8296ad; transform: none; }
.uts-hero-dot.is-active:after { background: var(--uts-button-blue); transform: scale(1.15); }
.uts-hero-toggle { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(23, 79, 159, .08); }
.uts-motion-controls { gap: 5px; padding: 4px 8px; border-radius: 999px; background: rgba(16, 59, 112, .76); }
.uts-motion-dot { width: 22px; height: 28px; overflow: hidden; font-size: 0 !important; }
.uts-motion-dot:after { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .58); content: ""; }
.uts-motion-dot.is-active:after { width: 9px; height: 9px; background: #fff; }
.uts-motion-toggle { width: 30px; height: 30px; margin-left: 3px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; }

@media (prefers-reduced-motion: reduce) {
  .uts-button--large,
  .uts-button--small,
  .uts-button--extra-small,
  a.button,
  button.button,
  input[type="submit"] { transition: none; }
}

/* Keep long Swedish compound words inside the mobile homepage hero card. */
@media (max-width: 767px) {
  html[lang^="sv"] .uts-motion-hero .uts-motion-copy h2 {
    font-size: clamp(29px, 9vw, 38px) !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}
