/* The "best the day you receive it" note (Fig Mochi Cheesecake; docs/superpowers/specs/2026-11-21-fig-mochi-day-of-note.md). Own class names only: never reuse
   .mmg-sf-opt-included-note or -text, mmg-sf-total.js reads the first of them in the document as the free pack's "Included:" line. */
:root {
  --mmg-sf-note-tint: #fdf4de;
  --mmg-sf-note-border: #f3e2b4;
  --mmg-sf-note-chip: #ffe299;
  --mmg-sf-note-ink: #68442c;
}

/* The flat line (cart drawer, checkout, thank-you): bold title, muted body, no icon, no box. Each place sets its own spacing. */
.mmg-sf-product-note {
  color: var(--mmg-sf-muted, #5f574e);
  font-size: 13px;
  line-height: 1.45;
}

.mmg-sf-product-note-title {
  color: var(--mmg-sf-strong, #1c1a17);
  font-weight: 600;
  text-wrap: balance;
}

.mmg-sf-product-note-body {
  color: var(--mmg-sf-muted, #5f574e);
}

.mmg-sf-product-note--cart {
  padding: 14px 16px 4px;
}

/* Checkout, desktop: the line is the last row of FunnelKit's item list, in one full-width cell, flush with the item photo and without a divider. The spacing is the
   cell's. FunnelKit's table rules (first and last cell width and alignment, cell borders) out-rank a bare row selector, hence the !important. */
.mmg-sf-product-note-row,
.mmg-sf-product-note-row > td {
  border: 0 !important;
}

.mmg-sf-product-note-row > td {
  padding: 4px 0 18px !important;
  text-align: left !important;
  width: auto !important;
}

.mmg-sf-product-note--order {
  margin: 2px 0 14px;
}

/* The card (product page only): the free-pack tray's values (radius 16, padding, title 14/600, body 13) with an amber tint, a border and an icon chip. */
.mmg-sf-product-note--card {
  align-items: flex-start;
  background: var(--mmg-sf-note-tint);
  border: 1px solid var(--mmg-sf-note-border);
  border-radius: 16px;
  box-sizing: border-box;
  display: flex;
  gap: 12px;
  margin: 20px 0 12px;
  padding: 12px 14px;
  width: 100%;
}

.mmg-sf-product-note--card .mmg-sf-product-note-title {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.mmg-sf-product-note--card .mmg-sf-product-note-body {
  display: block;
  margin-top: 2px;
}

.mmg-sf-product-note-chip {
  background: var(--mmg-sf-note-chip);
  border-radius: 50%;
  color: var(--mmg-sf-note-ink);
  display: grid;
  flex: none;
  height: 32px;
  place-items: center;
  width: 32px;
}

/* The icon is a CSS mask on an empty span, so wp_kses_post cannot strip it. */
.mmg-sf-product-note-icon {
  background: currentColor;
  display: block;
  height: 18px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2'/%3E%3Cpath d='M7 2v20'/%3E%3Cpath d='M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2'/%3E%3Cpath d='M7 2v20'/%3E%3Cpath d='M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7'/%3E%3C/svg%3E") center/contain no-repeat;
  width: 18px;
}

/* Where the desktop test arm builds its Order summary card, the note sits directly above it: 37px above, 13px below (the card's own 20px top margin goes). */
@media (min-width: 768px) {
  html.mmg-xd-test .mmg-sf-product-note--card {
    margin: 37px 0 13px;
  }

  html.mmg-xd-test :where(#brxe-7b81da, #brxe-c5c3ec):has(.mmg-sf-product-note--card) > .sr-ord {
    margin-top: 0;
  }
}

/* Checkout prints the line twice, once as the last row of FunnelKit's item list (it also prints in the phone "Show Order Summary" strip) and once in our Review card.
   Exactly one shows per width: the hook row from 768px, the Review card row up to 767px. The row in the card takes the card's specificity. */
@media (max-width: 767px) {
  .mmg-sf-product-note-row,
  .mmg-sf-product-note--hook {
    display: none !important;
  }

  #wfacp-e-form #payment .mmg-sf-product-note--review {
    color: var(--mmg-sf-muted, #5f574e);
    font-size: 13px;
    line-height: 1.45;
    margin: 4px 0 12px;
  }

  #wfacp-e-form #payment .mmg-sf-product-note--review .mmg-sf-product-note-title {
    color: var(--mmg-sf-strong, #1c1a17);
    font-weight: 600;
  }

  #wfacp-e-form #payment .mmg-sf-product-note--review .mmg-sf-product-note-body {
    color: var(--mmg-sf-muted, #5f574e);
  }
}

@media (min-width: 768px) {
  #wfacp-e-form #payment .mmg-sf-product-note--review {
    display: none !important;
  }
}
