.shop-cart-toggle {
  flex: 0 0 auto;
  min-width: 92px;
  height: 40px;
  border: 1px solid rgba(240, 199, 133, 0.44);
  border-radius: 8px;
  padding: 0 10px;
  color: #f5dfb7;
  background: rgba(61, 43, 20, 0.48);
  font: inherit;
  cursor: pointer;
}

.shop-cart-toggle:hover,
.shop-cart-toggle:focus-visible {
  border-color: rgba(240, 199, 133, 0.82);
  background: rgba(84, 57, 24, 0.62);
}

.shop-cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 5px;
  border-radius: 11px;
  padding: 0 6px;
  color: #07111b;
  background: #f0c785;
  font-size: 12px;
  font-weight: 800;
}

.shop-purchase-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
}

.shop-purchase-actions .btn {
  width: 100%;
}

.shop-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0, 7, 13, 0.64);
  backdrop-filter: blur(2px);
}

.shop-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1100;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(460px, 100vw);
  height: 100dvh;
  border-left: 1px solid rgba(143, 217, 255, 0.3);
  color: #edf4fa;
  background: #091826;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 180ms ease;
  visibility: hidden;
}

.shop-cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

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

body.shop-cart-open .shop-cart-toggle {
  visibility: hidden;
}

.shop-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid rgba(143, 217, 255, 0.2);
  padding: 14px 18px;
  background: #0d2031;
}

.shop-cart-head small {
  color: #8fd9ff;
}

.shop-cart-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.shop-cart-icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(151, 193, 221, 0.34);
  border-radius: 8px;
  color: #edf4fa;
  background: #10273b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.shop-cart-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 16px 0;
  border: 1px solid rgba(143, 217, 255, 0.28);
  border-radius: 8px;
  padding: 9px 10px;
  color: #dceefa;
  background: #10283d;
  line-height: 1.5;
}

.shop-cart-message-action {
  flex: 0 0 auto;
  border: 0;
  padding: 2px 0;
  color: #f0c785;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.shop-cart-message.is-error {
  border-color: rgba(237, 132, 132, 0.48);
  color: #ffd6d6;
  background: #351c25;
}

.shop-cart-items {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
}

.shop-cart-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #9fb3c4;
  text-align: center;
}

.shop-cart-empty strong {
  color: #edf4fa;
  font-size: 17px;
}

.shop-cart-empty p {
  margin: 7px 0 14px;
}

.shop-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid rgba(143, 217, 255, 0.16);
  padding: 14px 0;
}

.shop-cart-item:first-child {
  padding-top: 0;
}

.shop-cart-item-name {
  margin: 0;
  color: #f4f8fb;
  font-size: 15px;
}

.shop-cart-item-paths {
  margin: 5px 0 0;
  overflow: hidden;
  color: #8ea6b9;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-cart-item-controls {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.shop-cart-item select,
.shop-cart-stepper input,
.shop-cart-coupon input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(151, 193, 221, 0.34);
  border-radius: 7px;
  padding: 0 9px;
  color: #edf4fa;
  background: #071521;
  font: inherit;
}

.shop-cart-stepper {
  display: grid;
  grid-template-columns: 34px 48px 34px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(151, 193, 221, 0.34);
  border-radius: 7px;
  background: #071521;
}

.shop-cart-stepper button {
  border: 0;
  color: #dcebf7;
  background: #10273b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.shop-cart-stepper button:hover,
.shop-cart-stepper button:focus-visible {
  color: #07111b;
  background: #f0c785;
}

.shop-cart-stepper input {
  height: 36px;
  border: 0;
  border-right: 1px solid rgba(151, 193, 221, 0.22);
  border-left: 1px solid rgba(151, 193, 221, 0.22);
  border-radius: 0;
  padding: 0 3px;
  text-align: center;
  appearance: textfield;
}

.shop-cart-stepper input::-webkit-outer-spin-button,
.shop-cart-stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.shop-cart-duration {
  margin: 7px 0 0;
  color: #b7c8d5;
  font-size: 12px;
}

.shop-cart-item select:disabled,
.shop-cart-stepper input:disabled,
.shop-cart-stepper button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.shop-cart-item-price {
  min-width: 78px;
  color: #f0c785;
  text-align: right;
}

.shop-cart-item-price del {
  display: block;
  margin-bottom: 3px;
  color: #7f93a4;
  font-size: 12px;
}

.shop-cart-remove,
.shop-cart-text-btn {
  border: 0;
  padding: 0;
  color: #e9a4a4;
  background: transparent;
  cursor: pointer;
}

.shop-cart-remove {
  margin-top: 10px;
  font-size: 12px;
}

.shop-cart-footer {
  border-top: 1px solid rgba(143, 217, 255, 0.22);
  padding: 14px 16px 16px;
  background: #0d2031;
}

.shop-cart-coupon label {
  display: block;
  margin-bottom: 7px;
  color: #dcebf7;
  font-size: 13px;
}

.shop-cart-coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
}

.shop-cart-coupon-row .btn {
  height: 38px;
  padding: 0 10px;
}

.shop-cart-coupon small {
  display: block;
  min-height: 19px;
  margin-top: 5px;
  color: #8ea6b9;
}

.shop-cart-totals {
  margin-top: 12px;
  border-top: 1px dashed rgba(151, 193, 221, 0.25);
  padding-top: 8px;
}

.shop-cart-totals p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 7px 0;
  color: #b6c7d4;
}

.shop-cart-totals .discount strong {
  color: #8ed59b;
}

.shop-cart-totals .balance-after strong {
  color: #dcebf7;
}

.shop-cart-totals .total {
  align-items: baseline;
  color: #edf4fa;
  font-size: 16px;
}

.shop-cart-totals .total strong {
  color: #f0c785;
  font-size: 23px;
}

.shop-cart-checkout {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
}

.shop-cart-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.shop-cart-secondary-actions .btn {
  padding: 7px 12px;
}

.shop-cart-dialog {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: end stretch;
  padding: 16px;
  background: rgba(3, 12, 20, 0.76);
  backdrop-filter: blur(3px);
}

.shop-cart-dialog-panel {
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid rgba(143, 217, 255, 0.3);
  border-radius: 8px;
  padding: 16px;
  background: #0d2031;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.4);
}

.shop-cart-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-cart-dialog-head small {
  color: #8fd9ff;
}

.shop-cart-dialog-head h3 {
  margin: 3px 0 0;
  font-size: 21px;
}

.shop-cart-dialog-items {
  margin-top: 15px;
  border-top: 1px solid rgba(143, 217, 255, 0.18);
  border-bottom: 1px solid rgba(143, 217, 255, 0.18);
  padding: 6px 0;
}

.shop-cart-dialog-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 0;
}

.shop-cart-dialog-item strong,
.shop-cart-dialog-item span {
  overflow-wrap: anywhere;
}

.shop-cart-dialog-item small {
  display: block;
  margin-top: 3px;
  color: #8ea6b9;
}

.shop-cart-dialog-item > span {
  color: #f0c785;
  font-weight: 700;
}

.shop-cart-dialog-summary {
  padding: 10px 0 4px;
}

.shop-cart-dialog-summary p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0;
  color: #b6c7d4;
}

.shop-cart-dialog-summary .discount strong {
  color: #8ed59b;
}

.shop-cart-dialog-summary .total {
  align-items: baseline;
  color: #edf4fa;
}

.shop-cart-dialog-summary .total strong {
  color: #f0c785;
  font-size: 24px;
}

.shop-cart-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: 10px;
}

.shop-cart-dialog-actions .btn {
  min-height: 44px;
}

@media (max-width: 980px) {
  .topbar {
    gap: 8px;
  }

  .shop-cart-toggle {
    min-width: 74px;
  }
}

@media (max-width: 560px) {
  .topbar #currentUser {
    display: none;
  }

  .topbar #walletBalanceTop {
    font-size: 13px;
    white-space: nowrap;
  }

  .shop-cart-toggle {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 950;
    min-width: 104px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  }

  .shop-cart-drawer {
    width: 100vw;
  }

  .shop-purchase-actions,
  .shop-cart-item-controls {
    grid-template-columns: 1fr;
  }

  .shop-cart-stepper {
    width: 116px;
  }

  .shop-cart-dialog {
    padding: 10px;
  }
}
