/*!
 * TrueSight Reviews Widget v1.1.2 — stylesheet
 *
 * v1.1.2 (2026-05-27) changes from v1.1.1:
 *   - Reviews section is rendered as a prominent card. Adds .tsrw-empty-card,
 *     .tsrw-summary-card, .tsrw-section-title, .tsrw-section-tagline,
 *     .tsrw-stars, .tsrw-star, .tsrw-empty-headline, .tsrw-empty-body,
 *     .tsrw-empty-note, .tsrw-summary-rating.
 *   - .tsrw-write-review is enlarged with stronger padding, bolder type,
 *     and an arrow glyph. .tsrw-actions is centred in the empty state and
 *     left-aligned in the summary state.
 *   - All new selectors are namespace-isolated (.tsrw-*). No global
 *     selectors, no pdp.css collisions, no Add to Cart impact.
 *
 * v1.1.1 (2026-05-27) changes from v1.1.0:
 *   - Adds .tsrw-actions + .tsrw-write-review selectors for the Write a Review
 *     action button rendered by reviews-widget.js v1.1.4 in empty and summary
 *     states. Namespace-isolated (.tsrw-*) — does not touch pdp.css selectors,
 *     does not introduce global selectors, does not affect Add to Cart styling.
 *
 * v1.1.0 (2026-05-27) changes from v1.0.0:
 *   - All selectors migrated to .tsrw-* to avoid collision with any
 *     pre-existing declarations in pdp.css.
 *
 * Namespace: every selector begins with .tsrw-
 * Does NOT target any existing site class — visual override for the mount
 * container (.reviews-empty) is done via inline styles in JS (specificity 1000).
 */

.tsrw-mount {
  font-family: inherit;
  color: inherit;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  text-align: left;
  box-sizing: border-box;
}

.tsrw-mount * {
  box-sizing: border-box;
}

/* v1.1.2: card styling for the empty and summary states */
/* v5-2.C.2 premium: larger radius, refined border tone, generous padding,
   readability-capped width so the section never sprawls on wide desktops. */
.tsrw-empty-card,
.tsrw-summary-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 34px 36px 30px 36px;
  margin: 0;
  /* v8-A: max-width 880px 제거. PDP 본문 폭(.reviews-empty 부모)을 그대로 사용해
     FAQ / Explore More Options 와 같은 폭감 유지. PDP 부모 컨테이너에 결정 위임. */
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.04), 0 0 1px rgba(17, 17, 17, 0.06);
}

.tsrw-empty-card {
  text-align: center;
}

.tsrw-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
}

.tsrw-section-tagline {
  font-size: 14px;
  color: #6a6a6a;
  margin: 0 0 22px 0;
  line-height: 1.55;
}

/* v1.1.2: decorative star row used in both empty and summary states */
.tsrw-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 1px;
}

.tsrw-empty-card .tsrw-stars {
  display: flex;
  justify-content: center;
  margin: 0 auto 14px auto;
  font-size: 28px;
}

.tsrw-star {
  display: inline-block;
}

.tsrw-star-filled {
  color: #f5a623;
}

.tsrw-star-empty {
  color: #d0d0d0;
}

.tsrw-empty-headline {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.tsrw-empty-body {
  font-size: 14px;
  color: #4a4a4a;
  margin: 0 auto 22px auto;
  max-width: 560px;
  line-height: 1.6;
}

.tsrw-empty-note {
  font-size: 12px;
  color: #888;
  margin: 18px auto 0 auto;
  max-width: 560px;
  line-height: 1.5;
}

/* v1.1.2: rating block — avg number + stars + count, horizontally aligned */
/* v5-2.C.2 premium: large average anchored left, stars+count stacked beside it
   for a balanced "rating badge" composition; stronger divider to the list. */
.tsrw-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 0 0 26px 0;
  padding: 0 0 24px 0;
  border-bottom: 1px solid #eee;
}

.tsrw-summary-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.tsrw-avg {
  font-size: 44px;
  font-weight: 700;
  color: #111;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.tsrw-summary .tsrw-stars {
  align-self: center;
  font-size: 19px;
}

.tsrw-count {
  font-size: 13.5px;
  color: #6a6a6a;
  font-weight: 400;
  align-self: center;
}

.tsrw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* v5-2.C.2 premium: each review is a self-contained "verified proof" block —
   soft surface, hairline border, rounded corners, generous inner padding.
   Replaces the flat border-top separators with discrete cards. */
.tsrw-item {
  padding: 20px 22px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}

.tsrw-item:last-child {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.tsrw-rating {
  font-size: 14px;
  color: #f5a623;
  letter-spacing: 2px;
  margin: 0 0 10px 0;
  line-height: 1;
}

.tsrw-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #141414;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* v5-2.C.2 premium: meta reads as a trust line — author emphasised,
   secondary details quieter; vehicle shown as a subtle qualifier pill. */
.tsrw-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  font-size: 13px;
  color: #8a8a8a;
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.tsrw-author {
  font-weight: 700;
  color: #2e2e2e;
}

.tsrw-verified {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.tsrw-date {
  color: #a4a4a4;
}

/* v5-2.C.2: vehicle qualifier — quiet pill that anchors the review to a model */
.tsrw-vehicle {
  display: inline-block;
  font-size: 12px;
  color: #5a5a5a;
  background: #f0f0f0;
  padding: 3px 10px;
  border-radius: 6px;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

/* v5-2.C.2 premium: comfortable reading measure, soft-dark ink, relaxed leading */
.tsrw-body {
  font-size: 14.5px;
  color: #2c2c2c;
  margin: 0;
  max-width: 66ch;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  .tsrw-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 18px;
    margin-bottom: 20px;
  }
  .tsrw-avg {
    font-size: 34px;
  }
  .tsrw-item {
    padding: 18px 16px;
  }
  .tsrw-meta {
    font-size: 12.5px;
  }
  .tsrw-body {
    font-size: 14px;
    line-height: 1.68;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
  .tsrw-title {
    font-size: 16px;
  }
  .tsrw-list {
    gap: 12px;
  }
}

@media (forced-colors: active) {
  .tsrw-verified {
    border: 1px solid CanvasText;
  }
  .tsrw-write-review {
    border: 1px solid ButtonBorder;
  }
}

/* v1.1.1: Write a Review action button (rendered by widget.js v1.1.4+) */
/* v1.1.2: enlarged and made prominent — alignment varies by card type */
.tsrw-actions {
  margin: 4px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.tsrw-empty-card .tsrw-actions {
  margin: 8px 0 4px 0;
  justify-content: center;
}

.tsrw-summary-card .tsrw-actions {
  margin: 0 0 4px 0;
  justify-content: flex-start;
}

.tsrw-write-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
  background-color: #111;
  color: #ffffff;
  border: 1px solid #111;
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-decoration: none;
  line-height: 1.3;
  min-height: 56px;
  min-width: 220px;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.06s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.10);
}

.tsrw-write-review::after {
  content: "\00a0\2192"; /* nbsp + → */
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.18s ease;
}

.tsrw-write-review:hover,
.tsrw-write-review:focus {
  background-color: #000;
  border-color: #000;
  color: #ffffff;
  text-decoration: none;
  outline: none;
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.16);
}

.tsrw-write-review:hover::after,
.tsrw-write-review:focus::after {
  transform: translateX(3px);
}

.tsrw-write-review:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tsrw-write-review:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.tsrw-write-review:visited {
  color: #ffffff;
}

@media (max-width: 600px) {
  .tsrw-empty-card,
  .tsrw-summary-card {
    padding: 26px 20px 22px 20px;
    border-radius: 12px;
  }
  .tsrw-section-title {
    font-size: 19px;
  }
  .tsrw-empty-headline {
    font-size: 16px;
  }
  .tsrw-empty-card .tsrw-stars {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .tsrw-actions {
    justify-content: stretch;
  }
  .tsrw-write-review {
    width: 100%;
    text-align: center;
    min-width: 0;
  }
  .tsrw-summary {
    gap: 10px;
  }
  .tsrw-avg {
    font-size: 28px;
  }
  .tsrw-filter-row {
    gap: 8px;
    margin: 14px 0 20px;
  }
  .tsrw-filter-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
  }
}

/* ---------- v1.2.0: filter row + vehicle line + empty-vehicle ---------- */
/* v5-2.C.3: filters read as real interactive controls, not small tags —
   taller, more padding, firmer borders; balanced against the proof cards.
   First chip (View All) is the active/primary filter; the vehicle chip stays
   one notch lighter but at the same physical scale. */
.tsrw-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 24px;
}
.tsrw-filter-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: #1d1d1d;
  background: #ffffff;
  border: 1.5px solid #d0d0d0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.tsrw-filter-btn:hover {
  background: #f4f4f4;
  border-color: #9a9a9a;
}
.tsrw-filter-btn:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}
.tsrw-filter-active,
.tsrw-filter-active:hover {
  color: #ffffff;
  background: #111;
  border-color: #111;
}
.tsrw-vehicle-empty {
  padding: 16px 0 4px;
  text-align: left;
}
.tsrw-vehicle-empty-text {
  font-size: 14px;
  color: #555555;
  margin: 0 0 8px;
}
.tsrw-link-btn {
  display: inline-block;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  background: none;
  border: none;
  border-bottom: 1px solid #1a1a1a;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- v5-2.C: image-ready layout (FUTURE — no JS renders these yet) ---------- */
/* Reserved styling for an upcoming approved-image gallery inside a review card.
   Defined now so the next phase needs only JS to populate; zero current effect
   because no element carries these classes today. All .tsrw-* scoped. */
.tsrw-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0 0;
}
.tsrw-image-thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #f7f7f7;
  flex: 0 0 auto;
}
.tsrw-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 480px) {
  .tsrw-image-thumb {
    width: 80px;
    height: 80px;
  }
}

/* ============ v1.3.0 (Phase 7): preview navigation + Photo Proof ============ */

/* filter chip 이 <a> 로 바뀜 — 링크 기본 스타일 보정 */
.tsrw-filter-btn {
  text-decoration: none;
}
.tsrw-filter-btn:visited { color: #1d1d1d; }
.tsrw-filter-active:visited { color: #ffffff; }

/* 리뷰 카드 클릭 affordance */
.tsrw-item-clickable { cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.tsrw-item-clickable:hover {
  border-color: #d4d4d4;
  box-shadow: 0 2px 8px rgba(17,17,17,0.06);
}

/* Read full review 링크 */
.tsrw-read-full {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #111;
  padding-bottom: 1px;
}
.tsrw-read-full:hover { color: #000; }
.tsrw-read-full:visited { color: #111; }

/* ---- Desktop 2-column: 좌측 리뷰 / 우측 Photo Proof ---- */
/* .tsrw-has-proof 가 붙으면 grid 활성화. 이미지 없으면 클래스 미부착 → 기존 1컬럼 */
@media (min-width: 880px) {
  .tsrw-summary-card.tsrw-has-proof {
    display: grid;
    grid-template-columns: minmax(0, 62%) minmax(0, 38%);
    grid-template-rows: auto;
    column-gap: 28px;
  }
  /* 좌측: 기존 콘텐츠 전부 (title~list) 는 첫 컬럼에 stack */
  .tsrw-summary-card.tsrw-has-proof > .tsrw-section-title,
  .tsrw-summary-card.tsrw-has-proof > .tsrw-section-tagline,
  .tsrw-summary-card.tsrw-has-proof > .tsrw-summary,
  .tsrw-summary-card.tsrw-has-proof > .tsrw-actions,
  .tsrw-summary-card.tsrw-has-proof > .tsrw-filter-row,
  .tsrw-summary-card.tsrw-has-proof > .tsrw-list {
    grid-column: 1;
  }
  /* 우측: Photo Proof — 전체 행에 걸쳐 우측 컬럼 */
  .tsrw-summary-card.tsrw-has-proof > .tsrw-photoproof {
    grid-column: 2;
    grid-row: 1 / 99;
    align-self: start;
    border-left: 1px solid #eee;
    padding-left: 24px;
  }
}

/* Photo Proof 영역 */
.tsrw-photoproof { margin-top: 4px; }
.tsrw-proof-title { font-size: 14px; font-weight: 600; color: #141414; }
.tsrw-proof-sub { font-size: 12px; color: #888; margin: 3px 0 12px; }
.tsrw-proof-grid {
  display: grid;
  /* v8-A: 자동 적응. auto-fit + minmax(140px, 1fr) 로
     - 1장: 자동 1열 (셀이 컬럼 가득 → 큰 대표 카드처럼)
     - 2~4장: 폭이 허락하면 2열, 좁으면 1열로 자연 적응
     모던-only 셀렉터(예: has 의사클래스) 미사용 → 호환성 안전. */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  /* v8-A: 1장일 때 우측 컬럼이 매우 넓으면 셀이 과도하게 커지는 것을 방지.
     grid 자체 폭을 합리적 상한으로 제한 (가용 폭이 작으면 자동 축소). */
  max-width: 320px;
  gap: 10px;
}
.tsrw-proof-cell {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  /* v8-A: aspect-ratio 미지원(구형 Safari/IE) 폴백 — 정사각 보장.
     min-height 보다는 padding-top hack 이 정확하지만, 호환 환경에선 aspect-ratio
     가 우선 적용된다. min-height 는 안전망(셀 높이 0 방지). */
  min-height: 140px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #f2f2f2;
}
.tsrw-proof-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile: Photo Proof 는 리뷰 아래 1컬럼 (grid 미적용 = 자연 stack) */
@media (max-width: 879px) {
  .tsrw-photoproof {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eee;
  }
}
@media (max-width: 380px) {
  .tsrw-proof-grid { gap: 8px; }
}

/* ============ Phase 11-A UX: 리뷰별 이미지 (각 리뷰 카드 내부) ============ */
/* 독립 Photo Proof aside 영역 대신, 각 리뷰 카드 안에 해당 리뷰의 published
   이미지만 매칭하여 표시한다. .tsrw-has-proof / .tsrw-photoproof 는 JS 가 더 이상
   생성하지 않으므로 위 스타일은 dead-CSS (안전을 위해 정의만 남김). */
.tsrw-review-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px 0;
}
.tsrw-review-image-cell {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #f2f2f2;
  flex: 0 0 auto;
  text-decoration: none;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tsrw-review-image-cell:hover,
.tsrw-review-image-cell:focus-visible {
  border-color: #c8c8c8;
  outline: none;
}
.tsrw-review-image-cell:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}
.tsrw-review-image-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
}
@media (max-width: 600px) {
  .tsrw-review-image-cell { width: 84px; height: 84px; }
}
@media (max-width: 380px) {
  .tsrw-review-image-cell { width: 72px; height: 72px; }
  .tsrw-review-images { gap: 6px; }
}
