/* cart-checkout: styles for this area only. Global tokens/components stay in theme.css.
   Cart, Checkout and Order confirmation in the homepage style: Oswald caps titles, cream tiles,
   paper summary cards, pill buttons, trust-icon circles. */

.nv-cc { --nv-line: var(--wp--preset--color--sand); }
.nv-cc .nv-cc__title { margin: 0 0 1.25rem; }
.nv-cc .wc-block-components-sidebar-layout { margin-bottom: 0; }

/* ---------- Shared form + button look (cart and checkout blocks) ---------- */
.nv-cc .wc-block-components-button:not(.is-link) {
  border-radius: 999px; min-height: 52px; font-weight: 700; font-size: 1rem;
  background: var(--wp--preset--color--maroon); color: #fff; transition: background-color .15s, transform .1s;
}
.nv-cc .wc-block-components-button:not(.is-link):hover { background: var(--wp--preset--color--maroon-deep); color: #fff; }
.nv-cc .wc-block-components-button:not(.is-link):active { transform: translateY(1px); }
/* Place Order while ordering is off (inc/cart-checkout.php disables it and relabels it "Ordering opens soon") */
.nv-cc .wc-block-components-button:not(.is-link):disabled { background: var(--wp--preset--color--sand); color: var(--wp--preset--color--ink); opacity: 1; cursor: not-allowed; transform: none; }
.nv-cc .wc-block-components-text-input input[type],
.nv-cc .wc-block-components-form .wc-block-components-text-input input[type],
.nv-cc .wc-block-components-textarea,
.nv-cc .wc-blocks-components-select .wc-blocks-components-select__select {
  border: 1px solid var(--wp--preset--color--ink-soft); border-radius: var(--nv-radius-sm); background: #fff;
}
.nv-cc .wc-block-components-text-input input[type]:focus,
.nv-cc .wc-block-components-form .wc-block-components-text-input input[type]:focus,
.nv-cc .wc-block-components-textarea:focus,
.nv-cc .wc-blocks-components-select .wc-blocks-components-select__select:focus {
  border-color: var(--wp--preset--color--maroon); box-shadow: 0 0 0 1px var(--wp--preset--color--maroon); outline: 0;
}
.nv-cc .wc-block-components-text-input.has-error input[type] { border-color: var(--wp--preset--color--tomato); box-shadow: 0 0 0 1px var(--wp--preset--color--tomato); }
.nv-cc .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] { border-color: var(--wp--preset--color--ink-soft); border-radius: 4px; }
.nv-cc .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked { background: var(--wp--preset--color--maroon); border-color: var(--wp--preset--color--maroon); }
.nv-cc .wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: #fff; }
.nv-cc .wc-block-components-checkbox label { min-height: 44px; align-items: center; }
.nv-cc .wc-block-components-panel__button { display: flex; align-items: center; min-height: 44px; padding-block: 0; font-weight: 600; color: var(--wp--preset--color--maroon); }
.nv-cc .wc-block-components-panel__button > .wc-block-components-panel__button-icon { top: 50%; transform: translateY(-50%); }
.nv-cc .wc-block-components-panel__button[aria-expanded=true] > .wc-block-components-panel__button-icon { transform: translateY(-50%) rotate(180deg); }

/* Summary card (cart totals + checkout order summary) */
.nv-cc .wc-block-cart__sidebar.wc-block-cart__sidebar,
.nv-cc .wp-block-woocommerce-checkout-order-summary-block {
  background: var(--wp--preset--color--paper); border: 1px solid var(--nv-line); border-radius: var(--nv-radius);
}
.nv-cc .wc-block-cart__sidebar.wc-block-cart__sidebar { padding: 1.25rem 1.5rem 1.5rem; align-self: flex-start; }
.nv-cc .wc-block-cart__totals-title,
.nv-cc .wc-block-components-checkout-order-summary__title-text {
  font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  font-size: 1.35rem; color: var(--wp--preset--color--maroon); padding: 0;
}
.nv-cc .wc-block-cart__totals-title { margin: 0 0 .5rem !important; }
.nv-cc .wc-block-components-totals-wrapper { border-color: var(--nv-line); }
.nv-cc .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.nv-cc .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 700; color: var(--wp--preset--color--maroon-deep); }

/* applied coupon chip: code in capitals like the offer bar (Woo stores it lowercase); 44px hit area around Woo's 16px x, without growing the chip */
.nv-cc .wc-block-components-chip__text { text-transform: uppercase; }
.nv-cc .wc-block-components-chip .wc-block-components-chip__remove {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: content-box;
  padding: 14px; margin: -14px -14px -14px -6px; background-clip: content-box;
}
/* snackbars (coupon applied/removed, "<item> removed"): green notice.
   Tablet (one column, short page): inline at the top of the cart.
   Phones and desktop: an inline notice is off-screen once scrolled to a lower line or the coupon form, and the old toast under
   the header covered the heading / first stepper, so they sit at the bottom (phones full width, desktop bottom-left) and
   inc/cart-checkout.php slides them up to the nearest gap between controls via --nv-toast-bottom.
   Checkout (long form, coupon near the bottom): the same fixed toast at every width; inline it rendered far above the viewport. */
.nv-cc .wc-block-components-notices__snackbar.wc-block-components-notice-snackbar-list { position: static; width: auto; height: auto; padding: 0; margin: 0; }
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner { width: 100%; max-width: none; margin: 0 0 1rem; box-sizing: border-box; }
/* one toast at a time: the newest replaces the older one (stacked toasts left no free gap to sit in) */
.nv-cc .wc-block-components-notices__snackbar .wc-block-components-notice-snackbar:not(:last-child) { display: none; }
.nv-cc:is(:has(.wc-block-cart.is-mobile), :has(.wc-block-cart.is-large), :has(.wc-block-checkout)) .wc-block-components-notices__snackbar.wc-block-components-notice-snackbar-list {
  position: fixed; top: auto; bottom: var(--nv-toast-bottom, 16px); left: 16px; z-index: 100; width: calc(100% - 32px); box-sizing: border-box;
}
.nv-cc:is(:has(.wc-block-cart.is-large), :has(.wc-block-checkout.is-large)) .wc-block-components-notices__snackbar.wc-block-components-notice-snackbar-list { left: 24px; width: min(420px, calc(100% - 48px)); }
.nv-cc:is(:has(.wc-block-cart.is-mobile), :has(.wc-block-cart.is-large), :has(.wc-block-checkout)) .wc-block-components-notice-snackbar.wc-block-components-notice-banner { margin: .5rem 0 0; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
/* no free gap on screen (inc/cart-checkout.php): inline above the items rather than over a total or control */
.nv-toast-inline .nv-cc .wc-block-components-notices__snackbar.wc-block-components-notice-snackbar-list { position: static !important; width: auto !important; }
.nv-toast-inline .nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner { margin: 0 0 1rem !important; box-shadow: none !important; }
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner.is-info,
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner.is-default {
  background: #F2FAF3; border: 1px solid var(--wp--preset--color--green); color: var(--wp--preset--color--ink);
}
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner.is-info > svg,
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner.is-default > svg { display: none; }
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner.is-info::before,
.nv-cc .wc-block-components-notice-snackbar.wc-block-components-notice-banner.is-default::before {
  content: ""; flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--wp--preset--color--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.nv-cc .wc-block-components-notice-banner > .wc-block-components-button.wc-block-components-notice-banner__dismiss {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
  width: 44px !important; height: 44px !important; margin: -14px -14px -14px auto !important; color: var(--wp--preset--color--ink) !important;
}
/* Empty state */
.nv-cc .nv-cc-empty { padding: var(--wp--preset--spacing--30) 0 var(--wp--preset--spacing--40); }
.nv-cc .nv-cc-empty .nv-h { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.nv-cc .nv-cc-empty__text { color: var(--wp--preset--color--ink-soft); margin: 0 0 1.25rem; }
.nv-cc .nv-cc-empty .wp-block-button__link { padding: .9rem 2rem; font-weight: 700; }
.nv-cc .nv-cc-empty__products { border-top: 1px solid var(--nv-line); padding-top: var(--wp--preset--spacing--40); }
.nv-cc .nv-cc-empty__products .nv-h { margin-bottom: 1.5rem; }

/* ---------- Checkout ---------- */
/* "Create an account" password: one 8 character rule (inc/cart-checkout.php), no weak/strong meter */
.wc-block-checkout .wc-block-components-password-strength { display: none; }
/* "Already have an account? Log in": 44px tap target */
.nv-cc .wc-block-checkout__login-prompt { display: inline-flex; align-items: center; min-height: 44px; }
.nv-cc-header { border-bottom: 1px solid var(--wp--preset--color--sand); }
.nv-cc-header__logo img { max-height: 52px; width: auto; }
.nv-cc-secure {
  margin: 0; display: inline-flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 600; color: var(--wp--preset--color--green-deep);
}
.nv-cc-secure::before {
  content: ""; width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: var(--wp--preset--color--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.nv-cc--checkout .wc-block-components-checkout-step__title { font-size: 1.4rem; }
.nv-cc--checkout .wc-block-components-checkout-step__heading { margin-bottom: .75rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
.nv-cc--checkout .wc-block-checkout__login-prompt { margin: 0; float: none; }   /* "Log in" on the heading's baseline */
/* desktop: ORDER SUMMARY on one line with CONTACT INFORMATION (same size; its 16px top margin pushed the card down) */
.nv-cc--checkout .wc-block-components-checkout-order-summary__title > .wc-block-components-checkout-order-summary__title-text.wc-block-components-checkout-order-summary__title-text { font-size: 1.4rem; line-height: 1.4; }
.nv-cc--checkout .wc-block-checkout.is-large .wc-block-components-checkout-order-summary__title { margin-top: 0; }
.nv-cc--checkout .wp-block-woocommerce-checkout-order-summary-block { padding-bottom: .25rem; }
/* below desktop Woo shows the summary twice (collapsed bar on top + full card above Place Order): keep only the card.
   (.wc-block-checkout is also on the outer block wrapper, which never gets the size class) */
.nv-cc .wc-block-components-sidebar-layout.wc-block-checkout:not(.is-large) > .wc-block-checkout__sidebar { display: none; }
.nv-cc .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block,
.nv-cc .wp-block-woocommerce-checkout-order-summary-block.checkout-order-summary-block-fill-wrapper { background: none; border: 0; border-radius: 0; padding: 0; }
.nv-cc .checkout-order-summary-block-fill { margin-bottom: 1.25rem; background: var(--wp--preset--color--paper); border: 1px solid var(--nv-line); border-radius: var(--nv-radius); }
.nv-cc--checkout .wc-block-components-order-summary-item .wc-block-components-product-name { font-size: .95rem; }
.nv-cc--checkout .wc-block-components-order-summary-item__image img { background: var(--wp--preset--color--cream); border-radius: 8px; }
.nv-cc--checkout .wc-block-components-order-summary-item__quantity { background: var(--wp--preset--color--maroon); color: #fff; border-color: #fff; }
/* "No payment methods" stays truthful but reads as information, not an error */
.nv-cc .wc-block-checkout__no-payment-methods-notice.wc-block-components-notice-banner {
  background: var(--wp--preset--color--cream); border: 1px solid var(--nv-line); border-radius: var(--nv-radius-sm); color: var(--wp--preset--color--ink); font-size: .95rem;
}
.nv-cc .wc-block-checkout__no-payment-methods-notice.wc-block-components-notice-banner > svg { background: var(--wp--preset--color--maroon); fill: #fff; }
.nv-cc .wc-block-checkout__terms { font-size: .9rem; }
/* policy links on their own line under the terms box (inc/cart-checkout.php), each a 44px target */
.nv-cc .wc-block-checkout__terms:has(+ .nv-terms-links) { margin-bottom: 0; }
.nv-cc .nv-terms-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0 0 1.5rem; font-size: .9rem; }
.nv-cc .nv-terms-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--wp--preset--color--maroon); }

/* ---------- Order confirmation ---------- */
.nv-cc--thanks > * + * { margin-top: var(--wp--preset--spacing--40); }
.nv-cc .wc-block-order-confirmation-status h1 { margin: 0 0 .5rem; }
.nv-cc .wc-block-order-confirmation-status p { margin: 0; font-size: 1.1rem; color: var(--wp--preset--color--ink-soft); }
.nv-cc .wc-block-order-confirmation-summary-list {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none;
  background: var(--wp--preset--color--paper); border: 1px solid var(--nv-line); border-radius: var(--nv-radius);
}
.nv-cc .wc-block-order-confirmation-summary-list-item { flex: 1 1 auto; margin: 0; padding: 1rem 1.25rem; border-right: 1px solid var(--nv-line); }
.nv-cc .wc-block-order-confirmation-summary-list-item:last-child { border-right: 0; }
.nv-cc .wc-block-order-confirmation-summary-list .wc-block-order-confirmation-summary-list-item__key { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--ink-soft); }
.nv-cc .wc-block-order-confirmation-summary-list .wc-block-order-confirmation-summary-list-item__value { display: block; font-weight: 700; font-size: 1rem; color: var(--wp--preset--color--ink); overflow-wrap: break-word; }
.nv-cc .wc-block-order-confirmation-totals-wrapper h2,
.nv-cc .wc-block-order-confirmation-address-wrapper h2,
.nv-cc .wc-block-order-confirmation-additional-fields-wrapper h2 { font-size: 1.6rem; margin: 0 0 .75rem; }
.nv-cc .wc-block-order-confirmation-totals table { border: 1px solid var(--nv-line); border-radius: var(--nv-radius); border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; }
.nv-cc .wc-block-order-confirmation-totals th,
.nv-cc .wc-block-order-confirmation-totals td { border: 0; border-bottom: 1px solid var(--nv-line); padding: .8rem 1.25rem; }
.nv-cc .wc-block-order-confirmation-totals thead th { background: var(--wp--preset--color--paper); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--ink-soft); }
.nv-cc .wc-block-order-confirmation-totals tfoot tr:last-child > * { border-bottom: 0; font-weight: 700; color: var(--wp--preset--color--maroon-deep); }
.nv-cc .wc-block-order-confirmation-totals a { color: var(--wp--preset--color--ink); font-weight: 600; }
.nv-cc .wc-block-order-confirmation-address-wrapper .wc-block-order-confirmation-billing-address,
.nv-cc .wc-block-order-confirmation-address-wrapper .wc-block-order-confirmation-shipping-address {
  box-sizing: border-box; padding: 1rem 1.25rem; line-height: 1.6;
  background: var(--wp--preset--color--paper); border: 1px solid var(--nv-line); border-radius: var(--nv-radius);
}
.nv-cc .wc-block-order-confirmation-address-wrapper :is(.wc-block-order-confirmation-billing-address, .wc-block-order-confirmation-shipping-address) { max-width: 32rem; font-size: 1rem; }
.nv-cc .wc-block-order-confirmation-address-wrapper address { font-style: normal; font-size: inherit; margin: 0; padding: 0; border: 0; background: none; }
.nv-cc .wc-block-order-confirmation-address-wrapper p { margin: .25rem 0 0; font-size: inherit; }
.nv-cc .wc-block-order-confirmation-order-note { margin-top: 1rem; padding: .9rem 1.25rem; font-size: .95rem; background: var(--wp--preset--color--cream); border-radius: var(--nv-radius-sm); }
.nv-cc .wc-block-order-confirmation-order-note p { margin: 0; }
.nv-cc .wc-block-order-confirmation-order-note__label { font-weight: 700; }
/* payment instructions (Cash on Delivery) right under the order summary */
.nv-cc .nv-cc-payinfo:not(:empty) { box-sizing: border-box; padding: .9rem 1.25rem; font-size: 1rem; background: var(--wp--preset--color--cream); border-left: 4px solid var(--wp--preset--color--maroon); border-radius: var(--nv-radius-sm); }
.nv-cc .nv-cc-payinfo p { margin: 0; }

/* shipped order: Advanced Shipment Tracking's card (inc/cart-checkout.php), styled like the one in My account */
.nv-cc .nv-cc-tracking h2 { font-size: 1.6rem; margin: 0 0 .75rem; }
.nv-cc .nv-cc-tracking .fluid_section { margin: 0; }
.nv-cc .nv-cc-tracking .fluid_container { box-sizing: border-box; border-radius: var(--nv-radius); border-color: var(--nv-line); background: var(--wp--preset--color--paper); align-items: center; margin: 0; }
.nv-cc .nv-cc-tracking .fluid_cl { padding: 1rem 1.25rem; box-sizing: border-box; }
.nv-cc .nv-cc-tracking .fluid_right_cl { padding-top: 1rem; width: auto; }
.nv-cc .nv-cc-tracking .tracking_provider { font-size: 1.05rem; }
.nv-cc .nv-cc-tracking .tracking_number { display: inline-block; color: var(--wp--preset--color--maroon); font-weight: 600; letter-spacing: .03em; }
.nv-cc .nv-cc-tracking .order_status { font-size: .85rem; color: var(--wp--preset--color--ink-soft); }
.nv-cc .nv-cc-tracking a.button.track-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; border-radius: 999px; font-weight: 700; white-space: nowrap; padding: .6rem 1.25rem; background: var(--wp--preset--color--maroon); color: #fff; }
.nv-cc .nv-cc-tracking a.button.track-button:hover { background: var(--wp--preset--color--maroon-deep); }

/* What happens next: trust-icon circles reuse .nv-usp from theme.css */
.nv-next { padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30); border-radius: var(--nv-radius); background: var(--wp--preset--color--cream); }
.nv-next .nv-h { font-size: clamp(1.6rem, 3vw, 2.1rem); text-align: center; }
.nv-next__steps { gap: 1.5rem; margin: 1.5rem 0; text-align: center; }
.nv-next .nv-usp { font-size: .9rem; }
.nv-next--mail { --bg: var(--wp--preset--color--maroon); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.nv-next--track { --bg: var(--wp--preset--color--saffron); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6-5.5-6-11a6 6 0 0 1 12 0c0 5.5-6 11-6 11z'/%3E%3Ccircle cx='12' cy='10' r='2.2'/%3E%3C/svg%3E"); }
.nv-next__buttons { justify-content: center; gap: .75rem; }
.nv-next__buttons .wp-block-button__link { display: inline-flex; align-items: center; min-height: 48px; box-sizing: border-box; font-weight: 700; padding-inline: 1.75rem; }
.nv-next__buttons .is-style-outline .wp-block-button__link { background: transparent; }
/* order hidden behind Woo's confirm-email / log-in notice: no steps, so no panel; Continue shopping sits under that form */
.nv-next:not(:has(.nv-next__steps)) { padding: 0; background: none; }
.nv-next:not(:has(.nv-next__steps)) > .nv-next__buttons { justify-content: flex-start; max-width: none; margin-left: 0; }

@media (max-width: 781px) {
  .nv-next__steps { grid-template-columns: 1fr !important; gap: 1.25rem; }
  .nv-next .nv-usp { padding-top: 0; padding-left: 4.5rem; min-height: 56px; text-align: left; }
  .nv-next .nv-usp::before { width: 56px; height: 56px; left: 0; transform: none; background-size: 26px; }
  /* half-width cells; one too long for half (the email) takes its own row and breaks only if it must */
  .nv-cc .wc-block-order-confirmation-summary-list-item { flex: 1 1 auto; min-width: 50%; box-sizing: border-box; border-right: 0; border-bottom: 1px solid var(--nv-line); }
  .nv-cc .wc-block-order-confirmation-summary-list-item:last-child { border-bottom: 0; }
}
@media (max-width: 599px) {
  .nv-cc-header__logo img { max-height: 44px; }
  .nv-next__buttons .wp-block-button { width: 100%; }
  .nv-next__buttons .wp-block-button__link { width: 100%; justify-content: center; }
}

/* "Online ordering opens soon" (inc/cart-checkout.php, only while no payment method is on) */
.nv-cc-soon { box-sizing: border-box; margin: 0 0 1.25rem; padding: .85rem 1.1rem; border-left: 4px solid var(--wp--preset--color--saffron); border-radius: var(--nv-radius-sm); background: var(--wp--preset--color--cream); font-size: .95rem; font-weight: 600; color: var(--wp--preset--color--ink); }

/* touch screens (iPad landscape is 1024): 44px tap areas for the small links. Padding grows the box, the equal negative margin
   keeps the text where it was (inline-block, so the margins never collapse into the row) */
@media (max-width: 1023px), (pointer: coarse) {
  .nv-cc .wc-block-cart-item__image a { display: block; }
  .nv-cc .wc-block-cart-item__product a.wc-block-components-product-name,
  .nv-cc .wc-block-order-confirmation-totals td a,
  .nv-cc .nv-cc-tracking a.tracking_number { display: inline-block; padding-block: 13px; margin-block: -13px; }
  .nv-cc .nv-cc-tracking .tracking_provider { display: block; }   /* tracking number stays on its own line */
  .nv-cc .wc-block-components-address-card__edit { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -13px -10px; }
}
