/**
 * Habesha Market - Shared button spec, add-to-cart confirmation, cart and checkout pages (first version)
 * Part of the site CSS moved from Customizer > Additional CSS on 2026-11-15 (original lines 720-854).
 * Files 01-08 load in number order; the order matters (later rules win), so keep it.
 */

/* === HM EMPTY CART (added 2026-09-19): replace the sad-face icon with a calm notice === */
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before { display: none; }
.wc-block-cart__empty-cart__title {
	max-width: 34rem;
	margin: 2rem auto 1rem;
	padding: 1rem 1.25rem;
	background: #F4F1EA;
	border: 1px solid var(--hm-border, #e4e0d6);
	border-left: 4px solid #545934;
	border-radius: 6px;
	font-size: 1.125rem;
	text-align: center;
}
/* === /HM EMPTY CART === */


/* === HM BUTTONS (added 2026-09-19): one shared button spec across the site - 14px semibold, 44px min height, 6px radius === */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce .single_add_to_cart_button,
.wp-block-button__link,
.wp-element-button,
.wc-block-components-button:not(.is-link) {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	box-sizing: border-box;
}
.wc-block-components-button:not(.is-link) .wc-block-components-button__text { font-size: 14px; }
/* === /HM BUTTONS === */
/* === HM BUTTONS (forms + cart block): same spec where plugin CSS is more specific === */
.wp-block-woocommerce-cart .wc-block-cart__submit-container a.wc-block-components-button.wc-block-components-button:not(.is-link),
.wp-block-woocommerce-cart .wc-block-components-button.wc-block-components-button:not(.is-link),
div.wpforms-container-full .wpforms-form button[type=submit].wpforms-submit {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 6px;
}
div.wpforms-container-full .wpforms-form { --wpforms-button-size-font-size: 14px; --wpforms-button-size-height: 44px; }
div.wpforms-container-full .wpforms-form button[type=submit].wpforms-submit { font-size: 14px !important; } /* WPForms sets its size inline via a variable; !important needed to beat it */
/* === /HM BUTTONS (forms + cart block) === */



/* === HM ADD TO CART (added 2026-09-19): confirmation after "Læg i kurv" - what was added, price, keep shopping or go to cart === */
.woocommerce-message:has(.hm-atc) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; background: #F4F1EA; border: 1px solid var(--hm-border, #e4e0d6); border-left: 4px solid #545934; border-radius: 6px; padding: 16px 20px; color: var(--global-palette3); }
.woocommerce-message:has(.hm-atc)::before { display: none; }
.hm-atc { display: flex; flex-direction: column; gap: 2px; }
.hm-atc__title { font-weight: 600; color: #545934; }
.hm-atc__item { font-size: .9375rem; }
.hm-atc__name { font-weight: 500; }
.hm-atc__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-message .hm-atc__actions .button, .hm-atc-toast .button { margin: 0; float: none; }
.hm-atc__continue, .woocommerce .hm-atc__continue, .hm-atc-toast .hm-atc__continue { background: transparent; color: #545934; border: 1px solid #545934; }
.hm-atc__continue:hover, .hm-atc__continue:focus { background: #545934; color: #fff; }
.hm-atc-toast { position: fixed; top: 88px; right: 16px; z-index: 9999; width: min(360px, calc(100vw - 32px)); box-sizing: border-box; background: #F4F1EA; border: 1px solid var(--hm-border, #e4e0d6); border-left: 3px solid #545934; border-radius: 8px; padding: 14px 44px 14px 16px; box-shadow: 0 4px 14px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 2px; }
.hm-atc-toast .hm-atc__title { font-size: .9375rem; }
.hm-atc-toast .hm-atc__item { display: flex; flex-direction: column; font-size: .875rem; line-height: 1.4; }
.hm-atc-toast .hm-atc__price { font-weight: 600; }
.hm-atc-toast__close { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; padding: 0; background: transparent; border: 0; border-radius: 6px; color: #545934; font-size: 22px; line-height: 1; cursor: pointer; }
.hm-atc-toast__close:hover { background: rgba(84,89,52,.1); }
.hm-atc-toast__close:focus-visible, .hm-atc-toast .button:focus-visible, .hm-atc .button:focus-visible { outline: 2px solid #545934; outline-offset: 2px; }
.hm-atc-toast .hm-atc__actions { margin-top: 10px; flex-wrap: nowrap; }
.hm-atc-toast .hm-atc__actions .button { flex: 1 1 0; padding: 0 10px; white-space: nowrap; }
@media (max-width: 600px) { .hm-atc-toast { top: 72px; left: 12px; right: 12px; width: auto; } }
/* Card button after a successful add: Kadence hides the label (font-size:0) and shows a lone check icon; show a compact labelled state instead */
.woocommerce ul.products li.product a.button.add_to_cart_button.added, .wc-block-grid__product .wp-block-button__link.added { font-size: 0; }
.woocommerce ul.products li.product a.button.add_to_cart_button.added { display: flex; align-items: center; justify-content: center; }
.woocommerce ul.products li.product a.button.add_to_cart_button.added::before { display: none; }
.woocommerce ul.products li.product a.button.add_to_cart_button.added .kadence-svg-iconset { display: none; }
.woocommerce ul.products li.product a.button.add_to_cart_button.added::after, .wc-block-grid__product .wp-block-button__link.added::after { display: inline; content: "\2713\00a0 Lagt i kurv"; font-size: 14px; font-weight: 600; }
a.added_to_cart.wc-forward { display: none; }
/* === /HM ADD TO CART === */


/* === HM CART PAGE (added 2026-09-19): cart layout - centred container, refined line items, sticky summary card === */
.woocommerce-cart .wp-block-woocommerce-cart { max-width: 1120px; width: 100%; margin-inline: auto; padding-inline: 16px; box-sizing: border-box; }
.woocommerce-cart .wc-block-cart { margin-bottom: 3rem; }
.woocommerce-cart .wc-block-cart-items { border-collapse: collapse; }
.woocommerce-cart .wc-block-cart-items__header th { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--global-palette5); padding-bottom: 12px; }
.woocommerce-cart .wc-block-cart-items__row td { padding-top: 24px; padding-bottom: 24px; vertical-align: top; }
.woocommerce-cart .wc-block-cart-item__image img { border-radius: 6px; border: 1px solid var(--hm-border, #e4e0d6); background: #fff; }
.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-name { font-weight: 600; font-size: 1rem; color: #2e3320; text-decoration: none; }
.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-metadata { color: var(--global-palette5); }
.woocommerce-cart .wc-block-components-quantity-selector { border-radius: 6px; background: #fff; min-height: 40px; }
.woocommerce-cart .wc-block-components-quantity-selector::after { border-radius: 6px; border-color: var(--hm-border, #cfc9bb); }
.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price { font-weight: 600; font-size: 1rem; }
.woocommerce-cart .wc-block-cart__sidebar { box-sizing: border-box; background: #F4F1EA; border: 1px solid var(--hm-border, #e4e0d6); border-radius: 8px; padding: 24px; align-self: flex-start; }
.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 1.25rem; font-weight: 600; color: #2e3320; }
.woocommerce-cart .wc-block-cart__submit-container { margin-top: 16px; }
.woocommerce-cart .wc-block-cart__submit-button { width: 100%; }
@media (min-width: 1024px) { .woocommerce-cart .wc-block-cart__sidebar { position: sticky; top: 110px; } }
@media (max-width: 781px) { .woocommerce-cart .wc-block-cart__sidebar { padding: 16px; } }
/* === /HM CART PAGE === */


/* === HM CHECKOUT PAGE (added 2026-09-19): numbered steps, consistent fields, sticky cream order-summary card === */
.woocommerce-checkout .wp-block-woocommerce-checkout { max-width: 1120px; width: 100%; margin-inline: auto; padding-inline: 16px; box-sizing: border-box; counter-reset: hm-step; }
.woocommerce-checkout .wc-block-components-checkout-step { counter-increment: hm-step; }
.woocommerce-checkout .wc-block-components-checkout-step__title { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; }
.woocommerce-checkout .wc-block-components-checkout-step__title::before { content: counter(hm-step); flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #545934; color: #fff; font-family: var(--global-body-font-family, inherit); font-size: .8125rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.woocommerce-checkout .wc-block-components-text-input input,
.woocommerce-checkout .wc-block-components-combobox .components-combobox-control__input,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
.woocommerce-checkout .wc-block-components-textarea { border-radius: 6px; border-color: var(--hm-border, #cfc9bb); background: #fff; }
.woocommerce-checkout .wc-block-components-text-input input:focus,
.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus { border-color: #545934; box-shadow: 0 0 0 1px #545934; outline: 0; }
.woocommerce-checkout .wc-block-components-radio-control__option,
.woocommerce-checkout .wc-block-components-radio-control-accordion-option { border-radius: 6px; }
.woocommerce-checkout .wc-block-components-radio-control__option-checked { border-color: #545934; }
.woocommerce-checkout .wc-block-components-address-card { border-radius: 6px; background: #fff; }
.woocommerce-checkout .wc-block-checkout__sidebar { box-sizing: border-box; background: #F4F1EA; border: 1px solid var(--hm-border, #e4e0d6); border-radius: 8px; padding: 24px; align-self: flex-start; }
.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary,
.woocommerce-checkout .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block { border: 0; background: transparent; padding: 0; }
.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 1.25rem; font-weight: 600; color: #2e3320; }
.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button.wc-block-components-button:not(.is-link) { min-height: 44px; font-size: 14px; font-weight: 600; border-radius: 6px; }
@media (min-width: 1024px) { .woocommerce-checkout .wc-block-checkout__sidebar { position: sticky; top: 110px; } }
@media (max-width: 781px) { .woocommerce-checkout .wc-block-checkout__sidebar { padding: 16px; } }
/* === /HM CHECKOUT PAGE === */

