/* Shared frontend feedback. Native WooCommerce markup and live regions stay intact. */
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error, .hm-cart-status):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty):not(:where(.hm-order-coupon .woocommerce-form-coupon-toggle .woocommerce-info)),
body .catalog .alertinfo {
  --hm-notice-ink: #242424;
  --hm-notice-icon-color: #464c78;
  --hm-notice-surface: #eeeef4;
  --hm-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M12 11v6M12 7v.5' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  position: relative;
  display: flow-root;
  box-sizing: border-box;
  min-height: 72px;
  margin: 0 0 24px;
  padding: 24px 28px 24px 76px;
  border: 0;
  border-radius: 0;
  background: var(--hm-notice-surface);
  color: var(--hm-notice-ink);
  font: 400 16px/1.55 "Exo 2", sans-serif;
  list-style: none;
  overflow-wrap: anywhere;
}
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error, .hm-cart-status):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty):not(:where(.hm-order-coupon .woocommerce-form-coupon-toggle .woocommerce-info))::before,
body .catalog .alertinfo::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 28px;
  width: 24px;
  height: 24px;
  background: var(--hm-notice-icon-color);
  -webkit-mask: var(--hm-notice-icon) center / contain no-repeat;
  mask: var(--hm-notice-icon) center / contain no-repeat;
}
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .hm-cart-status)::after { content: none; }
body .woocommerce-message:not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty) {
  --hm-notice-surface: #464c78;
  --hm-notice-ink: #fff;
  --hm-notice-icon-color: #fff;
  --hm-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='black' stroke-width='1.5'/%3E%3Cpath d='m8 12 3 3 5-6' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body :is(.woocommerce-error, .woocommerce-notice--error, .hm-cart-needs-retry .hm-cart-status):not(.woocommerce-thankyou-order-failed-actions):not(:empty),
body .hm-cart-checkout:has(.hm-checkout-retry:not([hidden])) .hm-cart-status:not(:empty) {
  --hm-notice-surface: #fff0ec;
  --hm-notice-ink: #242424;
  --hm-notice-icon-color: #a82f12;
  --hm-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m12 3 10 18H2L12 3Z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M12 9v5M12 17v.5' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error) a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) li { margin: 0; padding: 0; list-style: none; }
body .woocommerce-error li + li { margin-top: 8px; }
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error) .button,
body .catalog .alertinfo .button {
  display: inline-flex;
  float: none;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  margin: 12px 16px 0 0;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 70px;
  background: transparent;
  background-image: none;
  color: inherit;
  font: 400 15px/1.35 "Petrovsans Book", sans-serif;
  text-decoration: none;
  white-space: normal;
  filter: none;
  box-shadow: none;
}
/* Woo's success action precedes the text: keep it on the right when space permits. */
body :is(.woocommerce-message, .woocommerce-info) > .button { float: right; margin: -10px 0 -10px 24px; }
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error, .alertinfo) .button:hover { background: var(--hm-notice-ink); color: var(--hm-notice-surface); border-color: var(--hm-notice-ink); }
body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error, .alertinfo) :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
body .catalog .alertinfo p { margin: 0; max-width: 70ch; color: inherit; font: inherit; }
body .catalog .alertinfo .button { margin-top: 16px; }

/* Account feedback stays compact; native message text and action links stay intact. */
body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty) {
  --hm-notice-surface: #eeeef4;
  --hm-notice-ink: #000;
  --hm-notice-icon-color: #464c78;
  min-height: 0;
  margin-bottom: 20px;
  padding: 16px 16px 16px 48px;
  color: #000;
  font-size: 14px;
  line-height: 1.5;
}
body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty)::before { top: 16px; left: 16px; width: 20px; height: 20px; }
body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty):has(> .button) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; }
body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error) > .button { grid-column: 2; grid-row: 1; order: 1; justify-self: start; float: none; max-width: 100%; min-height: 44px; margin: 0; padding: 10px 16px; border: 0; background: var(--violet, #464c78); color: #fff; font-size: 14px; }
body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error) .button:hover { background: #383d60; color: #fff; }
@media (max-width: 900px) {
  body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty):has(> .button) { grid-template-columns: minmax(0, 1fr); }
  body .hm-account-page :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error) > .button { grid-column: 1; grid-row: auto; margin: 0; }
}

.hm-cart-checkout .hm-checkout-intro .home-title { color: #242424; }

/* A full empty state, rather than an orphaned notice and a small shop link. */
.hm-woocommerce .hm-empty-cart { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.6fr); min-height: 380px; overflow: hidden; border-radius: 0; background: #eeeef4; }
.hm-empty-cart__visual { display: flex; align-items: center; justify-content: center; padding: 48px; background: #464c78; color: #fff; }
.hm-empty-cart__visual svg { display: block; width: clamp(140px, 15vw, 180px); height: auto; }
.hm-empty-cart__visual svg path:last-child { stroke: #ff9b81; }
.hm-woocommerce .hm-empty-cart__content { align-self: center; min-width: 0; padding: clamp(32px, 5vw, 64px); }
.hm-woocommerce .hm-empty-cart .cart-empty { margin: 0 0 20px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #242424; font: 400 clamp(32px, 3.3vw, 48px)/1.1 "Petrovsans Book", sans-serif; text-wrap: balance; overflow-wrap: anywhere; }
.hm-woocommerce .hm-empty-cart .cart-empty::before,
.hm-woocommerce .hm-empty-cart .cart-empty::after { display: none; }
.hm-woocommerce .hm-empty-cart__description { max-width: 34ch; margin: 0 0 32px; color: #242424; font-size: 17px; line-height: 1.6; }
.hm-woocommerce .hm-empty-cart .return-to-shop { margin: 0; }
.hm-woocommerce .hm-empty-cart .return-to-shop .button { position: relative; justify-content: center; min-height: 52px; padding: 12px 84px 12px 24px; border-width: 0; border-radius: 70px; background-color: #fff; background-image: url("../img/button-shape.svg"); background-position: right center; background-size: auto 104%; background-repeat: no-repeat; color: #242424; font-size: 16px; line-height: 1.35; }
.hm-empty-cart .return-to-shop svg { position: absolute; right: 24px; top: calc(50% - 10px); width: 20px; height: 20px; }
.hm-woocommerce .hm-empty-cart .return-to-shop .button:hover { background-color: #f0eff8; color: #242424; }

/* Site-wide announcement: preserve its placement and existing dismissal. */
body .toplinealert { padding-block: 12px; background: #464c78; color: #fff; }
body.home .toplinealert { border-radius: 0; }
body .toplinealert .container { gap: 24px; padding-right: 70px; }
body .toplinealert small { color: #fff; font-size: 14px; line-height: 1.5; }
body .toplinealert a { flex: 0 0 auto; margin: 0; padding: 10px 16px; border-radius: 70px; background: #c93613; color: #fff; line-height: 1.4; }
body .toplinealert a:hover { background: #a82f12; color: #fff; }
body .toplinealert__close { top: 50%; right: 15px; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid rgb(255 255 255 / 35%); background: transparent; color: #fff; cursor: pointer; }
body .toplinealert__close:hover { background: rgb(255 255 255 / 12%); }
body .toplinealert :is(a, button):focus-visible { outline-color: #fff; outline-offset: 3px; }
@media (max-width: 767px) {
  body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error, .hm-cart-status):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty):not(:where(.hm-order-coupon .woocommerce-form-coupon-toggle .woocommerce-info)),
  body .catalog .alertinfo { padding: 20px 20px 20px 60px; font-size: 15px; }
  body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice--error, .hm-cart-status):not(.cart-empty):not(.woocommerce-thankyou-order-failed-actions):not(:empty):not(:where(.hm-order-coupon .woocommerce-form-coupon-toggle .woocommerce-info))::before,
  body .catalog .alertinfo::before { top: 20px; left: 20px; }
  body :is(.woocommerce-message, .woocommerce-info) > .button { float: none; display: flex; width: fit-content; margin: 0 0 12px; }
  .hm-woocommerce .hm-empty-cart { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hm-empty-cart__visual { padding: 32px; }
  .hm-empty-cart__visual svg { width: 112px; }
  .hm-woocommerce .hm-empty-cart__content { padding: 32px 24px; }
  .hm-woocommerce .hm-empty-cart__description { font-size: 16px; margin-bottom: 24px; }
  .hm-woocommerce .hm-empty-cart .return-to-shop .button { width: 100%; }
  body .toplinealert .container { padding-right: 70px; }
  body .toplinealert small { display: block; }
  body .toplinealert a { display: inline-block; margin-top: 10px; padding: 8px 14px; font-size: 13px; text-decoration: none; white-space: normal; }
  body .toplinealert a::before, body .toplinealert a::after { content: none; }
  body.home .toplinealert { border-radius: 0; }
}
