:root {
  --scw-width: 420px;
  --scw-bg: #ffffff;
  --scw-text: #1b1b1b;
  --scw-accent: #000000;
  --scw-border: #e5e5e5;
  --scw-font-size: 14px;
  --scw-overlay: 0.5;
  --scw-card-shadow: 0 2px 2px #00000005;
}

.scw-markup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  font-size: calc(var(--scw-font-size) + 2px);
}

.scw-markup * {
  box-sizing: border-box;
}

.scw-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--scw-overlay));
  opacity: 0;
  transition: opacity 200ms ease;
}

.scw-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--scw-width);
  background: var(--scw-bg);
  color: var(--scw-text);
  box-shadow: 0 2px 2px #00000005;
  transform: translateX(100%);
  transition: transform 260ms ease;
  display: flex;
  flex-direction: column;
}

.scw-open-from-left .scw-panel {
  left: 0;
  transform: translateX(-100%);
}

.scw-open-from-right .scw-panel {
  right: 0;
}

body.scw-cart-open .scw-markup {
  pointer-events: auto;
}

body.scw-cart-open .scw-overlay {
  opacity: 1;
}

body.scw-cart-open .scw-open-from-right .scw-panel {
  transform: translateX(0);
}

body.scw-cart-open .scw-open-from-left .scw-panel {
  transform: translateX(0);
}

.scw-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.scw-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid var(--scw-border);
  position: relative;
}

.scw-header-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.scw-header-icon {
  display: inline-flex;
  color: #000;
}

.scw-header-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.scw-close {
  border: none;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.scw-progress {
  padding: 12px 16px;
  border-bottom: 1px solid var(--scw-border);
}

.scw-progress-track {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
}

.scw-progress-fill {
  height: 100%;
  background: var(--scw-accent);
}

.scw-progress-message {
  margin-top: 8px;
  font-size: 14px;
  color: #444;
}

.scw-body {
  flex: 1;
  overflow-y: auto;
  background-color: #f8f9fa;
}

.scw-products {
  padding: 12px 16px 0;
  display: grid;
}

.scw-layout-card .scw-products {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.scw-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  padding: 16px;
  border-radius: 5px;
  align-items: start;
  background: #fff;
  box-shadow: 0 2px 2px #00000005;
  gap: 12px;
  padding: 15px 20px;
  margin-bottom: 12px;
}

.scw-item-image img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.scw-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scw-item-name a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.scw-item-meta {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

.scw-item-meta p {
  margin: 0;
}

.scw-item-meta dl,
.scw-item-meta dt,
.scw-item-meta dd {
  margin: 0;
}

.scw-item-meta dt,
.scw-item-meta dd {
  display: inline-block;
}

.scw-item-meta dt {
  font-weight: 600;
}

.scw-item-meta dd {
  margin-left: 4px;
}


.scw-item-pricing {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}

.scw-item-left {
  display: grid;
  gap: 6px;
}

.scw-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 56px;
  align-self:end;
}

.scw-item-pricing.scw-separate {
  flex-direction: column;
}

.scw-item-qty {
  display: inline-flex;
  align-items: center;
}

.scw-item-qty input {
  height:15px;
  width: 36px;
  padding: 4px 0;
  text-align: center;
  border: none;
  background: transparent;
  -moz-appearance: textfield;
}

.scw-item-qty input::-webkit-outer-spin-button,
.scw-item-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.scw-qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
}

.scw-item-total {
  font-weight: 600;
}

.scw-remove {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.scw-gift-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  background: #e7f4ff;
  color: #0b5fff;
  font-size: 13px;
  font-weight: 600;
}

.scw-footer {
  border-top: 1px solid var(--scw-border);
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
}

.scw-totals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
  padding-bottom: 12px;
}

.scw-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scw-total-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight:600;
}

.scw-toggle-slider {
  border: none;
  background: transparent;
  color: var(--scw-accent);
  cursor: pointer;
}

.scw-coupon-row button,
.scw-coupon-remove {
  background: none;
  border: none;
  color: var(--scw-accent);
  cursor: pointer;
}

.scw-coupons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.scw-payment-buttons {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.scw-payment-button {
  padding: 8px 0;
}

.scw-payment-buttons,
.scw-payment-button,
.scw-payment-button * {
  width: 100%;
}


.scw-footer-buttons {
  display: flex;
  flex-direction: column;
}

.scw-footer-buttons .scw-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.scw-btn {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--scw-accent);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
}

.scw-btn-primary {
  background: var(--scw-accent);
  color: #fff;
}

.scw-btn-outline {
  background: transparent;
  color: var(--scw-accent);
}

.scw-btn-text {
  border: none;
  background: transparent;
  color: var(--scw-text);
}

.scw-empty {
  text-align: center;
  padding: 40px 16px;
}

.scw-shortcode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--scw-accent);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}

.scw-floating-trigger {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.scw-notices {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 320px;
}

.scw-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.scw-notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f5f5;
  font-size: 15px;
}

.scw-notice-error {
  background: #ffe5e5;
  color: #8a1f11;
}

.scw-notice-success {
  background: #e8f7ee;
  color: #146c2e;
}

.scw-slider {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 10001;
}

.scw-slider-panel {
  background: var(--scw-bg);
  color: var(--scw-text);
  padding: 20px;
  border-radius: 16px;
  width: min(90vw, 420px);
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.scw-slider-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

body.scw-slider-open .scw-slider {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .scw-panel {
    width: 100%;
  }

  .scw-floating-trigger {
    right: 12px;
    bottom: 12px;
  }

  .scw-products {
    padding: 12px;
  }
}

/* Custom legacy style mapping */
.scw-header-basket,
.scw-shortcode-count {
  display: none !important;
}

.scw-container,
.scw-slider,
.scw-header,
.scw-body,
.scw-footer {
  -webkit-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  -moz-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  -o-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scw-header {
  transform: translateY(60px);
  opacity: 0;
}

body.scw-cart-open .scw-header {
  opacity: 1;
  transform: translateY(0px);
}

.scw-body {
  transition: transform 1s cubic-bezier(.165,.84,.44,1) .22s, opacity 1s cubic-bezier(.165,.84,.44,1) .32s;
  -webkit-transition: transform 1s cubic-bezier(.165,.84,.44,1) .22s, opacity 1s cubic-bezier(.165,.84,.44,1) .32s;
  opacity: 0;
  transform: translateY(60px);
  -webkit-backface-visibility: hidden;
}

body.scw-cart-open .scw-body {
  opacity: 1;
  transform: translateY(0px);
}

.scw-footer {
  transition: transform 1s cubic-bezier(.165,.84,.44,1) .34s, opacity 1s cubic-bezier(.165,.84,.44,1) .44s;
  opacity: 0;
  transform: translateY(60px);
}

body.scw-cart-open .scw-footer {
  opacity: 1;
  transform: translateY(0px);
}

.scw-cart-trigger {
  cursor: pointer;
}

.scw-panel {
  max-width: 350px;
  width: 350px;
}

.scw-footer-buttons a.scw-btn-outline {
  display: none;
}

.scw-footer-text {
  font-size: 75%;
}

.scw-footer {
  padding: 15px 20px;
}

.__PrivateStripeElement,
.wc-stripe-payment-request-mini-cart,
.widget_shopping_cart_content {
  width: 100% !important;
  left: 0;
}

.scw-payment-buttons > * {
  padding-right: 0;
  width: 100% !important;
  left: 0;
}

#ppc-button-minicart {
  display: none !important;
}

.payment_box.payment_method_ppcp,
.payment_box.payment_method_klarna_payments_pay_over_time {
  display: none !important;
}

.scw-item-price {
  text-transform: uppercase;
  font-size: 0.7em;
  font-weight: 400;
}

.scw-item-price::before {
  content: 'Price: ';
  font-weight: 600;
}

.scw-item-price .woocommerce-Price-amount.amount bdi {
  font-size: 0.9em;
}

.scw-footer-buttons .scw-btn-text {
  background-color: transparent;
  color: #555;
  border: 2px solid #555;
  padding: 10px 20px;
  border-radius: 0.2em;
}

.scw-footer-buttons .scw-btn-primary {
  border-radius: 0.2em;
  border: 2px solid black;
}

.scw-item-name img {
  display: none;
}

.scw-total-row.scw-total-total {
  border-top: none;
  margin-top: 5px;
  padding-top: 5px;
}

.scw-item-qty input {
  background: #fff !important;
  border: none;
}

/* SVG icon mapping from legacy selectors */
.scw-header-icon::before,
.scw-shortcode-icon::before {
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  line-height: inherit;
  vertical-align: baseline;
  content: "";
  height: 1.45em;
  width: 1.45em;
  margin-right: 0.3em;
  margin-top: -0.2em;
  background-size: cover;
  float: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='basket' data-name='Isolation Mode' fill='%23444' viewBox='0 0 24 24' width='512' height='512'%3E%3Cpath fill='%23000' d='M18,6A6,6,0,0,0,6,6H0V21a3,3,0,0,0,3,3H21a3,3,0,0,0,3-3V6ZM12,3a3,3,0,0,1,3,3H9A3,3,0,0,1,12,3Zm9,18H3V9H6v2H9V9h6v2h3V9h3Z'/%3E%3C/svg%3E");
  margin-left: 0;
}

.scw-header-icon,
.scw-shortcode-icon {
  display: inline-flex;
  align-items: center;
}


body.scw-pay-apple-only .scw-payment-buttons .wc-stripe-payment-request-mini-cart {
  display: none !important;
}

body.scw-pay-gpay-only .scw-payment-buttons .wc-stripe-applepay-mini-cart {
  display: none !important;
}

body.scw-pay-none .scw-payment-buttons .wc-stripe-applepay-mini-cart,
body.scw-pay-none .scw-payment-buttons .wc-stripe-payment-request-mini-cart {
  display: none !important;
}

.scw-header-title-wrap .scw-header-title {
  font-size: 1.1em !important;
}

.scw-item-image {
  align-self: center;
}

.scw-item-right .scw-item-total {
  font-weight: 400;
}

.scw-item-qty input:focus-visible {
  border: none;
  outline: 0;
}

.scw-item-qty .scw-qty-btn {
  font-size: 16px;
}

.scw-item-name {
  font-size: 1.2em;
}


