.stripecheckout-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 4px 0;
}

/* ── Address select ── */
.stripecheckout-address-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(8px);
  animation: scFadeInUp 0.4s ease forwards;
  margin-top: 4px;
}

.stripecheckout-address-wrapper label {
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 0px;
  color: #697386;
  font-size: 11px;
  text-transform: capitalize;
  align-self: flex-start;
  padding-left: 6px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.stripecheckout-address-select {
  width: 100%;
  padding: 8px 16px;
  font-size: 15px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  color: #1a1a1a;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23697386' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.stripecheckout-address-select:hover {
  border-color: #c4c4c4;
}

.stripecheckout-address-select:focus {
  outline: none;
  border-color: var(--sc-btn-color, #635bff);
  box-shadow:
    0 0 0 3px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.15),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ── Country select ── */
.stripecheckout-country-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(8px);
  animation: scFadeInUp 0.4s ease forwards;
  margin-top: 4px;
}

.stripecheckout-country-wrapper label {
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 0px;
  color: #697386;
  font-size: 11px;
  text-transform: capitalize;
  align-self: flex-start;
  padding-left: 6px;
}

.stripecheckout-country-select {
  width: 100%;
  padding: 8px 16px;
  font-size: 15px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  color: #1a1a1a;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23697386' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.stripecheckout-country-select:hover {
  border-color: #c4c4c4;
}

.stripecheckout-country-select:focus {
  outline: none;
  border-color: var(--sc-btn-color, #635bff);
  box-shadow:
    0 0 0 3px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.15),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ── State select ── */
.stripecheckout-state-wrapper {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.stripecheckout-state-wrapper.is-visible {
  display: flex;
  animation: scFadeInUp 0.35s ease forwards;
}

.stripecheckout-state-wrapper label {
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 0px;
  color: #697386;
  font-size: 11px;
  text-transform: capitalize;
  align-self: flex-start;
  padding-left: 6px;
}

.stripecheckout-state-select {
  width: 100%;
  padding: 8px 16px;
  font-size: 15px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  color: #1a1a1a;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23697386' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.stripecheckout-state-select:hover {
  border-color: #c4c4c4;
}

.stripecheckout-state-select:focus {
  outline: none;
  border-color: var(--sc-btn-color, #635bff);
  box-shadow:
    0 0 0 3px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.15),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.stripecheckout-state-wrapper.is-error label {
  color: #df1b41;
  transition: color 0.3s ease;
}

.stripecheckout-state-select.is-error {
  border-color: #df1b41;
  box-shadow: 0 0 0 3px rgba(223, 27, 65, 0.12);
  animation: scShake 0.4s ease;
}

@keyframes scShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

/* ── Tax line ── */
.stripecheckout-tax-line {
  font-size: 13px;
  color: #697386;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center;

  padding: 0 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease,
    margin 0.35s ease;
  margin: 0;
}

.stripecheckout-tax-line.is-visible {
  max-height: 40px;
  opacity: 1;
  margin: 4px 0 4px;
}

.stripecheckout-tax-line .tax-amount {
  font-weight: 600;
  color: #1a1a1a;
}

.stripecheckout-tax-line.is-loading {
  max-height: 40px;
  opacity: 0.5;
  margin: 4px 0 4px;
}

/* ── Shipping options ── */
.stripecheckout-shipping-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    margin 0.35s ease;
  margin: 0;

  padding: 0 6px;
}

.stripecheckout-shipping-wrapper.is-visible {
  max-height: 300px;
  opacity: 1;
  margin: 4px 0;
}

.stripecheckout-shipping-label {
  display: block;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #697386;
  font-size: 11px;
  text-transform: capitalize;
  margin-bottom: 4px;
}

.stripecheckout-shipping-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stripecheckout-shipping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  border-bottom: 1px solid #f0f0f0;
}

.stripecheckout-shipping-item:last-child {
  border-bottom: none;
}

.stripecheckout-shipping-name {
  font-weight: 500;
  flex-shrink: 1;
  min-width: 0;
}

.stripecheckout-shipping-delay {
  color: #697386;
  font-size: 12px;
  flex-shrink: 0;
}

.stripecheckout-shipping-price {
  font-weight: 600;
  color: #1a1a1a;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Gift wrapping ── */
.stripecheckout-gift {
  width: 100%;
  margin-bottom: 8px;
  padding-top: 4px;
  padding-bottom: 2px;
  opacity: 0;
  transform: translateY(8px);
  animation: scFadeInUp 0.4s ease forwards;
}

.stripecheckout-gift__label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

/* Hidden native checkbox */
.stripecheckout-gift__input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
}

/* Visual checkbox box */
.stripecheckout-gift__box {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  transition:
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Checkmark via ::after */
.stripecheckout-gift__box::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  border-radius: 0.5px;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition:
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.15s ease;
}

/* Hover */
.stripecheckout-gift__label:hover .stripecheckout-gift__box {
  border-color: var(--sc-btn-color, #635bff);
}

/* Checked — JS adds .is-checked on the wrapper */
.stripecheckout-gift.is-checked .stripecheckout-gift__box {
  background-color: var(--sc-btn-color, #635bff);
  border-color: var(--sc-btn-color, #635bff);
}

.stripecheckout-gift.is-checked .stripecheckout-gift__box::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

/* Focus */
.stripecheckout-gift__input:focus-visible + .stripecheckout-gift__box {
  box-shadow: 0 0 0 3px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.2);
  border-color: var(--sc-btn-color, #635bff);
  outline: none;
}

/* Text */
.stripecheckout-gift__text {
  font-size: 13.5px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #30313d;
  font-weight: 400;
  letter-spacing: -0.1px;
}

/* ── Button ── */
.stripecheckout-btn {
  width: 100%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 48px;
  background-color: var(--sc-btn-color, #635bff);
  color: #fff !important;
  border: none;
  border-radius: 5px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 600;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.2px;
  text-decoration: none !important;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  box-shadow:
    0 1px 3px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.3),
    0 1px 2px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(8px);
  animation: scFadeInUp 0.4s 0.1s ease forwards;
}

.stripecheckout-btn:hover {
  background-color: #5247e5;
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.35),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.stripecheckout-btn:active {
  background-color: #4b3fd9;
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(var(--sc-btn-color-rgb, 99, 91, 255), 0.3);
}

/* Button content wrapper — used for slide-out animation */
.stripecheckout-btn-content {
  display: inline-flex;
  align-items: center;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.stripecheckout-btn-content > svg > rect {
  fill: #635bff00 !important;
}
/* Loading spinner */
.stripecheckout-spinner {
  position: absolute;
  left: calc(50% - 41px);
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    left 0.3s ease;
  pointer-events: none;
}

/* Disabled state — waiting for state/province selection */
.stripecheckout-btn.is-disabled {
  opacity: 0.45 !important;
  transition: opacity 0.3s ease;
  cursor: not-allowed !important;
}

.stripecheckout-express-wrapper.is-disabled {
  opacity: 0.35 !important;
  transition: opacity 0.3s ease;
}

.stripecheckout-express-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  cursor: not-allowed;
}

/* Loading state */
.stripecheckout-btn.is-loading {
  pointer-events: none;
  background-color: #5247e5;
}

.stripecheckout-btn.is-loading .stripecheckout-btn-content {
  opacity: 0;
  transform: translateX(30px);
}

.stripecheckout-btn.is-loading .stripecheckout-spinner {
  opacity: 1;
  left: calc(50% - 11px);
  animation: scSpin 0.7s linear infinite;
}

/* ── Keyframes ── */
@keyframes scSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scFadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Express Checkout divider (cart page) ── */
.stripecheckout-express-divider {
  display: none;
  align-items: center;
  width: 100%;
  margin: 12px 0 4px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #697386;
  letter-spacing: 0.2px;
}

.stripecheckout-express-divider::before,
.stripecheckout-express-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.stripecheckout-express-divider span {
  padding: 0 12px;
  white-space: nowrap;
}

/* ── Express Checkout Element (product page) ── */
.stripecheckout-express-wrapper {
  position: relative;
  width: 100%;
  padding: 8px 0;
  opacity: 0;
  transform: translateY(8px);
  animation: scFadeInUp 0.4s ease forwards;
}

.stripecheckout-express-wrapper.is-loading {
  pointer-events: none;
}

.stripecheckout-express-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.stripecheckout-express-wrapper.is-loading .stripecheckout-express-loading {
  opacity: 1;
}

.stripecheckout-express-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--sc-btn-color, #635bff);
  border-radius: 50%;
  animation: scSpin 0.7s linear infinite;
}

.stripecheckout-express-error {
  color: #df1b41;
  font-size: 13px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-top: 6px;
  min-height: 0;
}
