/* ---- merchant detail ---- */
.back-link {
  display: inline-block;
  margin: 8px 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nimiq-light-blue);
  text-decoration: none;
}
.back-link:hover { color: var(--nimiq-blue); }
.merchant-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.merchant-head-avatar { flex: none; }
.merchant-name { margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.01em; }
.merchant-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; font-size: 14px; }
.merchant-rep { font-size: 14px; margin: 0; }

.merchant-card-panel {
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 24px;
}
.merchant-desc { font-size: 16px; line-height: 1.55; margin: 0 0 20px; }
.detail-row { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid #eef0f4; }
.detail-row:first-child { border-top: none; padding-top: 0; }
.detail-label { font-size: 13px; }
.detail-link { color: var(--nimiq-light-blue); font-weight: 600; text-decoration: none; }
.detail-link:hover { color: var(--nimiq-blue); }

.address-block { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nim-address {
  font-family: 'Fira Mono', 'Fira Code', monospace;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-soft);
  padding: 8px 12px;
  border-radius: 6px;
  word-break: break-all;
  letter-spacing: 0.02em;
}
.copy-btn {
  border: none;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--nimiq-light-blue);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s var(--ease);
}
.copy-btn:hover { background: #046ca8; }
.copy-btn.copied { background: var(--nimiq-green); }

.reviews-section { margin-top: 8px; }
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.reviews-placeholder {
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  font-size: 15px;
  line-height: 1.5;
}

/* ---- add-merchant form ---- */
.form-intro { padding: 8px 0 20px; }
.form-title { margin: 0 0 8px; font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.01em; }
.form-sub { font-size: 16px; margin: 0; }
.merchant-form {
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
}
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-label { font-size: 14px; font-weight: 600; }
.field-input {
  border: none;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
}
.field-input::placeholder { color: var(--ink-secondary); }
.field-select { appearance: none; cursor: pointer; }
.field-textarea { resize: vertical; min-height: 96px; }
.nim-input { font-family: 'Fira Mono', monospace; letter-spacing: 0.02em; }
.form-error { color: var(--nimiq-red); font-size: 14px; font-weight: 600; margin: 0; }
.form-submit { align-self: flex-start; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }

/* focus ring (never remove outline without a focus-visible style) */
.search-input:focus-visible,
.field-input:focus-visible,
.copy-btn:focus-visible,
.filter-pill:focus-visible {
  outline: 2px solid var(--nimiq-light-blue);
  outline-offset: 2px;
}

/* ---- star ratings (read-only). Navy fill — gold stays the brand mark only. ---- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.stars { position: relative; display: inline-flex; line-height: 0; color: #d6d8e0; vertical-align: middle; }
.stars-empty { display: inline-flex; }
.stars-fill { position: absolute; top: 0; left: 0; display: inline-flex; overflow: hidden; white-space: nowrap; color: var(--nimiq-blue); }
.stars-fill-row { display: inline-flex; }
.stars svg { display: block; }

.rep-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin: 4px 0 0; }
.rep-score { font-weight: 800; color: var(--ink); }

.merchant-card-rep { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.merchant-card-rep .stars svg { width: 14px; height: 14px; }

/* reputation badges (green = verified merchant, blue = top rated; gold stays brand-only) */
.rep-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.rep-badge svg { display: block; }
.rep-badge.is-verified { background: radial-gradient(100% 100% at bottom right, #41a38e, #21bca5); }
.rep-badge.is-top { background: radial-gradient(100% 100% at bottom right, #265dd7, #0582ca); }

/* ---- verified-purchase chip (green = success; on-palette gradient + white) ---- */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: radial-gradient(100% 100% at bottom right, #41a38e, #21bca5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.verified-badge.is-small { padding: 2px 8px; font-size: 11px; }

/* ---- review list ---- */
.reviews-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.reviews-empty { padding: 4px 0 24px; font-size: 15px; line-height: 1.5; }
.review-card {
  display: flex;
  gap: 12px;
  padding: 18px;
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.review-avatar { flex: none; }
.review-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-author { font-weight: 700; font-size: 15px; }
.review-time { font-size: 13px; }
.review-stars .stars svg { width: 16px; height: 16px; }
.review-title { font-weight: 700; margin: 2px 0 0; font-size: 15px; }
.review-text { margin: 2px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

/* ---- write-a-review form ---- */
.review-form-section { margin-top: 8px; }
.review-form {
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
}
.review-form-title { margin: 0; font-size: 19px; font-weight: 700; }

/* interactive star input: row-reverse so :checked ~ label fills leftward */
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; border: none; padding: 0; margin: 0; gap: 2px; }
.star-input .star-radio { position: absolute; width: 1px; height: 1px; opacity: 0; }
.star-input .star-label { color: #d6d8e0; cursor: pointer; line-height: 0; transition: color 0.15s var(--ease); }
.star-input .star-label svg { display: block; }
.star-input .star-radio:checked ~ .star-label { color: var(--nimiq-blue); }
.star-input:hover .star-label { color: #d6d8e0; }
.star-input .star-label:hover,
.star-input .star-label:hover ~ .star-label { color: var(--nimiq-blue); }
.star-input .star-radio:focus-visible + .star-label { outline: 2px solid var(--nimiq-light-blue); outline-offset: 2px; border-radius: 4px; }

