/**
 * CHALI WooCommerce storefront styles.
 *
 * WooCommerce classic theme styles are disabled in customer/styles.php.
 * Cart and Checkout Blocks keep their structural styles; this file supplies
 * the storefront's visual layer and classic-template fallbacks.
 */

autofill-inline-menu-button {
  display: none;
}

.wc-block-components-checkout-step__heading-container {
  .wc-block-components-checkout-step__heading {
    margin-bottom: 0;
  }
}

/* Shared foundation */
.single-page {
  min-height: calc(100vh - var(--site-header-height));
}
:where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) {
  --chali-control-height: 3.5rem;
  --chali-control-border: var(--color-border-1);
  --chali-control-border-hover: var(--color-border-hover);
  --chali-panel-background: var(--color-bg-light);
  --chali-panel-radius: var(--radius-lg);
  color: var(--color-text-body);
}

:where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) *,
:where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) *::before,
:where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) *::after {
  box-sizing: border-box;
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) :is(h1, h2, h3, h4) {
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-weight: var(--font-weight-title);
  text-wrap: balance;
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) h2 {
  font-size: var(--text-heading-4);
  line-height: var(--leading-heading-4);
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) h3 {
  font-size: var(--text-heading-5);
  line-height: var(--leading-heading-5);
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) :is(p, ul, ol) {
  margin-block: 0;
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) a {
  color: inherit;
  text-underline-offset: 0.2em;
  transition: color 180ms ease;
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) a:hover {
  color: var(--color-text-brand);
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) :focus-visible {
  outline: 2px solid var(--color-brand-focus);
  outline-offset: 3px;
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) .required {
  color: var(--color-danger-active);
  text-decoration: none;
}

:where(.woocommerce, .wc-block-cart, .wc-block-checkout) .clear {
  clear: both;
}

/* Buttons */

.woocommerce :is(.button, button.button, input.button),
.woocommerce-page :is(.button, button.button, input.button),
.order-confirmation-page-content .woocommerce-button.button,
.wc-block-components-button:not(.is-link),
.wc-block-grid__product-add-to-cart .wp-block-button__link {
  min-height: 3rem;
  padding: 0.75rem var(--ds-24);
  border: 1px solid var(--color-text-headings);
  border-radius: var(--radius-none);
  background: var(--color-text-headings);
  color: var(--color-text-white);
  font: inherit;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.woocommerce :is(.button, button.button, input.button):hover,
.woocommerce-page :is(.button, button.button, input.button):hover,
.order-confirmation-page-content .woocommerce-button.button:hover,
.wc-block-components-button:not(.is-link):hover,
.wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
  border-color: var(--color-brand-active);
  background: var(--color-brand-active);
  color: var(--color-text-white);
}

.woocommerce :is(.button, button.button, input.button):disabled,
.woocommerce :is(.button, button.button, input.button).disabled,
.wc-block-components-button:disabled {
  border-color: var(--color-bg-disabled);
  background: var(--color-bg-disabled);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.woocommerce .button.is-outline,
.woocommerce .button.wc-backward,
.wc-block-components-button.is-link {
  border-color: var(--color-border-strong);
  background: transparent;
  color: var(--color-text-headings);
}

/* Form controls */

.woocommerce :is(input.input-text, textarea, select),
.woocommerce-page :is(input.input-text, textarea, select),
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-form .wc-block-components-select__select,
.wc-block-components-address-form__address_2-toggle {
  width: 100%;
  min-height: var(--chali-control-height);
  margin: 0;
  padding: 0.875rem var(--ds-16);
  border: 1px solid var(--chali-control-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  color: var(--color-text-body);
  box-shadow: none;
  font: inherit;
  line-height: 1.5;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.woocommerce :is(input.input-text, textarea, select):hover,
.woocommerce-page :is(input.input-text, textarea, select):hover,
.wc-block-components-text-input input:hover,
.wc-block-components-textarea:hover,
.wc-block-components-combobox .components-combobox-control__input:hover,
.wc-block-components-form .wc-block-components-select__select:hover {
  border-color: var(--chali-control-border-hover);
}

.woocommerce :is(input.input-text, textarea, select):focus,
.woocommerce-page :is(input.input-text, textarea, select):focus,
.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus,
.wc-block-components-combobox .components-combobox-control__input:focus,
.wc-block-components-form .wc-block-components-select__select:focus {
  border-color: var(--color-brand-focus);
  outline: 0;
  box-shadow: 0 0 0 2px var(--color-brand-subtle);
}

.wc-block-checkout .wc-block-components-form .wc-block-components-text-input input[type],
.wc-block-checkout
  .wc-block-components-form
  .wc-block-components-combobox
  .components-combobox-control__input,
.wc-block-cart .wc-block-components-text-input input[type] {
  border-color: var(--chali-control-border);
  background: var(--color-bg-light);
  color: var(--color-text-body);
  box-shadow: none;
}

.wc-block-checkout .wc-block-components-form .wc-block-components-text-input input[type]:focus,
.wc-block-checkout
  .wc-block-components-form
  .wc-block-components-combobox
  .components-combobox-control__input:focus,
.wc-block-cart .wc-block-components-text-input input[type]:focus {
  border-color: var(--color-brand-focus);
  box-shadow: 0 0 0 2px var(--color-brand-subtle);
}

.woocommerce :is(input, textarea)::placeholder,
.wc-block-components-text-input input::placeholder,
.wc-block-components-textarea::placeholder {
  color: var(--color-text-placeholder);
  opacity: 1;
}

.woocommerce textarea,
.wc-block-components-textarea {
  min-height: 8rem;
  resize: vertical;
}

.woocommerce .form-row,
.woocommerce-page .form-row {
  margin: 0;
}

.woocommerce .form-row + .form-row,
.woocommerce-page .form-row + .form-row {
  margin-top: var(--ds-20);
}

.woocommerce .form-row label,
.woocommerce-page .form-row label {
  display: block;
  margin-bottom: var(--ds-8);
  color: var(--color-text-headings);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.woocommerce .form-row-first,
.woocommerce .form-row-last {
  width: 100%;
}

.woocommerce :is(.woocommerce-form__label-for-checkbox, .woocommerce-form__label-for-radio),
.wc-block-components-checkbox .wc-block-components-checkbox__label,
.wc-block-components-radio-control label {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-8);
  margin: 0;
  cursor: pointer;
}

.woocommerce input[type='checkbox'],
.woocommerce input[type='radio'] {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--color-brand-active);
}

.woocommerce .password-input {
  position: relative;
  display: block;
}

.woocommerce .password-input .input-text {
  padding-right: 4.5rem;
}

.woocommerce .show-password-input {
  position: absolute;
  inset: 50% var(--ds-16) auto auto;
  min-width: 2.5rem;
  padding: var(--ds-4);
  border: 0;
  background: transparent;
  color: var(--color-text-helper);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.woocommerce .show-password-input::before {
  content: 'Show';
  font-size: 0.75rem;
}

.woocommerce .show-password-input.display-password::before {
  content: 'Hide';
}

.woocommerce-password-strength {
  margin-top: var(--ds-8);
  padding: var(--ds-8) var(--ds-12);
  border-radius: var(--radius-md);
  background: var(--color-bg-weak);
  color: var(--color-text-helper);
  font-size: 0.875rem;
}

.woocommerce-password-strength.bad,
.woocommerce-password-strength.short {
  background: var(--color-danger-light);
  color: var(--color-danger-active);
}

.woocommerce-password-strength.good,
.woocommerce-password-strength.strong {
  background: var(--color-success-light);
  color: var(--color-gray-800);
}

.select2-container .select2-selection--single {
  min-height: var(--chali-control-height);
  border-color: var(--chali-control-border);
  border-radius: var(--radius-md);
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0.875rem 2.5rem 0.875rem var(--ds-16);
  color: var(--color-text-body);
  line-height: 1.5;
}

.select2-dropdown {
  border-color: var(--color-border-1);
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  box-shadow: var(--shadow-md);
}

/* Notices and feedback */

.woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
.woocommerce .wc-block-components-notice-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ds-16);
  width: 100%;
  margin: 0 0 var(--ds-24);
  padding: var(--ds-16) var(--ds-20);
  border: 1px solid var(--color-border-1);
  border-left: 3px solid var(--color-brand);
  border-radius: var(--radius-md);
  background: var(--color-brand-weak-accent);
  color: var(--color-text-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  list-style: none;
}

.woocommerce .woocommerce-message,
.woocommerce .wc-block-components-notice-banner.is-success {
  border-color: var(--color-border-1);
  border-left-color: var(--color-success-active);
  background: var(--color-success-light);
}

.woocommerce .woocommerce-error,
.woocommerce .wc-block-components-notice-banner.is-error {
  border-color: var(--color-border-1);
  border-left-color: var(--color-danger-active);
  background: var(--color-danger-light);
}

.woocommerce
  :is(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error,
    .wc-block-components-notice-banner
  ):is(:focus, :focus-visible) {
  outline: 0;
  outline-offset: 0;
  box-shadow: none;
}

.woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before,
.woocommerce .wc-block-components-notice-banner > svg {
  display: none;
}

.woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) li + li {
  margin-top: var(--ds-8);
}

.woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button,
.woocommerce
  .wc-block-components-notice-banner
  .wc-block-components-notice-banner__content
  .wc-forward {
  flex: none;
  min-height: auto;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-headings);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button:hover {
  background: transparent;
  color: var(--color-text-brand);
}

.woocommerce .blockUI.blockOverlay,
.wc-block-components-spinner {
  background-color: var(--color-overlay-white) !important;
}

/* Login, registration, password recovery */

.woocommerce-account .single-page {
  max-width: none;
  padding: 0;
}

.woocommerce-account .single-page > .my-auto,
.woocommerce-account .entry-content,
.woocommerce-account:not(.logged-in) .entry-content > .woocommerce {
  width: 100%;
}

.woocommerce-account:not(.logged-in) .entry-content > .woocommerce {
  position: relative;
  max-width: none;
  margin: 0;
}

.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper:not(:empty) {
  position: absolute;
  z-index: 4;
  inset: var(--ds-20) var(--side-margin) auto;
  width: min(42rem, calc(100% - (var(--side-margin) * 2)));
  margin-inline: auto;
}

.chali-account-auth {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100svh - var(--site-header-height));
  padding-inline: var(--side-margin);
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.chali-account-auth__background,
.chali-account-auth__shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chali-account-auth__background {
  object-fit: cover;
  object-position: center;
}

.chali-account-auth__shade {
  z-index: -1;
  background: rgb(24 21 20 / 18%);
}

.chali-account-auth__card {
  display: flex;
  flex-direction: column;
  gap: var(--ds-40);
  width: min(100%, 26.875rem);
  padding: var(--ds-40) var(--ds-32);
  border-radius: 0;
  background: var(--color-bg-light);
  box-shadow: var(--shadow);
}

.chali-account-auth--lost-password .chali-account-auth__card {
  gap: var(--ds-40);
}

.chali-account-auth__confirmation {
  align-items: center;
  gap: var(--ds-24);
  text-align: center;
}

.chali-account-auth__confirmation-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: var(--color-brand-weak-accent);
  color: var(--color-icon-brand);
  place-items: center;
}

.chali-account-auth__confirmation-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
}

.chali-account-auth__confirmation-help {
  margin: 0;
  color: var(--color-text-helper);
  font-size: 0.75rem;
  line-height: 1.125rem;
}

.chali-account-auth__confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: var(--ds-16);
  width: 100%;
}

.chali-account-auth__retry {
  align-self: center;
  color: var(--color-text-headings);
  font-size: 0.875rem;
  line-height: 1.3125rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.chali-account-auth__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-8);
  text-align: center;
}

.chali-account-auth__header h1 {
  margin: 0;
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-4);
  font-weight: var(--font-weight-title);
  line-height: var(--leading-heading-4);
}

.chali-account-auth__header p,
.chali-account-auth__helper,
.chali-account-auth__switch p {
  margin: 0;
  color: var(--color-text-body);
  font-size: 0.875rem;
  line-height: 1.3125rem;
}

.woocommerce-account .chali-account-auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--ds-24);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.woocommerce-account .chali-account-auth__form .form-row,
.woocommerce-account .chali-account-auth__form .form-row + .form-row {
  width: 100%;
  margin: 0;
}

.woocommerce-account .chali-account-auth__form :is(input.input-text, textarea, select) {
  min-height: 3rem;
  padding: 0.6875rem var(--ds-12);
  border-color: var(--color-border-1);
  border-radius: 0;
  font-size: 1rem;
  line-height: 1.5rem;
}

.chali-account-auth__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-16);
  color: var(--color-text-headings);
  font-size: 0.875rem;
  line-height: 1.3125rem;
}

.woocommerce-account .chali-account-auth__options .woocommerce-form-login__rememberme {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-12);
  margin: 0;
  font-size: inherit;
}

.woocommerce-account .chali-account-auth__options input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  border-radius: 0.125rem;
}

.chali-account-auth__options > a {
  text-decoration: underline;
}

.woocommerce-account .woocommerce .chali-account-auth__submit,
.woocommerce-account .woocommerce .chali-account-auth__secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  margin: 0;
  padding: var(--ds-16) var(--ds-64);
  border-radius: 0;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.5rem;
  white-space: nowrap;
}

.woocommerce-account .woocommerce .chali-account-auth__submit {
  border-color: var(--color-brand);
  background: var(--color-brand);
}

.woocommerce-account .woocommerce .chali-account-auth__submit:hover,
.woocommerce-account .woocommerce .chali-account-auth__submit:focus-visible {
  border-color: var(--color-brand-active);
  background: var(--color-brand-active);
}

.chali-account-auth__switch {
  display: flex;
  flex-direction: column;
  gap: var(--ds-24);
  text-align: center;
}

.woocommerce-account .woocommerce .chali-account-auth__secondary {
  border-color: var(--color-border-1);
  background: var(--color-bg-light);
  color: var(--color-text-headings);
}

.woocommerce-account .woocommerce .chali-account-auth__secondary:hover,
.woocommerce-account .woocommerce .chali-account-auth__secondary:focus-visible {
  border-color: var(--color-brand);
  background: var(--color-bg-light);
  color: var(--color-text-brand);
}

.chali-account-auth__back-to-login {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: var(--ds-12);
  color: var(--color-text-headings);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.chali-account-auth__back-to-login svg {
  flex: none;
}

/* Logged-in account and orders */

.woocommerce-account.logged-in .entry-content > .woocommerce {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100svh - var(--site-header-height));
  margin: 0;
  background: var(--color-bg-light);
}

.woocommerce-account .woocommerce-MyAccount-navigation {
  min-width: 0;
  padding: var(--ds-32) var(--side-margin);
  background: var(--color-bg-weak);
}

.chali-account-navigation__inner {
  display: flex;
  flex-direction: column;
  gap: var(--ds-24);
  width: 100%;
}

.chali-account-navigation__title {
  margin: 0;
  padding-inline: var(--ds-16);
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-4);
  font-weight: var(--font-weight-title);
  line-height: var(--leading-heading-4);
  text-transform: uppercase;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  gap: var(--ds-4);
  margin: 0;
  padding: 0 0 var(--ds-8);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
  flex: none;
}

.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li {
  margin: 0;
  padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: var(--ds-16);
  color: var(--color-text-body);
  text-decoration: none;
  white-space: nowrap;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li:not(.is-active) a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li:not(.is-active) a:focus-visible {
  color: var(--color-text-headings);
  background: var(--color-bg-light);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  text-decoration: none;
}

.chali-account-navigation__logout {
  padding: var(--ds-24) 0 0;
  border-top: 1px solid var(--color-border-1);
}

.woocommerce-account .chali-account-navigation__logout a {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-8);
  padding: 0 var(--ds-16);
}

.chali-account-navigation__logout img {
  flex: none;
  width: 1rem;
  height: 1rem;
}

.woocommerce-account .woocommerce-MyAccount-content {
  min-width: 0;
  padding: var(--ds-40) var(--side-margin) var(--ds-80);
}

.woocommerce-account .woocommerce-MyAccount-content > * + * {
  margin-top: var(--ds-16);
}

.woocommerce-account .woocommerce-MyAccount-content > p {
  max-width: 58rem;
  font-size: 0.875rem;
  line-height: 1.3125rem;
}

.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-info {
  display: grid;
  justify-items: center;
  padding-block: var(--ds-48);
  text-align: center;
}

.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-info::after {
  content: '';
  grid-row: 1;
  width: min(13.5rem, 62vw);
  height: 2.4rem;
  margin-bottom: var(--ds-16);
  background: url('/wp-content/themes/chali-theme/assets/images/empty.svg') center / contain
    no-repeat;
}

.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-info .button {
  margin: var(--ds-16) 0 0;
}

/* Subscription cancellation confirmation */

body.chali-subscription-cancel-dialog-open {
  overflow: hidden;
}

.chali-subscription-cancel-dialog {
  width: min(calc(100% - 2 * var(--ds-24)), 35rem);
  max-width: none;
  max-height: calc(100dvh - 2 * var(--ds-24));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--color-text-body);
  overflow: visible;
}

.chali-subscription-cancel-dialog::backdrop {
  background: var(--color-overlay-black);
  backdrop-filter: blur(2px);
}

.chali-subscription-cancel-dialog__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ds-20);
  padding: var(--ds-40);
  border-radius: var(--radius-lg);
  background: var(--color-bg-light);
  box-shadow: 0 1.5rem 4rem rgba(24, 21, 20, 0.24);
}

.chali-subscription-cancel-dialog__close {
  position: absolute;
  top: var(--ds-16);
  right: var(--ds-16);
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-icon-primary);
  font: inherit;
  cursor: pointer;
  place-items: center;
}

.chali-subscription-cancel-dialog__close:hover {
  background: var(--color-bg-weak);
}

.chali-subscription-cancel-dialog__close span {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.chali-subscription-cancel-dialog__title {
  margin: 0;
  padding-right: var(--ds-40);
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-4);
  font-weight: var(--font-weight-title);
  line-height: var(--leading-heading-4);
}

.chali-subscription-cancel-dialog__description {
  margin: 0;
  color: var(--color-text-body);
  line-height: 1.5;
}

.chali-subscription-cancel-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--ds-12);
  margin-top: var(--ds-12);
}

.woocommerce .chali-subscription-cancel-dialog__actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.woocommerce .chali-subscription-cancel-dialog__confirm,
.woocommerce .chali-subscription-cancel-dialog__confirm:hover,
.woocommerce .chali-subscription-cancel-dialog__confirm:focus-visible {
  border-color: var(--color-danger-active);
  background: var(--color-danger-active);
  color: var(--color-text-white);
}

/* Tea Club subscription and monthly fulfillment cards */

.woocommerce-account .chali-tea-club-account {
  display: grid;
  gap: var(--ds-24);
  max-width: 64rem;
  margin-top: var(--ds-48);
  padding-top: var(--ds-48);
  border-top: 1px solid var(--color-border-1);
}

.woocommerce-account .chali-tea-club-account__title,
.woocommerce-account .chali-tea-club-account__shipments-title,
.woocommerce-account .chali-tea-club-shipment-card__title {
  margin: 0;
}

.woocommerce-account .chali-tea-club-account__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-weak);
  overflow: hidden;
}

.woocommerce-account .chali-tea-club-account__summary-item {
  min-width: 0;
  padding: var(--ds-20) var(--ds-24);
  border-bottom: 1px solid var(--color-border-1);
}

.woocommerce-account .chali-tea-club-account__summary-item:last-child {
  border-bottom: 0;
}

.woocommerce-account .chali-tea-club-account__summary dt,
.woocommerce-account .chali-tea-club-shipment-card__meta dt {
  color: var(--color-text-helper);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.woocommerce-account .chali-tea-club-account__summary dd {
  margin: var(--ds-4) 0 0;
  color: var(--color-text-headings);
  font-weight: 500;
  line-height: 1.5;
}

.woocommerce-account .chali-tea-club-account__helper,
.woocommerce-account .chali-tea-club-account__notice,
.woocommerce-account .chali-tea-club-account__empty {
  margin: 0;
  padding: var(--ds-16) var(--ds-20);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  color: var(--color-text-helper);
  font-size: 0.875rem;
  line-height: 1.5;
}

.woocommerce-account .chali-tea-club-account__notice--alert {
  color: var(--color-danger-active);
}

.woocommerce-account .chali-tea-club-account__shipments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-24);
  margin-top: var(--ds-16);
}

.woocommerce-account .chali-tea-club-account__shipment-navigation {
  display: flex;
  flex-shrink: 0;
  gap: var(--ds-24);
}

.woocommerce-account .chali-tea-club-account__shipment-navigation button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-icon-primary);
}

.woocommerce-account .chali-tea-club-account__shipment-navigation svg {
  width: 2rem;
  height: 2rem;
}

.woocommerce-account .chali-tea-club-shipment-list:not(.keen-slider) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-24);
}

.woocommerce-account .chali-tea-club-shipment-list.keen-slider {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.woocommerce-account .chali-tea-club-shipment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
  overflow: hidden;
}

.woocommerce-account .chali-tea-club-shipment-card__media {
  display: grid;
  place-items: center;
  min-height: 12rem;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-weak);
  overflow: hidden;
}

.woocommerce-account .chali-tea-club-shipment-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woocommerce-account .chali-tea-club-shipment-card__media.is-placeholder {
  background: var(--color-bg-subtle);
}

.woocommerce-account .chali-tea-club-shipment-card__media.is-placeholder img {
  width: min(64%, 12rem);
  height: auto;
  object-fit: contain;
}

.woocommerce-account .chali-tea-club-shipment-card__content {
  min-width: 0;
  padding: var(--ds-24);
}

.woocommerce-account .chali-tea-club-shipment-card__month {
  margin: 0 0 var(--ds-8);
  color: var(--color-text-brand);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.woocommerce-account .chali-tea-club-shipment-card__meta {
  display: grid;
  margin: var(--ds-24) 0 0;
}

.woocommerce-account .chali-tea-club-shipment-card__meta-row {
  display: grid;
  gap: var(--ds-4);
  min-width: 0;
  padding-block: var(--ds-12);
  border-top: 1px solid var(--color-border-1);
}

.woocommerce-account .chali-tea-club-shipment-card__meta dd {
  min-width: 0;
  margin: 0;
  color: var(--color-text-body);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.woocommerce-account .chali-tea-club-shipment-card__status {
  display: inline-flex;
  width: fit-content;
  padding: var(--ds-4) var(--ds-12);
  border-radius: 999px;
  background: var(--color-bg-weak);
  color: var(--color-text-helper);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.woocommerce-account .chali-tea-club-shipment-card__status--confirmed {
  background: var(--color-brand-weak);
  color: var(--color-brand-active);
}

.woocommerce-account .chali-tea-club-shipment-card__status--shipped {
  background: var(--color-success-light);
  color: var(--color-success-active);
}

.woocommerce-account
  :is(.woocommerce-EditAccountForm, .woocommerce-address-fields, .woocommerce-form)
  fieldset {
  margin: var(--ds-32) 0 0;
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
}

.woocommerce-account fieldset legend {
  padding-inline: var(--ds-8);
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-6);
  font-weight: var(--font-weight-title);
}

.woocommerce-account .woocommerce-EditAccountForm > p:last-child,
.woocommerce-account .chali-tea-club-account > form {
  margin-top: var(--ds-20);
}

.woocommerce-account .woocommerce-Addresses {
  display: grid;
  gap: var(--ds-24);
}

.woocommerce-account .woocommerce-Address {
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
}

.woocommerce-account .woocommerce-Address-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ds-16);
  margin-bottom: var(--ds-16);
}

.woocommerce-account .woocommerce-Address-title h2 {
  margin: 0;
}

.woocommerce-account address {
  color: var(--color-text-helper);
  font-style: normal;
  line-height: 1.7;
}

.woocommerce-account .woocommerce-pagination {
  display: flex;
  justify-content: space-between;
  gap: var(--ds-16);
  margin-top: var(--ds-24);
}

/* Classic and account tables */

:is(.woocommerce, .order-confirmation-page-content) table.shop_table {
  width: 100%;
  margin: 0;
  border: 1px solid var(--color-border-1);
  border-collapse: collapse;
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
  overflow: hidden;
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table :is(th, td) {
  padding: var(--ds-16);
  border: 0;
  border-bottom: 1px solid var(--color-border-1);
  text-align: left;
  vertical-align: middle;
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table th {
  background: var(--color-bg-weak);
  color: var(--color-text-headings);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table tr:last-child > * {
  border-bottom: 0;
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table .product-thumbnail img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  background: var(--color-bg-weak);
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table .product-remove a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--color-text-helper);
  text-decoration: none;
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table .product-remove a:hover {
  color: var(--color-danger-active);
}

:is(.woocommerce, .order-confirmation-page-content) table.shop_table .button + .button {
  margin-left: var(--ds-8);
}

.woocommerce .woocommerce-order-details,
.woocommerce .woocommerce-customer-details,
.woocommerce-account .woocommerce-order-details > .order_details + header {
  margin-top: var(--ds-40);
}

.woocommerce .woocommerce-order-details > h2,
.woocommerce .woocommerce-customer-details > h2,
.woocommerce-account .woocommerce-order-details > .order_details + header > h2 {
  margin: 0 0 var(--ds-16);
}

.woocommerce .woocommerce-OrderUpdates {
  margin: var(--ds-16) 0 0;
  padding: 0;
  list-style: none;
}

.woocommerce .woocommerce-OrderUpdate {
  padding: var(--ds-16) 0 var(--ds-16) var(--ds-20);
  border-left: 1px solid var(--color-brand);
}

.woocommerce .woocommerce-OrderUpdate-meta {
  margin-bottom: var(--ds-8);
  color: var(--color-text-helper);
  font-size: 0.8125rem;
}

.woocommerce mark {
  padding: 0.1em 0.3em;
  background: var(--color-brand-weak-accent);
  color: var(--color-text-headings);
}

/* Cart Blocks */

.woocommerce-cart .cart-page-content {
  min-height: calc(100vh - var(--site-header-height));
}

.woocommerce-cart .cart-page-content > .wp-block-post-content,
.woocommerce-cart .wc-block-cart {
  max-width: none;
  margin: 0;
}

.woocommerce-cart .wp-block-woocommerce-filled-cart-block {
  max-width: var(--container-width);
  margin-inline: auto;
  padding: var(--ds-64) var(--side-margin) var(--ds-160);
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
  margin: 0;
  padding: 0;
}

.woocommerce-cart .wp-block-post-title,
.woocommerce-checkout .wp-block-post-title {
  margin-bottom: var(--ds-40);
  color: var(--color-text-headings);
  font-family: var(--font-title);
}

.wc-block-cart,
.wc-block-checkout {
  --wc-form-color-background: var(--color-bg-light);
  --wc-form-color-border: var(--color-border-1);
  --wc-form-color-text: var(--color-text-body);
  --wc-form-color-placeholder: var(--color-text-placeholder);
  --wc-form-color-action: var(--color-brand-active);
  margin: 0;
  color: var(--color-text-body);
}

.wc-block-components-sidebar-layout .wc-block-components-main,
.wc-block-components-sidebar-layout .wc-block-components-sidebar {
  min-width: 0;
}

.wc-block-cart-items {
  margin: 0;
  border-spacing: 0;
}

.wc-block-cart-items .wc-block-cart-items__row {
  border: 0;
}

.wc-block-cart-items .wc-block-cart-items__row > td {
  padding-block: var(--ds-24);
  border-bottom: 1px solid var(--color-border-1);
}

.wc-block-cart-items .wc-block-cart-item__image {
  padding-right: var(--ds-16);
}

.wc-block-cart-items .wc-block-cart-item__image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-bg-weak);
}

.wc-block-cart-items .wc-block-cart-item__product {
  min-width: 0;
}

.wc-block-components-product-name {
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-6);
  line-height: var(--leading-heading-6);
  text-decoration: none;
}

.wc-block-components-product-metadata,
.wc-block-components-product-details {
  color: var(--color-text-helper);
  font-size: 0.8125rem;
}

.wc-block-cart-item__prices,
.wc-block-components-product-price {
  color: var(--color-text-body);
}

.wc-block-components-quantity-selector {
  min-height: 2.5rem;
  border: 1px solid var(--color-border-1);
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  box-shadow: none;
}

.wc-block-components-quantity-selector::after {
  display: none;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  min-width: 2.5rem;
  padding: 0;
  border: 0;
  color: var(--color-text-headings);
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
  min-width: 2.25rem;
  color: var(--color-icon-primary);
  opacity: 1;
}

.wc-block-cart-item__remove-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-helper);
  font: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.wc-block-cart-item__remove-link:hover {
  color: var(--color-danger-active);
}

.wc-block-components-sidebar {
  align-self: start;
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
}

.wc-block-components-totals-wrapper {
  padding: var(--ds-16) 0;
  border-top: 1px solid var(--color-border-1);
}

.wc-block-components-totals-wrapper:first-child {
  border-top: 0;
}

.wc-block-components-totals-item {
  color: var(--color-text-body);
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  color: var(--color-text-headings);
  font-weight: 400;
}

.wc-block-components-totals-coupon__button {
  min-height: var(--chali-control-height);
}

.wc-block-cart__submit-container {
  margin-top: var(--ds-20);
}

.wc-block-cart__submit-button {
  width: 100%;
}

.wc-block-cart__payment-methods {
  margin-top: var(--ds-16);
  opacity: 0.7;
}

.wc-block-cart__empty-cart__title {
  margin: 0;
  padding-block: var(--ds-48) var(--ds-24);
  color: var(--color-text-headings);
  text-align: center;
}

.wc-block-cart__empty-cart__title::before {
  content: '';
  display: block;
  width: min(13.5rem, 62vw);
  height: 2.4rem;
  margin: 0 auto var(--ds-24);
  background: url('/wp-content/themes/chali-theme/assets/images/empty.svg') center / contain
    no-repeat;
}

.wp-block-woocommerce-empty-cart-block > .wp-block-separator.is-style-dots {
  margin-bottom: var(--ds-160);
  border: 0;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-40);
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-cart
  .wp-block-woocommerce-empty-cart-block
  .wc-block-grid__products
  > .wc-block-grid__product {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image {
  margin: 0 0 var(--ds-16);
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img {
  width: 100%;
  aspect-ratio: var(--aspect-square);
  object-fit: cover;
}

/* Checkout Blocks and classic checkout fallback */

.woocommerce-checkout .single-page {
  padding: 0;
}

.woocommerce-checkout :is(.wp-block-woocommerce-checkout, .order-confirmation-page-content) {
  max-width: var(--container-width);
  margin-inline: auto;
  padding: var(--ds-48) var(--side-margin) var(--ds-160);
}

.woocommerce-checkout .order-confirmation-page-content {
  width: 100%;
}

.wc-block-checkout__main {
  padding-right: 0;
}

.wc-block-components-checkout-step {
  margin: 0;
  padding: var(--ds-24) 0;
  border-bottom: 1px solid var(--color-border-1);
}

.wc-block-components-checkout-step:first-child {
  padding-top: 0;
}

.wc-block-components-checkout-step__heading {
  margin-bottom: var(--ds-16);
}

.wc-block-components-checkout-step__title {
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-5);
  font-weight: var(--font-weight-title);
  line-height: var(--leading-heading-5);
}

.wc-block-checkout
  .wp-block-woocommerce-checkout-order-summary-block
  .wc-block-components-checkout-order-summary__title-text {
  margin-bottom: 0;
}

.wc-block-components-checkout-step__description,
.wc-block-components-checkout-step__heading-content {
  color: var(--color-text-helper);
  font-size: 0.875rem;
}

.wc-block-components-address-form,
.wc-block-components-form .wc-block-components-text-input,
.wc-block-components-form .wc-block-components-combobox {
  gap: var(--ds-16);
}

.wc-block-components-text-input label,
.wc-block-components-combobox label {
  color: var(--color-text-helper);
}

.wc-block-components-validation-error {
  color: var(--color-danger-active);
  font-size: 0.8125rem;
}

.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
  padding: var(--ds-16);
  border: 1px solid var(--color-border-1);
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
}

.wc-block-components-radio-control-accordion-option {
  padding: 0;
}

.wc-block-components-radio-control-accordion-option > .wc-block-components-radio-control__option {
  padding-left: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wc-block-components-radio-control > .wc-block-components-radio-control__option {
  padding-left: 48px;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control__input {
  transform: translateY(-50%);
}

.wc-block-components-radio-control-accordion-option
  + .wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option + .wc-block-components-radio-control__option {
  margin-top: var(--ds-8);
}

.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control__option--checked {
  border-color: var(--color-brand-active);
  box-shadow: 0 0 0 1px var(--color-brand-active);
}

.wc-block-components-checkout-place-order-button {
  width: 100%;
  margin-top: var(--ds-20);
}

.woocommerce .checkout_coupon,
.woocommerce .woocommerce-form-login-toggle + .woocommerce-form-login {
  margin-bottom: var(--ds-24);
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
}

.woocommerce form.checkout {
  display: grid;
  gap: var(--ds-40);
}

.woocommerce form.checkout :is(#customer_details, #order_review) {
  min-width: 0;
}

.woocommerce form.checkout #order_review {
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
}

.woocommerce #payment {
  margin-top: var(--ds-24);
  background: transparent;
}

.woocommerce #payment ul.payment_methods {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.woocommerce #payment li.wc_payment_method {
  padding: var(--ds-16) 0;
  border-top: 1px solid var(--color-border-1);
}

.woocommerce #payment .payment_box {
  margin-top: var(--ds-12);
  padding: var(--ds-16);
  border-radius: var(--radius-md);
  background: var(--color-bg-weak);
  color: var(--color-text-helper);
}

.woocommerce #payment .place-order {
  margin-top: var(--ds-24);
}

.woocommerce #payment #place_order {
  width: 100%;
}

/* Order received, order payment and confirmation */

.woocommerce-order > * + * {
  margin-top: var(--ds-32);
}

.woocommerce-order .woocommerce-notice--success {
  padding: var(--ds-24);
  border-left: 3px solid var(--color-success-active);
  background: var(--color-success-light);
  color: var(--color-text-headings);
}

.woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--ds-16);
  margin: 0;
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
  list-style: none;
}

.woocommerce-order-overview li {
  min-width: 0;
  color: var(--color-text-helper);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-transform: uppercase;
}

.woocommerce-order-overview li strong {
  display: block;
  margin-top: var(--ds-4);
  color: var(--color-text-headings);
  font-size: 1rem;
  font-weight: 400;
  text-transform: none;
  overflow-wrap: anywhere;
}

.wc-block-order-confirmation-status,
.wc-block-order-confirmation-summary,
.wc-block-order-confirmation-totals,
.wc-block-order-confirmation-billing-address,
.wc-block-order-confirmation-shipping-address {
  margin-bottom: var(--ds-24);
  padding: var(--ds-24);
  border: 1px solid var(--color-border-1);
  border-radius: var(--chali-panel-radius);
  background: var(--color-bg-light);
}

.wc-block-order-confirmation-status h1 {
  margin: 0;
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-4);
  font-weight: var(--font-weight-title);
  line-height: var(--leading-heading-4);
}

.wc-block-order-confirmation-status h1 + p {
  margin: var(--ds-8) 0 0;
  color: var(--color-text-body);
  font-size: 1rem;
  line-height: 1.5;
}

.wc-block-order-confirmation-totals-wrapper > .wp-block-heading,
.wc-block-order-confirmation-totals > header h2,
:is(.wc-block-order-confirmation-billing-wrapper, .wc-block-order-confirmation-shipping-wrapper)
  > .wp-block-heading {
  margin: 0;
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-5);
  font-weight: var(--font-weight-title);
  line-height: var(--leading-heading-5);
}

.wc-block-order-confirmation-totals__table + header {
  margin-top: var(--ds-24);
}

.wc-block-order-confirmation-totals header + .woocommerce-MyAccount-subscriptions,
:is(.wc-block-order-confirmation-billing-wrapper, .wc-block-order-confirmation-shipping-wrapper)
  > .wp-block-heading
  + :is(
    .wc-block-order-confirmation-billing-address,
    .wc-block-order-confirmation-shipping-address
  ) {
  margin-top: var(--ds-16);
}

.order-confirmation-page-content .woocommerce-button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  white-space: nowrap;
}

/* Existing WooCommerce overlays and dialogs */

.wc-block-components-modal__screen-overlay,
.wc-block-components-drawer__screen-overlay,
.components-modal__screen-overlay,
.woocommerce .woocommerce-privacy-policy-text + .blockUI {
  background: var(--color-overlay-black);
  backdrop-filter: blur(0.25rem);
}

.wc-block-components-modal__content,
.wc-block-components-drawer__content,
.components-modal__frame,
.components-modal__content {
  border: 0;
  background: var(--color-bg-light);
  color: var(--color-text-body);
  box-shadow: var(--shadow-xl);
}

.wc-block-components-modal__header,
.wc-block-components-drawer__content > .components-modal__header,
.components-modal__header {
  padding: var(--ds-20) var(--ds-24);
  border-bottom: 1px solid var(--color-border-1);
}

.wc-block-components-modal__header h2,
.components-modal__header-heading {
  color: var(--color-text-headings);
  font-family: var(--font-title);
  font-size: var(--text-heading-5);
  font-weight: var(--font-weight-title);
}

.wc-block-components-modal__content > :not(.wc-block-components-modal__header),
.wc-block-components-drawer__content > :not(.components-modal__header) {
  padding-inline: var(--ds-24);
}

.wc-block-components-modal__header button,
.wc-block-components-drawer__content .components-button.has-icon {
  color: var(--color-icon-primary);
}

/* Empty classic cart and other empty states */

.woocommerce .cart-empty {
  display: grid;
  justify-items: center;
  padding-block: var(--ds-48);
  text-align: center;
}

.woocommerce .cart-empty::after {
  content: '';
  grid-row: 1;
  width: min(13.5rem, 62vw);
  height: 2.4rem;
  margin-bottom: var(--ds-16);
  background: url('/wp-content/themes/chali-theme/assets/images/empty.svg') center / contain
    no-repeat;
}

.woocommerce .return-to-shop {
  margin-top: var(--ds-20);
  text-align: center;
}

/* Responsive layout */

@media (min-width: 48rem) {
  .woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .woocommerce-Addresses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .chali-tea-club-account__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .chali-tea-club-account__summary-item:nth-child(odd) {
    border-right: 1px solid var(--color-border-1);
  }

  .woocommerce-account .chali-tea-club-account__summary-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .woocommerce-account .chali-tea-club-shipment-card {
    grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr);
  }

  .woocommerce-account .chali-tea-club-shipment-card__media {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .woocommerce-account .chali-tea-club-shipment-card__content {
    padding: var(--ds-32);
  }

  .woocommerce-account .chali-tea-club-shipment-card__meta-row {
    grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 1.2fr);
    gap: var(--ds-16);
  }

  .woocommerce .form-row-first,
  .woocommerce .form-row-last {
    width: calc(50% - var(--ds-8));
  }

  .woocommerce .form-row-first {
    float: left;
  }

  .woocommerce .form-row-last {
    float: right;
  }

  .woocommerce-account .chali-account-auth__form .form-row-first {
    float: none;
    width: 100%;
  }

  .woocommerce form.checkout {
    grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  }
}

@media (min-width: 62rem) {
  .woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .woocommerce-account.logged-in .entry-content > .woocommerce {
    grid-template-columns: minmax(20rem, 34.75vw) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .woocommerce-account .woocommerce-MyAccount-navigation {
    display: flex;
    justify-content: flex-end;
    padding: var(--ds-80) 0;
  }

  .chali-account-navigation__inner {
    width: 18.3125rem;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    flex-direction: column;
    padding: 0;
    overflow: visible;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li {
    width: 100%;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation a {
    width: 100%;
    padding: var(--ds-16);
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
  }

  .woocommerce-account .woocommerce-MyAccount-content {
    padding: var(--ds-80) var(--ds-144);
  }
}

@media (max-width: 47.98rem) {
  :where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) {
    --chali-control-height: 3.25rem;
  }

  .woocommerce-account
    :is(form.login, form.register, form.lost_reset_password):not(.chali-account-auth__form),
  .wc-block-components-sidebar,
  .woocommerce form.checkout #order_review {
    padding: var(--ds-20);
  }

  .chali-account-auth__background {
    object-position: 58% center;
  }

  .chali-account-auth__card {
    gap: var(--ds-32);
    padding: var(--ds-32) var(--ds-24);
  }

  .chali-subscription-cancel-dialog__panel {
    padding: var(--ds-32) var(--ds-24) var(--ds-24);
  }

  .chali-subscription-cancel-dialog__actions {
    flex-direction: column-reverse;
  }

  .woocommerce .chali-subscription-cancel-dialog__actions .button {
    width: 100%;
  }

  .chali-account-auth__options {
    align-items: flex-start;
  }

  .woocommerce-account .woocommerce .chali-account-auth__submit,
  .woocommerce-account .woocommerce .chali-account-auth__secondary {
    min-height: 3.25rem;
    padding-inline: var(--ds-24);
    font-size: 1rem;
  }

  .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
  .woocommerce .wc-block-components-notice-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .woocommerce :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button,
  .woocommerce .wc-block-components-notice-banner .wc-forward {
    margin-left: 0;
  }

  :is(.woocommerce, .order-confirmation-page-content) table.shop_table_responsive,
  :is(.woocommerce, .order-confirmation-page-content) table.shop_table_responsive :is(tbody, tr) {
    display: block;
    width: 100%;
  }

  :is(.woocommerce, .order-confirmation-page-content) table.shop_table_responsive thead {
    position: absolute;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    overflow: hidden;
  }

  :is(.woocommerce, .order-confirmation-page-content) table.shop_table_responsive tr {
    padding: var(--ds-12) var(--ds-16);
    border-bottom: 1px solid var(--color-border-1);
  }

  :is(.woocommerce, .order-confirmation-page-content) table.shop_table_responsive tr:last-child {
    border-bottom: 0;
  }

  :is(.woocommerce, .order-confirmation-page-content) table.shop_table_responsive :is(th, td) {
    display: grid;
    grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.2fr);
    gap: var(--ds-16);
    width: 100%;
    padding: var(--ds-8) 0;
    border: 0;
    text-align: right;
  }

  :is(.woocommerce, .order-confirmation-page-content)
    table.shop_table_responsive
    :is(th, td)[data-title]::before {
    content: attr(data-title);
    color: var(--color-text-helper);
    text-align: left;
  }

  :is(.woocommerce, .order-confirmation-page-content)
    table.shop_table_responsive
    .woocommerce-orders-table__cell-order-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    width: 100%;
    margin-top: var(--ds-32);
  }

  .wc-block-checkout
    .wp-block-woocommerce-checkout-order-summary-block
    :is(
      .wc-block-components-checkout-order-summary__title,
      .wc-block-components-checkout-order-summary__content
    ) {
    padding-inline: var(--ds-16);
  }

  .wc-block-components-modal__content,
  .wc-block-components-drawer__content {
    width: min(100%, 32rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) *,
  :where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) *::before,
  :where(.woocommerce, .woocommerce-page, .wc-block-cart, .wc-block-checkout) *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
