.esnaf-store :is(.esnaf-feedback-summary, .esnaf-order-feedback) {
  --feedback-red: #d30b29;
}

.esnaf-feedback-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  margin-block: 2px 5px;
}

.esnaf-store :is(.esnaf-feedback-comment, .esnaf-feedback-heart, .esnaf-feedback-compose > summary) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 6px;
  border: 0;
  border-radius: 9px;
  color: #304239;
  background: transparent;
  font: 650 12px/1.15 var(--esnaf-font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.esnaf-feedback-comment {
  white-space: nowrap;
}

.esnaf-feedback-comment > i,
.esnaf-feedback-heart > i {
  font-size: 18px;
}

.esnaf-store .esnaf-feedback-heart > i { color: var(--feedback-red); }
.esnaf-store .esnaf-feedback-heart[aria-pressed="true"] { color: var(--feedback-red); }
.esnaf-store :is(.esnaf-feedback-comment, .esnaf-feedback-compose > summary):hover { background: #edf3eb; }
.esnaf-store .esnaf-feedback-heart:hover { background: #ffedf0; }
.esnaf-feedback-result > i { color: #167144; }

.esnaf-product-image[data-feedback-photo] {
  position: relative;
  touch-action: manipulation;
  user-select: none;
}

.esnaf-feedback-photo-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.esnaf-feedback-photo-overlay .fa {
  color: #ed1637;
  font-size: clamp(52px, 16vw, 78px);
  opacity: 0;
  filter: drop-shadow(0 2px 8px #30121f75) drop-shadow(0 0 14px #fff7);
}

.esnaf-order-info-product .esnaf-order-feedback {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  padding-top: 3px;
}

.esnaf-order-feedback > .esnaf-feedback-heart {
  grid-column: 2;
  grid-row: 1;
}

.esnaf-order-feedback .esnaf-feedback-compose,
.esnaf-order-feedback .esnaf-feedback-result {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.esnaf-feedback-compose:has([data-feedback-form]:focus-within),
.esnaf-feedback-compose[open] {
  grid-column: 1 / -1;
}

.esnaf-store .esnaf-feedback-compose > summary {
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  list-style: none;
  color: #155a37;
  font-size: 14px;
}

.esnaf-feedback-compose > summary::-webkit-details-marker { display: none; }
.esnaf-feedback-compose[open] > summary > i:last-child { transform: rotate(180deg); }

.esnaf-feedback-compose form {
  display: grid;
  gap: 10px;
  padding-block: 10px 4px;
}

.esnaf-feedback-label {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  color: #304239;
  font-size: 13px;
  font-weight: 650;
}

.esnaf-store :is(.esnaf-feedback-comment, .esnaf-feedback-heart, .esnaf-feedback-compose > summary):focus-visible {
  outline: 2px solid var(--esnaf-action);
  outline-offset: 1px;
}

.esnaf-feedback-compose textarea {
  width: 100%;
  min-height: 93px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #b9cec0;
  border-radius: 10px;
  color: #172f23;
  background: #fff;
  font: 400 16px/1.4 var(--esnaf-font);
}

.esnaf-store :is(.esnaf-feedback-submit, .esnaf-feedback-more) {
  justify-self: start;
  min-height: 44px;
  padding: 8px 17px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--esnaf-action);
  font: 650 14px var(--esnaf-font);
}

.esnaf-feedback-error { margin: 0; color: #882e23; }
.esnaf-feedback-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
  color: #185b39;
  font-size: 13px;
}

.esnaf-feedback-dialog {
  width: min(90vw, 530px);
  max-height: min(78dvh, 690px);
  padding: 21px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 20px;
  color: #183326;
  background: #fff;
  box-shadow: 0 25px 65px #18332637;
}

.esnaf-feedback-dialog:not([open]) { display: none; }
.esnaf-feedback-dialog::backdrop { background: #172d2360; backdrop-filter: blur(3px); }
.esnaf-feedback-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
}
.esnaf-feedback-dialog h2 { margin: 4px 0 0; font: 750 clamp(22px, 6vw, 28px)/1.13 var(--esnaf-font); overflow-wrap: anywhere; }
.esnaf-feedback-eyebrow { margin: 0; color: #32684b; font: 700 11px/1.2 var(--esnaf-font); text-transform: uppercase; letter-spacing: .08em; }
.esnaf-feedback-dialog [data-feedback-close] {
  flex: 0 0 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #183326;
  background: #eaf1e9;
  font-size: 23px;
}
.esnaf-feedback-dialog-count { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.esnaf-feedback-dialog-count > span, .esnaf-feedback-comments time { color: #4d6455; font-size: 12px; }
.esnaf-feedback-comments { margin: 0; padding: 0; list-style: none; }
.esnaf-feedback-comments li { padding: 13px 0; border-top: 1px solid #dbe7dd; }
.esnaf-feedback-comments li > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.esnaf-feedback-comments small { color: #206244; font-weight: 650; }
.esnaf-feedback-comments time { margin-inline-start: 8px; }
.esnaf-feedback-comments p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.esnaf-feedback-notice {
  position: fixed;
  z-index: 100;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: #173d28;
}

.esnaf-store :is(.esnaf-feedback-dialog, .esnaf-order-feedback, .esnaf-feedback-notice)[hidden],
.esnaf-store :is(.esnaf-feedback-dialog, .esnaf-order-feedback) [hidden] { display: none; }

