/* WPC Fly Cart shortcode link in the header. */
.woofc-cart-link > a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  padding: 7px 23px 7px 33px;
  overflow: visible;
  border: 0;
  border-radius: 25px;
  background: #190d39;
  color: #fff !important;
  font-family: var(--ffehbo-font-family);
  font-size: var(--ffehbo-font-size-body);
  font-weight: 500;
  line-height: 26px;
  text-decoration: none !important;
  white-space: nowrap;
}

.woofc-cart-link > a::before,
.woofc-cart-link > a:before {
  content: "Winkelwagen";
  color: inherit;
}

.woofc-cart-link > a::after,
.woofc-cart-link > a:after {
  display: none;
  content: none;
}

/* The header button only needs the item count, not the subtotal. */
.woofc-cart-link-inner-subtotal {
  display: none !important;
}

.woofc-cart-link .woofc-cart-link-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.woofc-cart-link .woofc-cart-link-inner i {
  width: 20px;
  margin: 0;
  color: inherit;
  font-size: var(--ffehbo-font-size-body);
  line-height: 26px;
}

.woofc-cart-link .woofc-cart-link-inner::after,
.woofc-cart-link .woofc-cart-link-inner:after {
  position: absolute;
  top: -20px;
  right: -10px;
  left: auto;
  display: block;
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid rgba(25, 13, 57, 0.25);
  border-radius: 50%;
  background: #fcda98 !important;
  color: #000 !important;
  content: attr(data-count);
  font: 700 var(--ffehbo-font-size-meta)/22px var(--ffehbo-font-family);
  text-align: center;
}

.woofc-cart-link > a:focus-visible {
  outline: 2px solid #190d39;
  outline-offset: 4px;
}

/*
 * Keep the account control and cart shortcode together in the header.
 *
 * Target the shortcode by its contents instead of Elementor's generated
 * element ID. That ID changes when the header template is recreated or
 * imported, which otherwise makes Elementor's default block flow stack the
 * account control above the cart button.
 */
.cmsmasters-location-cmsmasters_header
  .elementor-shortcode:has(> .woofc-cart-link) {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.cmsmasters-location-cmsmasters_header
  .elementor-shortcode:has(> .woofc-cart-link) > * {
  flex-shrink: 0;
}

.cmsmasters-location-cmsmasters_header
  .elementor-widget-shortcode:has(.woofc-cart-link) {
  width: auto !important;
  min-width: max-content;
}

/* Hide the cart link when the site's hamburger navigation takes over. */
@media (max-width: 1180px) {
  .cmsmasters-location-cmsmasters_header .woofc-cart-link {
    display: none !important;
  }
}
