/* === Slim Checkout Bar — Floating/Pill Style (Standalone, scoped with #scbs-checkout-bar) === */

#scbs-checkout-bar {
  position: fixed;
  bottom: 0;
  z-index: 9999;
  transform: translateY(100%);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#scbs-checkout-bar.scbs-visible {
  transform: translateY(0);
}

/* Inre layout */
#scbs-checkout-bar .scbs-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background-color: white;
}

#scbs-checkout-bar .scbs-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
}

#scbs-checkout-bar .scbs-line {
  white-space: nowrap;
}

/* === Total-raden typografi === */
.scbs-line.scbs-total {
  font-size: 18px;
  font-weight: 400;
  color: #000;
  line-height: 1.4;
}

.scbs-line.scbs-total .scbs-price {
  font-weight: 400;
  font-size: 18px !important;
  color: #000;
}

.scbs-line.scbs-total .scbs-currency {
  font-weight: 400;
  font-size: 18px;
}

.scbs-line.scbs-total .scbs-count {
  font-weight: 700;
  font-size: 18px;
  margin-right: 2px;
}

/* Knapp */
#scbs-checkout-bar .scbs-checkout {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0 !important;
  padding: 10px 16px !important;
  line-height: 1.2 !important;
  border-radius: 10px !important;
  text-transform: none !important;
}

/* === MOBIL + PADDOR === */
@media (max-width: 1024px) {
  #scbs-checkout-bar {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    border-radius: 0 0 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
    border-top: 5px solid #FFD337 !important;
  }

  #scbs-checkout-bar .scbs-inner {
    padding: 18px 25px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  #scbs-checkout-bar .scbs-text {
    flex: 0 0 60%;
    max-width: 60%;
    display: grid;
    row-gap: 14px;
  }

  #scbs-checkout-bar .scbs-checkout {
    flex: 0 0 40%;
    max-width: 40%;
    width: 100%;
    min-height: 44px;
    font-size: 14px !important;
  }

  #scbs-checkout-bar.scbs-animate {
    animation: scbsPopMobile 0.28s ease-out;
  }
}

/* === DESKTOP: 300px, längst till höger === */
@media (min-width: 1025px) {
  #scbs-checkout-bar {
    right: 20px;
    left: auto;
    transform: translateY(0);
    width: 300px;
    bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    background: white;
    border-radius: 10px;

  }

  #scbs-checkout-bar .scbs-inner {
    padding: 12px 18px;
    border-radius: 10px;

  }

  #scbs-checkout-bar .scbs-text {
    justify-content: flex-start;
  }
}

/* Keyframes (flyttad utanför media-query) */
@keyframes scbsPopMobile {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  60% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tillgänglighetsanpassning */
@media (prefers-reduced-motion: reduce) {
  #scbs-checkout-bar.scbs-animate {
    animation: none;
  }
}
