/* Product reviews: one component layer for comments, replies and rating management. */
.marketplace-experience .product-comments {
  gap: 18px;
}

.marketplace-experience .product-comments-heading p {
  max-width: 720px;
  color: #5f7166;
  font-size: 11px;
  line-height: 1.6;
}

.marketplace-experience .product-comments-list {
  gap: 14px;
}

.marketplace-experience .product-comments-empty {
  padding: 18px;
  border-color: rgba(18, 60, 43, .16);
  border-radius: 14px;
  color: #52665a;
  font-size: 11px;
  line-height: 1.55;
}

.marketplace-experience .product-comment-card {
  position: relative !important;
  display: block !important;
  padding: 18px !important;
  border: 1px solid rgba(18, 60, 43, .12) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(8, 40, 29, .055) !important;
}

.marketplace-experience .product-comment-card.own {
  background: linear-gradient(145deg, #fff, #f7fbf3) !important;
}

.marketplace-experience .product-comment-card:hover {
  border-color: rgba(63, 143, 78, .25) !important;
  box-shadow: 0 16px 36px rgba(8, 40, 29, .08) !important;
  transform: none !important;
}

.marketplace-experience .product-comment-card:has(.product-comment-replies-list)::before {
  display: none !important;
  content: none !important;
}

.marketplace-experience .product-comment-reply-line {
  display: none !important;
}

.marketplace-experience .product-comment-main {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.marketplace-experience .product-comment-main:has(+ .product-comment-replies-wrap)::before {
  position: absolute;
  z-index: 0;
  top: 26px;
  bottom: -14px;
  left: 25px;
  width: 2px;
  border-radius: 999px;
  background: #79ba68;
  content: "";
  pointer-events: none;
}

.marketplace-experience .product-comment-avatar {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 0 0 4px #fff;
}

.marketplace-experience .product-comment-content,
.marketplace-experience .product-comment-reply-content {
  min-width: 0;
}

.marketplace-experience .product-comment-content > header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.marketplace-experience .product-comment-author-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.marketplace-experience .product-comment-author {
  color: #123c2b;
  font-size: 12px !important;
  font-weight: 900;
  line-height: 1.35;
}

.marketplace-experience .product-comment-author:focus-visible,
.marketplace-experience .product-comment-avatar:focus-visible {
  outline: 3px solid rgba(57, 159, 84, .28);
  outline-offset: 3px;
}

.marketplace-experience .product-comment-content > header > div:first-child > small {
  display: block;
  margin-top: 5px;
  color: #77877e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.marketplace-experience .product-comment-header-side {
  display: flex;
  flex: none;
  align-items: flex-end;
  flex-direction: column;
  gap: 9px;
}

.marketplace-experience .product-comment-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.marketplace-experience .product-comment-rating > span {
  display: inline-flex;
  gap: 1px;
}

.marketplace-experience .product-comment-rating b {
  color: #123c2b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.marketplace-experience .product-comment-content > p {
  margin: 12px 0 0 !important;
  color: #2c4738 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.7 !important;
  overflow-wrap: anywhere;
}

.marketplace-experience .product-comment-thread-summary {
  margin-top: 11px;
}

.marketplace-experience .product-comment-thread-summary small {
  color: #687a70;
  font-size: 9px;
  font-weight: 850;
}

.marketplace-experience .product-comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.marketplace-experience .comment-icon-action {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0 !important;
  border: 1px solid rgba(18, 60, 43, .13) !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #287048 !important;
  box-shadow: 0 3px 9px rgba(8, 40, 29, .035);
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.marketplace-experience .comment-icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.marketplace-experience .comment-icon-action:hover:not(:disabled) {
  border-color: rgba(53, 143, 76, .35) !important;
  background: #edf7e8 !important;
  box-shadow: 0 8px 18px rgba(8, 40, 29, .08);
  transform: translateY(-1px);
}

.marketplace-experience .comment-icon-action:focus-visible {
  outline: 3px solid rgba(57, 159, 84, .26);
  outline-offset: 2px;
}

.marketplace-experience .comment-icon-action.danger {
  border-color: rgba(176, 75, 61, .2) !important;
  color: #b04b3d !important;
}

.marketplace-experience .comment-icon-action.danger:hover:not(:disabled) {
  border-color: rgba(176, 75, 61, .38) !important;
  background: #fff1ed !important;
}

.marketplace-experience .comment-report-action {
  color: #607269 !important;
}

.marketplace-experience .comment-report-action.reported {
  border-color: rgba(176, 75, 61, .3) !important;
  background: #fff1ed !important;
  color: #ae513f !important;
}

/* Tree geometry: each node owns its incoming elbow and only non-final nodes continue the trunk. */
.marketplace-experience .product-comment-replies-wrap {
  position: relative !important;
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.marketplace-experience .product-comment-replies-list {
  position: relative !important;
  display: grid !important;
  gap: 12px !important;
  margin: 14px 0 0 26px !important;
  padding: 0 0 0 44px !important;
  border: 0 !important;
}

.marketplace-experience .product-comment-reply-node {
  position: relative;
  min-width: 0;
}

.marketplace-experience .product-comment-reply-node::before {
  position: absolute;
  z-index: 0;
  top: -14px;
  left: -44px;
  width: 44px;
  height: 34px;
  border-bottom: 2px solid #79ba68;
  border-left: 2px solid #79ba68;
  border-radius: 0 0 0 18px;
  content: "";
  pointer-events: none;
}

.marketplace-experience .product-comment-reply-node:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 20px;
  bottom: -12px;
  left: -44px;
  width: 2px;
  background: #79ba68;
  content: "";
  pointer-events: none;
}

.marketplace-experience .product-comment-reply-card {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 11px !important;
  align-items: start;
  min-width: 0;
  padding: 12px 13px !important;
  overflow: visible !important;
  border: 1px solid rgba(18, 60, 43, .09) !important;
  border-radius: 14px !important;
  background: #fbfdf9 !important;
}

.marketplace-experience .product-comment-reply-card:has(+ .product-comment-reply-children)::after {
  position: absolute;
  z-index: 0;
  top: 20px;
  bottom: -13px;
  left: 32px;
  width: 2px;
  border-radius: 999px;
  background: #a3cf93;
  content: "";
  pointer-events: none;
}

.marketplace-experience .product-comment-reply-card .product-comment-avatar.small {
  width: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
  box-shadow: 0 0 0 3px #fbfdf9;
  font-size: 11px !important;
}

.marketplace-experience .product-comment-reply-content > header {
  display: flex !important;
  min-width: 0;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.marketplace-experience .product-comment-reply-content > header > span {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.marketplace-experience .product-comment-reply-card .product-comment-author {
  font-size: 11px !important;
}

.marketplace-experience .product-comment-reply-card header em,
.marketplace-experience .comment-edited-label {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7f5df;
  color: #438052;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .03em;
}

.marketplace-experience .product-comment-reply-header-side {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
}

.marketplace-experience .product-comment-reply-header-side > small {
  margin: 0 !important;
  color: #75867c;
  font-size: 7px !important;
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
}

.marketplace-experience .product-comment-reply-actions {
  margin: 0 !important;
}

.marketplace-experience .product-comment-reply-card p {
  margin: 7px 0 0 !important;
  color: #314b3d !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.65 !important;
  overflow-wrap: anywhere;
}

.marketplace-experience .product-comment-reply-children {
  position: relative;
  display: grid !important;
  gap: 12px !important;
  margin: 12px 0 0 20px !important;
  padding: 0 0 0 36px !important;
  border: 0 !important;
}

.marketplace-experience .product-comment-reply-children::before {
  display: none !important;
}

.marketplace-experience .product-comment-reply-children .product-comment-reply-node::before {
  left: -36px;
  width: 36px;
  border-color: #a3cf93;
}

.marketplace-experience .product-comment-reply-children .product-comment-reply-node:not(:last-child)::after {
  left: -36px;
  background: #a3cf93;
}

.marketplace-experience .product-comment-reply-composer {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 40px !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 9px !important;
  border: 1px solid rgba(47, 117, 72, .18) !important;
  border-radius: 14px !important;
  background: #f5faF1 !important;
}

.marketplace-experience .product-comment-reply-composer.inline {
  margin-top: 11px !important;
}

.marketplace-experience .product-comment-reply-composer .product-comment-avatar.small {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  box-shadow: none;
}

.marketplace-experience .product-comment-reply-composer input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(18, 60, 43, .13);
  border-radius: 11px;
  background: #fff;
  color: #123c2b;
  font-size: 11px;
  font-weight: 700;
  outline: 0;
}

.marketplace-experience .product-comment-reply-composer input:focus {
  border-color: rgba(57, 159, 84, .55);
  box-shadow: 0 0 0 3px rgba(57, 159, 84, .13);
}

.marketplace-experience .product-comment-reply-composer > button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #176b41;
  color: #fff;
}

.marketplace-experience .product-comment-reply-composer > button:focus-visible {
  outline: 3px solid rgba(57, 159, 84, .3);
  outline-offset: 2px;
}

.marketplace-experience .product-comment-reply-card textarea {
  width: 100%;
  min-height: 90px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(47, 123, 70, .28);
  border-radius: 11px;
  background: #fff;
  color: #294637;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.marketplace-experience .product-comment-card .product-comment-edit-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin-top: 9px !important;
  padding: 0 !important;
  border: 0 !important;
}

.marketplace-experience .product-comment-edit-actions button {
  min-height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid #123c2b !important;
  border-radius: 9px !important;
  background: #123c2b !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 900 !important;
}

.marketplace-experience .product-comment-edit-actions button:last-child {
  border-color: rgba(18, 60, 43, .14) !important;
  background: #eef3ec !important;
  color: #53695b !important;
}

/* Rating management uses explicit primary, secondary and destructive controls. */
.marketplace-experience .product-rating-panel > p {
  max-width: 660px;
  color: #607268;
  font-size: 10px;
  line-height: 1.55;
}

.marketplace-experience .rating-action {
  display: inline-flex !important;
  width: auto !important;
  min-height: 40px !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1.2;
  text-decoration: none !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.marketplace-experience .product-rating-panel .rating-submit-link.rating-action {
  margin-top: 12px !important;
  padding: 0 14px !important;
  text-decoration: none !important;
}

.marketplace-experience .rating-action-primary,
.marketplace-experience .rating-comment-box .rating-action-primary {
  border-color: #123c2b !important;
  background: #123c2b !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(18, 60, 43, .12);
}

.marketplace-experience .rating-action-secondary,
.marketplace-experience .rating-comment-box .rating-action-secondary {
  border-color: rgba(18, 60, 43, .16) !important;
  background: #fff !important;
  color: #365744 !important;
}

.marketplace-experience .rating-action-danger,
.marketplace-experience .rating-comment-box .rating-action-danger {
  border-color: rgba(176, 75, 61, .22) !important;
  background: #fff5f2 !important;
  color: #ad4c3e !important;
}

.marketplace-experience .rating-action:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(8, 40, 29, .11);
  transform: translateY(-1px);
}

.marketplace-experience .rating-action:focus-visible {
  outline: 3px solid rgba(57, 159, 84, .28);
  outline-offset: 2px;
}

.marketplace-experience .rating-action:disabled {
  cursor: wait;
  opacity: .58;
}

.marketplace-experience .rating-comment-box {
  gap: 11px !important;
  margin-top: 15px !important;
  padding: 15px !important;
  border-color: rgba(47, 117, 72, .2) !important;
  border-radius: 14px !important;
}

.marketplace-experience .rating-comment-box label {
  font-size: 11px;
  line-height: 1.4;
}

.marketplace-experience .rating-comment-box textarea {
  min-height: 104px;
  padding: 12px 13px;
  border-radius: 11px;
  color: #294637;
  font-size: 12px;
  line-height: 1.65;
}

.marketplace-experience .rating-comment-actions {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px !important;
  margin-top: 0 !important;
}

.marketplace-experience .rating-comment-actions .rating-comment-danger {
  margin-left: auto;
}

.marketplace-experience .rating-management-actions {
  display: flex !important;
  margin-top: 10px !important;
}

.marketplace-experience .rating-delete-link {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 0 13px !important;
  border: 1px solid rgba(176, 75, 61, .22) !important;
  background: #fff5f2 !important;
  color: #ad4c3e !important;
  font-size: 10px !important;
  text-decoration: none !important;
}

.marketplace-experience :is(.rating-comment-danger, .rating-delete-link) svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

/* Certificate presentation remains part of the product evidence area. */
.marketplace-experience .product-evidence-certificates {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(47, 117, 72, .16);
  border-radius: 18px;
  background: #f9fcf6;
}

.marketplace-experience .product-evidence-certificates > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.marketplace-experience .product-evidence-certificates > header span {
  color: #2e7448;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.marketplace-experience .product-evidence-certificates > header small,
.marketplace-experience .product-evidence-certificates > p {
  margin: 0;
  color: #6a7d70;
  font-size: 8px;
  line-height: 1.5;
}

.marketplace-experience .product-evidence-certificates .product-evidence-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.marketplace-experience .product-evidence-certificates .product-evidence-card {
  border-radius: 14px;
  background: #fff;
}

.marketplace-experience .product-story-grid {
  grid-template-columns: 1fr !important;
}

@media (max-width: 720px) {
  .marketplace-experience .product-comment-card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .marketplace-experience .product-comment-main {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
  }

  .marketplace-experience .product-comment-main:has(+ .product-comment-replies-wrap)::before {
    top: 22px;
    left: 21px;
  }

  .marketplace-experience .product-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .marketplace-experience .product-comment-content > header {
    align-items: stretch !important;
    flex-direction: column;
    gap: 10px !important;
  }

  .marketplace-experience .product-comment-header-side {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .marketplace-experience .product-comment-content > p {
    font-size: 13px !important;
  }

  .marketplace-experience .product-comment-replies-list {
    margin-left: 22px !important;
    padding-left: 30px !important;
  }

  .marketplace-experience .product-comment-reply-node::before {
    left: -30px;
    width: 30px;
  }

  .marketplace-experience .product-comment-reply-node:not(:last-child)::after {
    left: -30px;
  }

  .marketplace-experience .product-comment-reply-card {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  .marketplace-experience .product-comment-reply-card .product-comment-avatar.small {
    width: 36px !important;
    height: 36px !important;
  }

  .marketplace-experience .product-comment-reply-card:has(+ .product-comment-reply-children)::after {
    top: 18px;
    left: 28px;
  }

  .marketplace-experience .product-comment-reply-content > header {
    flex-direction: column;
  }

  .marketplace-experience .product-comment-reply-header-side {
    width: 100%;
    justify-content: space-between;
  }

  .marketplace-experience .product-comment-reply-card p {
    font-size: 12px !important;
  }

  .marketplace-experience .product-comment-reply-children {
    margin-left: 18px !important;
    padding-left: 28px !important;
  }

  .marketplace-experience .product-comment-reply-children .product-comment-reply-node::before {
    left: -28px;
    width: 28px;
  }

  .marketplace-experience .product-comment-reply-children .product-comment-reply-node:not(:last-child)::after {
    left: -28px;
  }

  .marketplace-experience .product-comment-reply-composer {
    grid-template-columns: 34px minmax(0, 1fr) 38px !important;
    gap: 7px !important;
    padding: 7px !important;
  }

  .marketplace-experience .product-comment-reply-composer .product-comment-avatar.small {
    width: 34px !important;
    height: 34px !important;
  }

  .marketplace-experience .product-comment-reply-composer input {
    height: 40px;
    padding: 0 10px;
    font-size: 10px;
  }

  .marketplace-experience .product-comment-reply-composer > button {
    width: 38px;
    height: 38px;
  }

  .marketplace-experience .rating-comment-actions .rating-comment-danger {
    margin-left: 0;
  }
}

@media (max-width: 430px) {
  .marketplace-experience .product-comment-card {
    padding: 12px !important;
  }

  .marketplace-experience .product-comment-main {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 9px;
  }

  .marketplace-experience .product-comment-main:has(+ .product-comment-replies-wrap)::before {
    top: 20px;
    left: 19px;
  }

  .marketplace-experience .product-comment-avatar {
    width: 40px;
    height: 40px;
  }

  .marketplace-experience .product-comment-replies-list {
    margin-left: 20px !important;
    padding-left: 22px !important;
  }

  .marketplace-experience .product-comment-reply-node::before,
  .marketplace-experience .product-comment-reply-children .product-comment-reply-node::before {
    left: -22px;
    width: 22px;
  }

  .marketplace-experience .product-comment-reply-node:not(:last-child)::after,
  .marketplace-experience .product-comment-reply-children .product-comment-reply-node:not(:last-child)::after {
    left: -22px;
  }

  .marketplace-experience .product-comment-reply-children {
    margin-left: 18px !important;
    padding-left: 22px !important;
  }

  .marketplace-experience .comment-icon-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    min-height: 34px;
  }

  .marketplace-experience .rating-action {
    min-height: 38px !important;
    padding: 0 11px !important;
    font-size: 9px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketplace-experience :is(.comment-icon-action, .rating-action) {
    transition: none !important;
  }
}
