.pos-cart-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #ffd2c5;
  border-radius: 12px;
  background: #fff2ed;
  color: #d94e31;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.pos-cart-trigger:hover {
  background: #ffe7de;
  border-color: #ffbda9;
}

.pos-cart-trigger:active {
  transform: translateY(1px);
}

.pos-cart-trigger:focus-visible,
.pos-cart-close:focus-visible {
  outline: 3px solid rgba(240, 100, 69, .32);
  outline-offset: 2px;
}

.pos-cart-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pos-cart-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #f06445;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

body.pos-cart-open {
  overflow: hidden;
}

.pos-cart-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  background: rgba(4, 18, 29, .52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.pos-cart-drawer {
  position: relative;
  top: auto;
  display: flex;
  flex: 0 1 440px;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: 100%;
  margin-left: auto;
  overflow: hidden;
  animation: pos-cart-enter 180ms ease-out;
}

.pos-cart-drawer .cart-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pos-cart-drawer .cart-head h2 {
  margin: 0 0 4px;
}

.pos-cart-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pos-cart-close:hover {
  background: rgba(255, 255, 255, .2);
}

.pos-cart-drawer .cart-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@keyframes pos-cart-enter {
  from {
    opacity: 0;
    transform: translateX(16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 600px) {
  .pos-cart-backdrop {
    padding: 0;
  }

  .pos-cart-drawer {
    width: min(440px, 100vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 16px 0 0 16px;
  }

  .pos-cart-trigger {
    min-height: 40px;
    padding: 7px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pos-cart-trigger {
    transition: none;
  }

  .pos-cart-drawer {
    animation: none;
  }
}
