/*
 * rml-menu-cart: the header cart (#12), as the live Menu Cart widget 70f013f
 * (side cart, count bubble, no subtotal on the icon). Measured at 1440px on
 * 2026-11-21.
 *
 * Icon: 25px in grey with 10px around it (a 45px target), orange on hover and
 * focus; 0 15px 13px 5px around it at 1200px and below; 20px with 0 10px at
 * 767px and below. Count: an orange 16px circle with the number in white 10px
 * type, 8px above and past the icon's top right corner.
 *
 * Side cart: the page dims (black 25%) and a 350px white drawer slides in from
 * the right (shadow 0 0 20px, padding 20px 30px, 14px type), a 25px grey cross
 * top right. Products: image in the first 28%, name in black 16px (orange on
 * hover), quantity and price in charcoal, a round remove button. Subtotal in
 * charcoal 20px 600, centred between two rules. View cart and Checkout: orange
 * pills, white uppercase, charcoal on hover, side by side.
 *
 * The drawer's contents are WooCommerce's mini cart as Elementor Pro's template
 * draws it (its mini cart template option is on); WooCommerce's own markup is
 * styled at the end, should that option be turned off.
 */

.rml-menu-cart {
  display: inline-block;
  line-height: 0;
}

.rml-menu-cart__toggle {
  position: relative;
  display: inline-flex;
  padding: 10px;
  color: var(--neutral-500);
  text-decoration: none;
  transition: color 0.1s;
}

.rml-menu-cart__toggle:is(:hover, :focus-visible) {
  color: var(--brand-primary);
}

.rml-menu-cart__toggle:focus-visible,
.rml-menu-cart__close:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.rml-menu-cart__icon {
  display: block;
  width: 25px;
  height: 25px;
}

.rml-menu-cart__status {
  position: absolute;
  top: calc(var(--rml-menu-cart-pad-top, 10px) - 8px);
  right: calc(var(--rml-menu-cart-pad-right, 10px) - 8px);
  line-height: 0;
}

.rml-menu-cart__count {
  display: block;
  box-sizing: border-box;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.2em;
  border-radius: 0.8em;
  background-color: var(--brand-primary);
  color: var(--white);
  font-family: var(--font-heading), sans-serif;
  font-size: 10px;
  line-height: 1.6em;
  text-align: center;
}

.rml-menu-cart__text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .rml-menu-cart__toggle {
    --rml-menu-cart-pad-top: 0px;
    --rml-menu-cart-pad-right: 15px;
    padding: 0 15px 13px 5px;
  }
}

@media (max-width: 767px) {
  .rml-menu-cart__toggle {
    --rml-menu-cart-pad-right: 10px;
    padding: 0 10px;
  }

  .rml-menu-cart__icon {
    width: 20px;
    height: 20px;
  }
}

/* ---------- Side cart ---------- */

.rml-menu-cart__panel {
  position: fixed;
  z-index: 9998;
  inset: 0;
  background-color: color-mix(in srgb, var(--black) 25%, transparent);
  line-height: normal;
  visibility: visible;
  transition: background-color 0.4s;
}

.rml-menu-cart:not(.is-open) .rml-menu-cart__panel {
  background-color: transparent;
  visibility: hidden;
  transition: background-color 0.4s, visibility 0s 0.4s;
}

.rml-menu-cart__drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 350px;
  max-width: 100%;
  min-height: 200px;
  padding: 20px 30px;
  background-color: var(--white);
  box-shadow: 0 0 20px color-mix(in srgb, var(--black) 20%, transparent);
  color: var(--black);
  font-family: var(--font-heading), sans-serif;
  font-size: 14px;
  text-align: start;
  transform: translateX(0);
  transition: transform 0.3s, opacity 0.3s;
}

.rml-menu-cart:not(.is-open) .rml-menu-cart__drawer {
  opacity: 0;
  transform: translateX(100%);
}

.rml-menu-cart__close {
  align-self: flex-end;
  display: block;
  flex: none;
  width: 25px;
  height: 25px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--neutral-500);
  cursor: pointer;
}

.rml-menu-cart__close svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rml-menu-cart__panel .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rml-menu-cart__panel .woocommerce-mini-cart__empty-message {
  margin: 0;
}

/* Elementor Pro's mini cart template */

.rml-menu-cart__panel .elementor-menu-cart__products {
  max-height: calc(100vh - 240px);
  overflow: hidden auto;
}

.rml-menu-cart__panel .elementor-menu-cart__product {
  position: relative;
  display: grid;
  grid-template-columns: 28% auto;
  grid-template-rows: auto auto;
  padding: 0 30px 20px 0;
  border-bottom: 1px solid var(--neutral-300);
}

.rml-menu-cart__panel .elementor-menu-cart__product:not(:first-of-type) {
  padding-top: 20px;
}

.rml-menu-cart__panel .elementor-menu-cart__product-image {
  grid-row: 1 / 3;
  width: 100%;
}

.rml-menu-cart__panel .elementor-menu-cart__product-image :is(a, img) {
  display: block;
  width: 100%;
  height: auto;
}

.rml-menu-cart__panel :is(.elementor-menu-cart__product-name, .elementor-menu-cart__product-price) {
  grid-column: 2 / 3;
  margin: 0;
  padding-inline-start: 20px;
  font-size: 14px;
}

.rml-menu-cart__panel .elementor-menu-cart__product-name {
  font-size: 16px;
}

.rml-menu-cart__panel .elementor-menu-cart__product-name a {
  color: var(--black);
  text-decoration: none;
  transition: color 0.3s;
}

.rml-menu-cart__panel .elementor-menu-cart__product-name a:is(:hover, :focus-visible) {
  color: var(--brand-primary);
}

.rml-menu-cart__panel .elementor-menu-cart__product-price {
  align-self: end;
  color: var(--neutral-800);
  font-weight: 300;
}

.rml-menu-cart__panel .elementor-menu-cart__product-price .product-quantity {
  color: var(--black);
}

.rml-menu-cart__panel .elementor-menu-cart__product-remove {
  position: absolute;
  right: 0;
  bottom: 20px;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border: 1px solid var(--neutral-300);
  border-radius: 50%;
}

.rml-menu-cart__panel .elementor-menu-cart__product-remove::before,
.rml-menu-cart__panel .elementor-menu-cart__product-remove::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 25%;
  width: 50%;
  height: 1px;
  margin-top: -1px;
  background: var(--neutral-500);
}

.rml-menu-cart__panel .elementor-menu-cart__product-remove::before {
  transform: rotate(45deg);
}

.rml-menu-cart__panel .elementor-menu-cart__product-remove::after {
  transform: rotate(-45deg);
}

.rml-menu-cart__panel .elementor-menu-cart__product-remove > a {
  position: absolute;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.rml-menu-cart__panel .elementor-menu-cart__product-remove > a.elementor_remove_from_cart_button {
  display: none;
}

.rml-menu-cart__panel .elementor-menu-cart__subtotal {
  padding: 20px 0;
  border-top: 1px solid var(--neutral-300);
  border-bottom: 1px solid var(--neutral-300);
  color: var(--neutral-800);
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.rml-menu-cart__panel .elementor-menu-cart__footer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 20px;
  font-size: 20px;
  text-align: center;
}

.rml-menu-cart__panel .elementor-menu-cart__footer-buttons .elementor-button,
.rml-menu-cart__panel .woocommerce-mini-cart__buttons .button {
  display: inline-block;
  height: fit-content;
  padding: 15px;
  border-radius: 50px;
  font-size: 16px;
  line-height: 1;
  background-color: var(--brand-primary);
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
}

.rml-menu-cart__panel .elementor-menu-cart__footer-buttons .elementor-button:is(:hover, :focus-visible),
.rml-menu-cart__panel .woocommerce-mini-cart__buttons .button:is(:hover, :focus-visible) {
  background-color: var(--neutral-800);
  color: var(--white);
}

@media (max-width: 767px) {
  .rml-menu-cart__panel .elementor-menu-cart__footer-buttons .elementor-button {
    padding-right: 10px;
    padding-left: 10px;
  }
}

/* WooCommerce's own mini cart markup (Elementor Pro's template off) */

.rml-menu-cart__panel .woocommerce-mini-cart {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rml-menu-cart__panel .woocommerce-mini-cart__total {
  padding: 20px 0;
  border-top: 1px solid var(--neutral-300);
  border-bottom: 1px solid var(--neutral-300);
  color: var(--neutral-800);
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.rml-menu-cart__panel .woocommerce-mini-cart__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .rml-menu-cart__panel,
  .rml-menu-cart__drawer,
  .rml-menu-cart:not(.is-open) .rml-menu-cart__panel {
    transition: none;
  }
}

/* Theme guard (#13). Hello Elementor's reset gives every button a pink
   background and white text on :hover and :focus ([type=button]:hover,
   specificity 0,2,0), and the Design guide doesn't load that reset, so its
   samples never showed it. These rules (html button[type]:where(...), 0,2,2)
   beat the theme and restate this element's own resting and state colours;
   rules with three or more classes (open, current) still win over them. */
html button[type]:where(.rml-menu-cart__toggle, .rml-menu-cart__close):is(:hover, :focus) {
  background-color: transparent;
}

html button[type]:where(.rml-menu-cart__toggle):focus:where(:not(:focus-visible)),
html button[type]:where(.rml-menu-cart__close):is(:hover, :focus) {
  color: var(--neutral-500);
}

html button[type]:where(.rml-menu-cart__toggle):is(:hover, :focus-visible) {
  color: var(--brand-primary);
}
