/*
|--------------------------------------------------------------------------
| CraftFrame Checkout
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| Checkout Grid
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-checkout {
  width: 100%;
  margin-inline: auto;
}
.cf-checkout .wc-block-components-sidebar-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.7fr)
    minmax(20rem, 0.8fr);
  align-items: start;
  gap: var(--cf-space-2xl);
  width: 100%;
  margin: 0;
}
.cf-checkout .wc-block-components-sidebar-layout .wc-block-components-main {
  width: 100%;
  max-width: none;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  box-sizing: border-box;
  background: var(--cf-color-background);
  border: var(--cf-border-width-thin) solid var(--cf-color-border);
  border-radius: var(--cf-radius-md);
  /*
     * WooCommerce Blocks applies its own right-side padding.
     * Override it so the CraftFrame checkout card has
     * consistent spacing on all sides.
     */
  padding: var(--cf-space-xl) !important;
}
.cf-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar {
  width: 100%;
  max-width: none;
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}
/*
|--------------------------------------------------------------------------
| Checkout Steps
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-checkout-step {
  margin: 0 0 var(--cf-space-2xl);
}
.cf-checkout .wc-block-components-checkout-step__heading {
  margin-bottom: var(--cf-space-lg);
}
.cf-checkout .wc-block-components-checkout-step__title {
  margin: 0;
  color: var(--cf-color-text);
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-xl);
  font-weight: var(--cf-font-semibold);
  line-height: 1.3;
}
/*
|--------------------------------------------------------------------------
| Checkout Text Inputs
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-text-input {
  margin-bottom: var(--cf-space-md);
}
.cf-checkout .wc-block-components-text-input input {
  width: 100%;
  height: 3.5rem !important;
  min-height: 3.5rem !important;
  padding: var(--cf-space-lg) var(--cf-space-md);
  border: var(--cf-border-width-thin) solid var(--cf-color-border);
  border-radius: var(--cf-radius-sm);
  background: var(--cf-color-background);
  color: var(--cf-color-text);
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-base);
  line-height: 1.3;
  box-shadow: none;
  transition:
    border-color var(--cf-transition-fast),
    box-shadow var(--cf-transition-fast),
    background-color var(--cf-transition-fast);
}
.cf-checkout .wc-block-components-text-input input:focus {
  border-color: var(--cf-color-primary);
  outline: none;
  box-shadow: var(--cf-focus-ring);
}
.cf-checkout .wc-block-components-text-input label {
  color: var(--cf-color-text-muted);
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-sm);
}
/*
|--------------------------------------------------------------------------
| Checkout Select Fields
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-blocks-components-select__container {
  height: 3.5rem !important;
  min-height: 3.5rem !important;
  border: var(--cf-border-width-thin) solid var(--cf-color-border);
  border-radius: var(--cf-radius-sm);
  background: var(--cf-color-background);
  transition:
    border-color var(--cf-transition-fast),
    box-shadow var(--cf-transition-fast);
}
.cf-checkout .wc-blocks-components-select__container:focus-within {
  border-color: var(--cf-color-primary);
  box-shadow: var(--cf-focus-ring);
}
.cf-checkout .wc-blocks-components-select__select {
  height: 3.5rem !important;
  min-height: 3.5rem !important;
  color: var(--cf-color-text);
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-base);
}
/*
|--------------------------------------------------------------------------
| Checkout Payment
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-radio-control {
  margin: 0;
}
.cf-checkout .wc-block-components-radio-control-accordion-option {
  border: var(--cf-border-width-thin) solid var(--cf-color-border);
  border-radius: var(--cf-radius-sm);
  background: var(--cf-color-background);
}
.cf-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  border-color: var(--cf-color-primary);
}
.cf-checkout .wc-block-components-radio-control__option {
  padding: var(--cf-space-md);
}
.cf-checkout .wc-block-components-radio-control__label {
  color: var(--cf-color-text);
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-sm);
  font-weight: var(--cf-font-medium);
}
.cf-checkout .wc-block-components-radio-control__label,
.wc-block-checkout__payment-method
  .wc-block-components-radio-control-accordion-option
  .wc-block-components-radio-control__label {
  padding-inline-start: 30px;
}
.wc-block-checkout__payment-method
  .wc-block-components-radio-control.disable-radio-control
  .wc-block-components-radio-control__input {
  display: inline-block;
}
.cf-checkout .wc-block-components-radio-control-accordion-content {
  color: var(--cf-color-text-muted);
  font-size: var(--cf-font-size-sm);
  line-height: var(--cf-line-height-base);
}
/*
|--------------------------------------------------------------------------
| Checkout Order Note
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-checkout__order-notes {
  margin-bottom: var(--cf-space-lg);
}
.cf-checkout .wc-block-components-checkbox__label {
  color: var(--cf-color-text);
  font-size: var(--cf-font-size-sm);
}
/*
|--------------------------------------------------------------------------
| Checkout Terms
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-checkout__terms {
  margin-top: var(--cf-space-lg);
  padding-top: var(--cf-space-lg);
  border-top: var(--cf-border-width-thin) solid var(--cf-color-border);
  color: var(--cf-color-text-muted);
  font-size: var(--cf-font-size-sm);
  line-height: var(--cf-line-height-base);
}
/*
|--------------------------------------------------------------------------
| Checkout Place Order Button
|--------------------------------------------------------------------------
|
| WooCommerce Checkout Block uses its own button class rather than
| the normal CraftFrame .cf-btn markup.
|
*/
.cf-checkout .wc-block-components-checkout-place-order-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  margin: 0;
  padding: var(--cf-space-md) var(--cf-space-lg);
  border: var(--cf-border-width-base) solid var(--cf-color-primary);
  border-radius: var(--cf-radius-full);
  background: var(--cf-color-primary);
  color: var(--cf-color-on-primary) !important;
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-base);
  font-weight: var(--cf-font-semibold);
  line-height: var(--cf-line-height-base);
  box-shadow: none;
  cursor: pointer;
  transition:
    background var(--cf-transition-base),
    border-color var(--cf-transition-base),
    transform var(--cf-transition-base);
}
.cf-checkout .wc-block-components-checkout-place-order-button:hover {
  background: var(--cf-color-primary-hover);
  border-color: var(--cf-color-primary-hover);
  color: var(--cf-color-on-primary) !important;
  transform: translateY(var(--cf-shift-up-sm));
  box-shadow: none;
}
.cf-checkout .wc-block-components-checkout-place-order-button:focus-visible {
  outline: none;
  box-shadow: var(--cf-focus-ring);
}
.cf-checkout .wc-block-components-checkout-place-order-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
/*
|--------------------------------------------------------------------------
| Checkout Order Summary
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-checkout__sidebar {
  width: 100%;
  max-width: none;
  padding: var(--cf-space-md);
  border: var(--cf-border-width-thin) solid var(--cf-color-border);
  border-radius: var(--cf-radius-card);
  background: var(--cf-color-background);
  box-shadow: var(--cf-shadow-sm);
}
/*
|--------------------------------------------------------------------------
| Sticky Checkout Summary
|--------------------------------------------------------------------------
|
| Desktop:
|
| Left  = Checkout form
| Right = Sticky order summary
|
| The top offset accounts for:
|
| 1. CraftFrame sticky header.
| 2. WordPress admin bar when logged in.
| 3. Additional spacing.
|
*/
@media (min-width: 64.0625rem) {
  .cf-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    position: sticky;
    top: calc(var(--cf-header-height) + var(--cf-size-adminbar-offset, 0px) + var(--cf-space-lg));
    align-self: start;
  }
}
/*
|--------------------------------------------------------------------------
| Checkout Summary Typography
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-checkout-order-summary__title-text {
  margin: 0;
  color: var(--cf-color-text);
  font-family: var(--cf-font-family-base, sans-serif);
  font-size: var(--cf-font-size-xl);
  font-weight: var(--cf-font-semibold);
}
.cf-checkout .wc-block-components-checkout-order-summary__title-price {
  color: var(--cf-color-text);
  font-size: var(--cf-font-size-base);
  font-weight: var(--cf-font-semibold);
}
/*
|--------------------------------------------------------------------------
| Checkout Summary Product
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-order-summary-item {
  padding-block: var(--cf-space-md);
  border-bottom: var(--cf-border-width-thin) solid var(--cf-color-border);
}
.cf-checkout .wc-block-components-order-summary-item__image img {
  border-radius: var(--cf-radius-sm);
}
.cf-checkout .wc-block-components-product-name {
  color: var(--cf-color-text);
  font-size: var(--cf-font-size-sm);
  font-weight: var(--cf-font-semibold);
}
.cf-checkout .wc-block-components-product-metadata {
  color: var(--cf-color-text-muted);
  font-size: var(--cf-font-size-sm);
}
/*
|--------------------------------------------------------------------------
| Checkout Totals
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-totals-item {
  color: var(--cf-color-text);
  font-size: var(--cf-font-size-sm);
}
.cf-checkout .wc-block-components-totals-footer-item {
  margin-top: var(--cf-space-md);
  padding-top: var(--cf-space-md);
  border-top: var(--cf-border-width-thin) solid var(--cf-color-border);
}
.cf-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  color: var(--cf-color-text);
  font-size: var(--cf-font-size-lg);
  font-weight: var(--cf-font-semibold);
}
.cf-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--cf-color-text);
  font-size: var(--cf-font-size-lg);
  font-weight: var(--cf-font-semibold);
}
/*
|--------------------------------------------------------------------------
| Checkout Responsive
|--------------------------------------------------------------------------
*/
/*
| Tablet
|--------------------------------------------------------------------------
*/
@media (max-width: 64rem) {
  .cf-checkout .wc-block-components-sidebar-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--cf-space-2xl);
  }
  .cf-checkout .wc-block-components-sidebar-layout .wc-block-components-main {
    grid-column: 1;
    grid-row: 1;
    padding: var(--cf-space-xl) !important;
  }
  .cf-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    grid-column: 1;
    grid-row: 2;
    position: static;
    top: auto;
  }
}
/*
| Mobile
|--------------------------------------------------------------------------
*/
@media (max-width: 40rem) {
  .cf-checkout .wc-block-checkout {
    width: 100%;
  }
  .cf-checkout .wc-block-components-sidebar-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--cf-space-xl);
  }
  .cf-checkout .wc-block-components-sidebar-layout .wc-block-components-main {
    grid-column: 1;
    grid-row: 1;
    padding: var(--cf-space-lg) !important;
  }
  .cf-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    grid-column: 1;
    grid-row: 2;
    position: static;
    top: auto;
    padding: var(--cf-space-lg);
  }
  .cf-checkout .wc-block-components-checkout-step__title {
    font-size: var(--cf-font-size-lg);
  }
}
/*
|--------------------------------------------------------------------------
| Checkout Coupon Button
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  min-height: 2.5rem;
  padding: 0.55rem 0.875rem;
  font-size: var(--cf-font-size-sm);
  border: var(--cf-border-width-thin) solid var(--cf-color-primary);
  border-radius: var(--cf-radius-sm);
  background: var(--cf-color-primary);
  color: var(--cf-color-on-primary);
  font-family: var(--cf-font-family-base, sans-serif);
  font-weight: var(--cf-font-semibold);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    background-color var(--cf-transition-fast),
    border-color var(--cf-transition-fast),
    color var(--cf-transition-fast),
    transform var(--cf-transition-fast);
}
.cf-checkout
  .wc-block-components-totals-coupon__form
  .wc-block-components-totals-coupon__button:hover {
  border-color: var(--cf-color-primary);
  background: var(--cf-color-primary);
  color: var(--cf-color-on-primary);
  transform: translateY(var(--cf-shift-up-sm));
}
.cf-checkout
  .wc-block-components-totals-coupon__form
  .wc-block-components-totals-coupon__button:focus-visible {
  outline: none;
  box-shadow: var(--cf-focus-ring);
}
.cf-checkout
  .wc-block-components-totals-coupon__form
  .wc-block-components-totals-coupon__button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}
/*
|--------------------------------------------------------------------------
| Required Field Indicator
|--------------------------------------------------------------------------
|
| WooCommerce Checkout Block places the label after the field.
| Do not use a broad :has(input[required]) label selector here,
| because one wrapper can contain more than one field.
|
| The selector below requires the required input to be the
| immediate previous sibling of the label.
|
*/
.cf-checkout .wc-block-checkout__form input[required] + label,
.cf-checkout .wc-block-checkout__form select[required] + label,
.cf-checkout .wc-block-checkout__form textarea[required] + label {
  padding-inline-end: 0.5rem;
}
.cf-checkout .wc-block-checkout__form input[required] + label::after,
.cf-checkout .wc-block-checkout__form select[required] + label::after,
.cf-checkout .wc-block-checkout__form textarea[required] + label::after {
  content: "•";
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 40%;
  color: var(--cf-color-error);
  font-size: 0.7rem;
  font-weight: var(--cf-font-bold);
  line-height: 1;
  transform: translateY(-50%);
}
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--email::before {
  line-height: 1.55;
}
/*
|--------------------------------------------------------------------------
| Empty Checkout
|--------------------------------------------------------------------------
*/
.cf-checkout .wc-block-checkout-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cf-space-lg);
  width: 100%;
  max-width: 44rem;
  margin: var(--cf-space-xl) auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  box-sizing: border-box;
  border: var(--cf-border-width-thin) solid var(--cf-color-border);
  border-radius: var(--cf-radius-lg);
  background: var(--cf-color-surface);
  color: var(--cf-color-text);
  font-family: var(--cf-font-family-base, sans-serif);
  text-align: center;
}
.cf-checkout .wc-block-checkout-empty__image {
  display: block;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  margin: 0;
  color: var(--cf-color-primary);
  fill: currentColor;
}
.cf-checkout .wc-block-checkout-empty__title {
  display: block;
  margin: 0;
  color: var(--cf-color-text);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: var(--cf-font-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cf-checkout .wc-block-checkout-empty__description {
  max-width: 36rem;
  margin: 0;
  color: var(--cf-color-text-muted);
  font-size: var(--cf-font-size-base);
  line-height: var(--cf-line-height-base);
  overflow-wrap: anywhere;
}
.cf-checkout .wc-block-checkout-empty .wp-block-button {
  margin: 0;
  max-width: 100%;
}
.cf-checkout .wc-block-checkout-empty .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cf-size-button-min-height, 2.75rem);
  min-width: min(var(--cf-size-btn-min-width), 100%);
  max-width: 100%;
  padding: var(--cf-space-btn-y) var(--cf-space-btn-x);
  border: var(--cf-border-width-base) solid var(--cf-color-primary);
  border-radius: var(--cf-radius-full);
  background: var(--cf-color-primary);
  color: var(--cf-color-on-primary);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--cf-font-size-base);
  font-weight: var(--cf-font-semibold);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    background-color var(--cf-transition-base),
    border-color var(--cf-transition-base),
    transform var(--cf-transition-base);
}
.cf-checkout .wc-block-checkout-empty .wp-block-button__link:hover {
  border-color: var(--cf-color-primary-hover);
  background: var(--cf-color-primary-hover);
  color: var(--cf-color-on-primary);
  transform: translateY(var(--cf-shift-up-sm));
}
.cf-checkout .wc-block-checkout-empty .wp-block-button__link:focus-visible {
  outline: 2px solid var(--cf-color-primary);
  outline-offset: 4px;
  box-shadow: var(--cf-focus-ring);
}
.cf-checkout .wc-block-components-address-card{background:var(--cf-color-on-primary);}
@media (max-width: 30rem) {
  .cf-checkout .wc-block-checkout-empty {
    margin-block: var(--cf-space-lg);
    gap: var(--cf-space-md);
  }
  .cf-checkout .wc-block-checkout-empty .wp-block-button,
  .cf-checkout .wc-block-checkout-empty .wp-block-button__link {
    width: 100%;
  }
}
