/* =========================================================================
   "עדכון ללקוחות" component (R113) — templates/partials/users-note.php.
   Loaded by BOTH the public cart page and the card (its live preview), so
   the owner sees exactly what customers see. First part: the design's
   .ct-update-preview rules (docs/design/updates.css) as delivered. Second
   part: what the public page needs that the design's page did not.
   ========================================================================= */

.ct-update-preview {
  border: 1px solid rgb(234, 227, 214);
  border-radius: 14px;
  padding: 18px 20px;
  background: rgb(251, 248, 241);
  display: flex;
  gap: 14px;
}

.ct-update-preview__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgb(234, 243, 236);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(31, 146, 84);
}

.ct-update-preview__title {
  margin: 0px 0px 3px;
  font-size: 15px;
  font-weight: 700;
}

.ct-update-preview__message {
  margin: 0px 0px 7px;
  font-size: 14px;
  color: rgb(110, 102, 88);
  line-height: 1.5;
}

.ct-update-preview__dates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: rgb(138, 129, 117);
  background: rgb(244, 239, 230);
  border: 1px solid rgb(236, 229, 216);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---- Beyond the design ------------------------------------------------- */

.ct-update-preview,
.ct-update-preview * {
  box-sizing: border-box;
}

/* The page's own font (Rubik through the kit on the public page; the card
   sets it on its root, R111). The theme styles bare <p> on the listing page,
   so the component's text nodes take their font, colour and size from here. */
.ct-update-preview {
  font-family: inherit;
  direction: rtl;
  text-align: right;
}

.ct-update-preview__content {
  min-width: 0;
}

.ct-update-preview__title {
  color: rgb(43, 38, 34);
  line-height: 1.4;
}

/* The message is plain text: its line breaks are kept here, the same way in
   the card's preview (textContent) and on the public page (esc_html). */
.ct-update-preview__message {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ct-update-preview__dates[hidden] {
  display: none;
}

/* Public cart page only: space under the note before the next block. Scoped to
   MyListing's block wrapper (render_block() prints the component inside it),
   so the card's own preview (.ct-updates__preview) is untouched. */
.block-field-users_note .ct-update-preview {
  margin-bottom: 15px;
}

@media (max-width: 480px) {
  .ct-update-preview {
    padding: 16px;
    gap: 12px;
  }
}
