/* Hatoon product reviews — storefront styles (all classes prefixed hpr-) */
.hpr-block, .hpr-bar, .hpr-modal {
  --hpr-cream: #FBF6EC;
  --hpr-honey: #D97A2B;
  --hpr-honey-dark: #B5601C;
  --hpr-ink: #3A2E22;
  --hpr-ink-soft: #6B5D4C;
  --hpr-line: #E6DCC6;
  --hpr-olive: #5F7A3A;
  font-family: inherit;
  color: var(--hpr-ink);
  box-sizing: border-box;
}
.hpr-block *, .hpr-bar *, .hpr-modal * { box-sizing: border-box; }

.hpr-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.hpr-star { width: 18px; height: 18px; display: block; }

/* ---------- buttons ---------- */
.hpr-btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--hpr-honey); color: #fff;
  font: inherit; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 999px;
  transition: background .15s ease;
}
.hpr-btn:hover { background: var(--hpr-honey-dark); }
.hpr-btn:disabled { opacity: .6; cursor: default; }
.hpr-btn:focus-visible, .hpr-pick__btn:focus-visible, .hpr-bar__x:focus-visible, .hpr-modal__x:focus-visible {
  outline: 2px solid var(--hpr-ink); outline-offset: 2px;
}
.hpr-btn--sm { padding: 8px 16px; font-size: 14px; }
.hpr-btn--ghost { background: transparent; color: var(--hpr-honey-dark); border: 1px solid var(--hpr-line); }
.hpr-btn--ghost:hover { background: var(--hpr-cream); }

/* ---------- product page block ---------- */
.hpr-block { max-width: 920px; margin: 40px auto; padding: 0 16px; }
.hpr-block__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--hpr-line);
}
.hpr-block__title { margin: 0; font-size: 22px; font-weight: 800; }
.hpr-block__sum { display: flex; align-items: center; gap: 8px; }
.hpr-block__avg { font-size: 22px; font-weight: 800; }
.hpr-block__count { font-size: 14px; color: var(--hpr-ink-soft); }
.hpr-block__action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 4px; }
.hpr-block__action:empty { display: none; }
.hpr-note { margin: 0; font-size: 14px; color: var(--hpr-ink-soft); }
.hpr-block__list { display: grid; gap: 14px; margin: 18px 0; }
.hpr-empty { margin: 8px 0; color: var(--hpr-ink-soft); }

.hpr-review { background: #fff; border: 1px solid var(--hpr-line); border-radius: 14px; padding: 16px 18px; }
.hpr-review__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hpr-review__date { font-size: 13px; color: var(--hpr-ink-soft); }
.hpr-review__title { margin: 10px 0 4px; font-size: 16px; font-weight: 700; }
.hpr-review__body { margin: 8px 0 0; font-size: 15px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.hpr-review__who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.hpr-review__name { font-weight: 700; font-size: 14px; }
.hpr-badge { font-size: 12px; font-weight: 700; color: var(--hpr-olive); background: #EEF3E4; border-radius: 999px; padding: 3px 10px; }

/* ---------- reminder bar ---------- */
.hpr-bar {
  position: fixed; z-index: 2147483000; inset-inline: 12px; bottom: 12px;
  margin-inline: auto; max-width: 640px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  background: #fff; border: 1px solid var(--hpr-line); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(58, 46, 34, .18);
  padding: 12px 14px;
}
.hpr-bar__text { flex: 1 1 200px; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.hpr-bar__x {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--hpr-ink-soft); padding: 2px 8px;
}

/* ---------- modal ---------- */
.hpr-modal {
  position: fixed; z-index: 2147483001; inset: 0;
  background: rgba(58, 46, 34, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; overflow-y: auto;
}
.hpr-modal__card {
  position: relative; width: 100%; max-width: 560px;
  background: var(--hpr-cream); border-radius: 20px; padding: 26px 20px 20px;
}
.hpr-modal__x {
  position: absolute; top: 10px; inset-inline-end: 12px;
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 30px; line-height: 1; color: var(--hpr-ink-soft); padding: 2px 8px;
}
.hpr-modal__title { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.hpr-modal__sub { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--hpr-ink-soft); }
.hpr-modal__list { display: grid; gap: 14px; }

.hpr-item { background: #fff; border: 1px solid var(--hpr-line); border-radius: 14px; padding: 14px; }
.hpr-item__head { display: flex; align-items: center; gap: 12px; }
.hpr-item__img { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: var(--hpr-cream); flex-shrink: 0; }
.hpr-item__title { font-weight: 700; font-size: 15px; line-height: 1.4; }
.hpr-item__order { font-size: 12.5px; color: var(--hpr-ink-soft); margin-top: 2px; }
.hpr-item__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }

.hpr-pick { display: flex; gap: 4px; margin: 12px 0 10px; }
.hpr-pick__btn { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 2px; border-radius: 8px; }
.hpr-pick__btn .hpr-star { width: 34px; height: 34px; filter: grayscale(1) opacity(.35); transition: filter .1s ease; }
.hpr-pick__btn.is-on .hpr-star { filter: none; }

.hpr-input {
  display: block; width: 100%; margin-top: 8px;
  font: inherit; font-size: 15px; color: var(--hpr-ink);
  background: #fff; border: 1px solid var(--hpr-line); border-radius: 10px; padding: 10px 12px;
}
.hpr-input:focus { outline: 2px solid var(--hpr-honey); outline-offset: 1px; }
.hpr-input--area { resize: vertical; min-height: 84px; }
.hpr-msg { font-size: 13.5px; }
.hpr-msg.is-error { color: #B3261E; }
.hpr-done { margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--hpr-olive); }

@media (prefers-reduced-motion: reduce) {
  .hpr-btn, .hpr-pick__btn .hpr-star { transition: none; }
}

/* ------------------------------------------------------------------
   Theme isolation: the store theme styles every <button>, <input> and
   <textarea> (min-width, padding, borders, heights). Reset those here so
   the widget keeps its own layout inside any theme.
   ------------------------------------------------------------------ */
.hpr-modal .hpr-modal__list { grid-template-columns: minmax(0, 1fr); }
.hpr-modal .hpr-item { min-width: 0; max-width: 100%; }

.hpr-modal .hpr-pick { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; }
.hpr-modal .hpr-pick__btn {
  all: unset;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 40px; height: 40px; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 8px;
}
.hpr-modal .hpr-pick__btn .hpr-star { width: 34px; height: 34px; }
.hpr-modal .hpr-pick__btn:focus-visible { outline: 2px solid var(--hpr-ink); outline-offset: 2px; }

.hpr-modal .hpr-modal__x,
.hpr-bar .hpr-bar__x {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 36px; height: 36px; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; line-height: 1; color: var(--hpr-ink-soft); border-radius: 8px;
}
.hpr-modal .hpr-modal__x { position: absolute; top: 10px; inset-inline-end: 12px; }
.hpr-modal .hpr-modal__x:focus-visible,
.hpr-bar .hpr-bar__x:focus-visible { outline: 2px solid var(--hpr-ink); outline-offset: 2px; }

.hpr-modal .hpr-btn,
.hpr-bar .hpr-btn,
.hpr-block .hpr-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; min-width: 0; width: auto; height: auto;
  background: var(--hpr-honey); color: #fff;
  font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1.4;
  padding: 11px 22px; border-radius: 999px;
}
.hpr-modal .hpr-btn:hover, .hpr-bar .hpr-btn:hover, .hpr-block .hpr-btn:hover { background: var(--hpr-honey-dark); }
.hpr-modal .hpr-btn:disabled { opacity: .6; cursor: default; }
.hpr-modal .hpr-btn:focus-visible, .hpr-bar .hpr-btn:focus-visible, .hpr-block .hpr-btn:focus-visible { outline: 2px solid var(--hpr-ink); outline-offset: 2px; }
.hpr-bar .hpr-btn.hpr-btn--sm { padding: 8px 16px; font-size: 14px; }
.hpr-block .hpr-btn.hpr-btn--ghost { background: transparent; color: var(--hpr-honey-dark); border: 1px solid var(--hpr-line); }
.hpr-block .hpr-btn.hpr-btn--ghost:hover { background: var(--hpr-cream); }

.hpr-modal .hpr-input {
  display: block; width: 100%; min-width: 0; max-width: 100%;
  height: auto; min-height: 0; margin: 8px 0 0;
  font-family: inherit; font-size: 15px; line-height: 1.6; color: var(--hpr-ink);
  background: #fff; border: 1px solid var(--hpr-line); border-radius: 10px;
  padding: 10px 12px; box-shadow: none;
}
.hpr-modal .hpr-input.hpr-input--area { height: 96px; min-height: 84px; resize: vertical; }
.hpr-modal .hpr-input:focus { outline: 2px solid var(--hpr-honey); outline-offset: 1px; }
.hpr-modal[dir="rtl"] .hpr-pick { justify-content: flex-end; }

/* Many purchased products: keep the title and the close button in place and
   scroll only the list of products inside the window. */
.hpr-modal { align-items: center; overflow: hidden; }
.hpr-modal .hpr-modal__card {
  display: flex; flex-direction: column;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
}
.hpr-modal .hpr-modal__title, .hpr-modal .hpr-modal__sub { flex: 0 0 auto; }
.hpr-modal .hpr-modal__list {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding-inline-end: 4px;
}

/* The [hidden] attribute must always win (e.g. "show more" when there is nothing more). */
.hpr-block [hidden], .hpr-modal [hidden], .hpr-bar [hidden] { display: none !important; }

/* Product block: full-width review cards whatever the theme does to <article>/<grid>. */
.hpr-block { background: transparent; }
.hpr-block .hpr-block__list { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
.hpr-block .hpr-review { display: block; width: 100%; max-width: none; margin: 0; text-align: start; }

/* ---------- stars on product cards ---------- */
.hpr-card-rating {
  display: flex; align-items: center; gap: 5px;
  margin: 4px 0 6px; font-size: 13px; line-height: 1; color: #6B5D4C;
}
.hpr-card-rating .hpr-stars { gap: 1px; }
.hpr-card-rating .hpr-star { width: 15px; height: 15px; }
.hpr-card-rating__avg { font-weight: 700; color: #3A2E22; }
.hpr-card-rating__count { font-size: 12.5px; }

/* Card rating: explicit spacing + bolder numbers (kept strong so the theme cannot flatten it). */
.product-card .hpr-card-rating,
.hpr-card-rating {
  display: flex !important; flex-wrap: nowrap; align-items: center; gap: 0;
  margin: 10px 0 10px; padding: 0; font-size: 13.5px; line-height: 1;
}
.hpr-card-rating .hpr-stars { display: inline-flex; gap: 2px; }
.hpr-card-rating .hpr-star { width: 16px; height: 16px; }
.hpr-card-rating .hpr-card-rating__avg {
  font-weight: 800; color: #3A2E22; margin-inline-start: 8px;
}
.hpr-card-rating .hpr-card-rating__count {
  font-weight: 700; color: #3A2E22; font-size: 13px; margin-inline-start: 5px;
}
