.shopline-draft-selection {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  padding-block-start: 4px;
  margin-inline-end: 12px;
}

.shopline-draft-selection[hidden],
.shopline-draft-checkout[hidden],
.shopline-native-checkout[hidden] {
  display: none;
}

.shopline-draft-checkout [hidden],
.shopline-draft-price-preview [hidden] {
  display: none;
}

.shopline-draft-selection input,
.shopline-draft-checkout input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: rgb(var(--color-button-background));
  cursor: pointer;
}

.shopline-draft-checkout {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
}

.shopline-draft-checkout > *,
.shopline-draft-checkout__coupon,
.shopline-draft-checkout__notice,
.shopline-draft-checkout__error {
  min-width: 0;
  max-width: 100%;
}

.shopline-draft-checkout__select-all {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.shopline-draft-checkout__coupon {
  display: grid;
  gap: 5px;
}

.shopline-draft-checkout__coupon input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgb(var(--color-entry-line));
  border-radius: 4px;
}

.shopline-draft-checkout__notice {
  margin: 0;
  color: rgb(var(--color-light-text));
  overflow-wrap: anywhere;
}

.shopline-draft-checkout__error {
  min-height: 1em;
  margin: 0;
  color: rgb(var(--color-error-message));
}

.shopline-draft-line-status {
  margin: 6px 0 0;
  color: rgb(var(--color-error-message));
  overflow-wrap: anywhere;
}

.shopline-draft-image-status {
  margin: 6px 0 0;
  color: rgb(var(--color-light-text));
  overflow-wrap: anywhere;
}

.shopline-draft-image-status[data-valid="true"]::before {
  content: "✓ ";
  color: rgb(var(--color-success-message, var(--color-text)));
}

.shopline-draft-image-status[data-valid="false"] {
  color: rgb(var(--color-error-message));
}

.shopline-draft-subtotal {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 10px 0;
  border-block: 1px solid rgb(var(--color-entry-line));
}

.shopline-draft-subtotal[hidden] {
  display: none;
}

.shopline-draft-subtotal__label,
.shopline-draft-subtotal__amount {
  min-width: 0;
  font-weight: 600;
}

.shopline-draft-subtotal__label,
.shopline-draft-subtotal__status {
  overflow-wrap: anywhere;
}

.shopline-draft-subtotal__amount {
  justify-self: end;
  white-space: nowrap;
}

.shopline-draft-subtotal__status,
.shopline-draft-subtotal__retry {
  grid-column: 1 / -1;
}

.shopline-draft-subtotal__status {
  color: rgb(var(--color-light-text));
}

.shopline-draft-subtotal[data-error="true"] .shopline-draft-subtotal__status {
  color: rgb(var(--color-error-message));
}

.shopline-draft-subtotal[data-loading="true"] .shopline-draft-subtotal__amount,
.cart-item__total-final[data-shopline-draft-price-state="loading"] {
  opacity: 0.55;
}

.shopline-draft-product-checkout {
  width: 100%;
  margin-block-start: 10px;
}

.shopline-draft-price-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 12px 14px;
  margin-block-start: 10px;
  color: rgb(var(--color-text));
  background: rgb(var(--color-page-background));
  border: 1px solid rgb(var(--color-entry-line));
  border-radius: 6px;
}

.shopline-draft-price-preview[hidden] {
  display: none;
}

.shopline-draft-price-preview__label {
  font-weight: 600;
}

.shopline-draft-price-preview__amount {
  font-size: 1.15em;
  color: rgb(var(--color-sale));
}

.shopline-draft-price-preview__status {
  grid-column: 1 / -1;
  color: rgb(var(--color-light-text));
}

.shopline-draft-price-preview__retry {
  grid-column: 1 / -1;
}

.shopline-draft-price-preview__retry,
.shopline-draft-subtotal__retry {
  justify-self: start;
  width: auto;
  min-height: 0;
  padding: 0;
}

.shopline-draft-price-preview[data-error="true"] .shopline-draft-price-preview__status {
  color: rgb(var(--color-error-message));
}

.shopline-draft-price-preview[data-loading="true"] .shopline-draft-price-preview__amount {
  opacity: 0.55;
}

.shopline-draft-product-checkout[hidden] {
  display: none;
}

.shopline-draft-product-checkout.is-loading,
.shopline-draft-checkout [data-shopline-draft-submit].is-loading {
  pointer-events: none;
  opacity: 0.65;
}

.shopline-draft-checkout [data-shopline-draft-submit] {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.shopline-native-checkout,
.shopline-native-checkout form,
.shopline-native-checkout [data-shopline-native-submit] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.cart-drawer .shopline-draft-selection {
  margin-inline-end: 8px;
}

.cart-drawer .shopline-draft-checkout {
  padding-block: 12px;
  padding-inline: 0;
}

.cart-drawer .cart-checkout,
.cart-drawer .cart-fixed-checkout__buttons,
.cart-drawer .cart-fixed-checkout__main-info,
.cart-drawer .cart-item__product,
.cart-drawer .cart-item__product-infos {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 479px) {
  .cart-drawer .shopline-draft-subtotal {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-drawer .shopline-draft-subtotal__amount {
    justify-self: end;
  }
}
