/* Persistent row counter */
.hm-row-counter {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 60;
  font-family: var(--wp--preset--font-family--sans);
}
.hm-row-counter--bottom-left {
  right: auto;
  left: max(1.25rem, env(safe-area-inset-left));
}
.hm-row-counter button {
  font: inherit;
  cursor: pointer;
}
.hm-row-counter__toggle {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: .35rem;
  border: 1px solid #d8c5e9;
  border-radius: 999px;
  background: #ffffff;
  color: #4a2468;
  box-shadow: 0 8px 26px rgba(48, 23, 71, .18);
  font-size: .88rem;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, width 160ms ease, padding 160ms ease;
}
.hm-row-counter__toggle.has-count {
  width: auto;
  min-width: 64px;
  gap: .35rem;
  padding-right: .75rem;
}
.hm-row-counter__toggle:hover,
.hm-row-counter__toggle:focus-visible {
  background: #f3eaff;
  box-shadow: 0 12px 30px rgba(48, 23, 71, .24);
  transform: translateY(-2px);
}
.hm-row-counter__icon { display: block; width: 32px; height: 32px; }
.hm-row-counter__badge {
  display: grid;
  min-width: 1.25rem;
  height: 32px;
  place-items: center;
  padding: 0;
  color: #4a2468;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hm-row-counter__badge[hidden] { display: none; }
.hm-row-counter__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .7rem);
  width: min(15.5rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid #d8c5e9;
  border-radius: 18px;
  background: #ffffff;
  color: #2d2434;
  box-shadow: 0 16px 42px rgba(48, 23, 71, .24);
  text-align: center;
}
.hm-row-counter--bottom-left .hm-row-counter__panel {
  right: auto;
  left: 0;
}
.hm-row-counter__panel[hidden] { display: none; }
.hm-row-counter__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .35rem;
}
.hm-row-counter__header p {
  margin: 0;
  color: #4a2468;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hm-row-counter__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #746a7c;
  font-size: 1.35rem;
  line-height: 1;
}
.hm-row-counter__close:hover,
.hm-row-counter__close:focus-visible { background: #f3eaff; color: #4a2468; }
.hm-row-counter__number {
  display: block;
  color: #4a2468;
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.hm-row-counter__caption {
  display: block;
  margin-top: .15rem;
  color: #746a7c;
  font-size: .82rem;
}
.hm-row-counter__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: 1rem;
}
.hm-row-counter__adjust {
  min-height: 48px;
  border: 1px solid #d8c5e9;
  border-radius: 12px;
  background: #f8f3fc;
  color: #4a2468;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.hm-row-counter__adjust:hover,
.hm-row-counter__adjust:focus-visible { background: #eadcf9; }
.hm-row-counter__adjust--increment {
  border-color: #6c38a5;
  background: #6c38a5;
  color: #ffffff;
}
.hm-row-counter__adjust--increment:hover,
.hm-row-counter__adjust--increment:focus-visible { background: #562b82; }
.hm-row-counter__shortcut {
  margin: .7rem 0 0;
  color: #746a7c;
  font-size: .72rem;
  line-height: 1.4;
}
.hm-row-counter__shortcut kbd {
  display: inline-block;
  min-width: 1.25rem;
  padding: .03rem .25rem;
  border: 1px solid #d8c5e9;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f8f3fc;
  color: #4a2468;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}
.hm-row-counter__adjust:disabled,
.hm-row-counter__reset:disabled { cursor: not-allowed; opacity: .45; }
.hm-row-counter__reset {
  width: 100%;
  min-height: 38px;
  margin-top: .7rem;
  padding: .35rem .5rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6c38a5;
  font-size: .82rem;
  font-weight: 700;
}
.hm-row-counter__reset:not(:disabled):hover,
.hm-row-counter__reset:not(:disabled):focus-visible { background: #f3eaff; }

@media (max-width:781px) {
  .hm-row-counter {
    right: max(.85rem, env(safe-area-inset-right));
    bottom: max(.85rem, env(safe-area-inset-bottom));
  }
  .hm-row-counter--bottom-left {
    right: auto;
    left: max(.85rem, env(safe-area-inset-left));
  }
  .hm-row-counter__toggle { width: 48px; height: 48px; }
}

