/* Notices (1.9.1): Woo's success/info/error messages as one calm component — tinted card, round icon, message,
   action buttons on their own row, close button. Markup: duera_render_notices() (inc/commerce.php). */
.woocommerce-notices-wrapper:empty {
  display: none;
}

.woocommerce-notices-wrapper {
  display: grid;
  gap: 10px;
}

.duera-notice {
  --notice-tone: #6b4a3c;
  --notice-bg: #f8f4f0;
  --notice-line: #eadfd7;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: start;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 14px 12px 14px 16px;
  border: 1px solid var(--notice-line);
  border-radius: 14px;
  color: var(--dark, #311b14);
  background: var(--notice-bg);
  font: 14.5px/1.55 Inter, sans-serif;
  list-style: none;
  box-shadow: none;
}

.duera-notice::before {
  content: none !important;
}

.duera-notice--success {
  --notice-tone: #1b6b3a;
  --notice-bg: #f1f8f3;
  --notice-line: #d3e8da;
}

.duera-notice--error {
  --notice-tone: #b42318;
  --notice-bg: #fff6f5;
  --notice-line: #f5d5d1;
}

.duera-notice-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--notice-tone);
}

.duera-notice-icon svg {
  width: 18px;
  height: 18px;
}

.duera-notice-body {
  display: grid;
  align-self: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.duera-notice-body li + li {
  margin-top: 2px;
}

.duera-notice-text {
  overflow-wrap: anywhere;
}

.duera-notice a:not(.duera-notice-action) {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.duera-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.duera-notice .duera-notice-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--duera-burgundy, #4f0a09);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.duera-notice .duera-notice-action:hover {
  color: #fff;
  background: #3a0706;
}

.duera-notice-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #311b1499;
  background: transparent;
  cursor: pointer;
}

.duera-notice-close:hover {
  color: var(--dark, #311b14);
  background: #311b140f;
}

.duera-notice-close:focus-visible,
.duera-notice .duera-notice-action:focus-visible {
  outline: 2px solid var(--duera-burgundy, #4f0a09);
  outline-offset: 2px;
}

.duera-notice-close svg {
  width: 18px;
  height: 18px;
}

/* Where notices sit: clear space from the heading above and the content below. */
#main-content > .woocommerce-notices-wrapper:not(:empty) {
  width: min(1440px, 100% - 40px);
  margin: 28px auto 0;
}

.product-section .container > .woocommerce-notices-wrapper:not(:empty) {
  margin-bottom: 28px;
}

@media (max-width: 767px) {
  .duera-notice {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 12px 10px 12px 12px;
    font-size: 14px;
  }

  .duera-notice-icon,
  .duera-notice-close {
    width: 28px;
    height: 28px;
  }

  .duera-notice-icon svg {
    width: 16px;
    height: 16px;
  }

  #main-content > .woocommerce-notices-wrapper:not(:empty) {
    width: calc(100% - 30px);
    margin-top: 20px;
  }
}

/* "Ditambahkan ke keranjang" toast (mini-cart.js): readable text and a real button (1.9.1). */
.duera-cart-toast-title {
  font-size: 14.5px;
}

.duera-cart-toast-product {
  margin-top: 2px;
  font-size: 13px;
}

.duera-cart-toast-actions {
  margin-top: 12px;
}

.duera-cart-toast-actions :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--duera-burgundy, #4f0a09);
  font: 600 13.5px/1.2 Inter, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.duera-cart-toast-actions :is(a, button):hover {
  color: #fff;
  background: #3a0706;
}
