/* ===== Internal Reviews Module (reviews.css) ===== */

/* Fix extra whitespace in Woo tabs only when our module is present */
.woocommerce div.product .woocommerce-tabs .panel:has(.asd-internal-reviews) {
  padding-top: 8px;
}
.woocommerce div.product .woocommerce-tabs .panel .asd-internal-reviews {
  margin-top: -12px; /* fallback if :has() isn’t supported */
}

/* Container */
.asd-internal-reviews {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.25rem 1rem;
}

/* Toolbar / header */
.asd-reviews-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  margin: 0.25rem 0 0.75rem;
  flex-wrap: wrap;
}
.asd-reviews-toolbar .spacer {
  flex: 1;
}

.asd-reviews-toolbar .sort {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0 !important;
  white-space: nowrap;
}
.asd-reviews-toolbar .sort span {
  font-size: 0.9rem;
  color: #4b5563;
}
.asd-reviews-toolbar .sort select {
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  height: 36px;
  line-height: 1;
  appearance: auto;
}

/* --- REVIEW SUMMARY BLOCK --- */
.asd-summary {
  display: flex !important; /* force side-by-side layout */
  flex-direction: row !important;
  align-items: flex-start;
  gap: 14px; /* small clean spacing */
  padding: 12px 14px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  max-width: 420px; /* ensures enough horizontal room */
  box-sizing: border-box;
  flex-wrap: nowrap !important; /* NEVER wrap */
}

/* Left: main rating block */
.asd-summary-main {
  display: flex;
  flex-direction: column;
  min-width: 90px;
}

.asd-summary-main .summary-score {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.asd-summary-main .summary-count {
  font-size: 0.85rem;
  color: #6b7280;
}

/* --- HISTOGRAM --- */
.asd-summary-bars {
  display: flex !important;
  flex-direction: column;
  gap: 2px; /* tight grouping */
  width: 180px; /* fixed width prevents wrap */
}

.asd-summary-row {
  display: flex;
  align-items: center;
  height: 24px; /* <- the 24px you liked */
  line-height: 24px;
  margin: 0;
  padding: 0;
  gap: 6px;
  font-size: 0.8rem;
  color: #374151;
}

/* Remove the empty <p> WordPress inserts below each histogram row */
.asd-summary-row + p {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

.asd-summary-row .label {
  width: 22px;
  font-size: 0.8rem;
  color: #374151;
}

.asd-summary-row .bar {
  flex: 1;
  height: 5px;
  background: #e5e7eb;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.asd-summary-row .bar-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #e00024, #f97316);
  border-radius: inherit;
}

.asd-summary-row .count {
  width: 26px;
  font-size: 0.8rem;
  text-align: right;
  color: #374151;
}

/* Mobile stacking */
@media (max-width: 740px) {
  .asd-summary {
    flex-direction: column !important;
    max-width: 100%;
  }
  .asd-summary-bars {
    width: 100%;
  }

  .asd-reviews-toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap; /* just in case */
  }

  /* Hide the flex "spacer" on mobile */
  .asd-reviews-toolbar .spacer {
    display: none;
  }

  /* Summary card should take full width */
  .asd-summary {
    max-width: 100%;
    width: 100%;
  }

  /* Sort row full width */
  .asd-reviews-toolbar .sort {
    width: 100%;
    transform: none; /* undo the little vertical offset */
    justify-content: space-between;
  }

  .asd-reviews-toolbar .sort span {
    font-size: 0.9rem;
  }

  .asd-reviews-toolbar .sort select {
    margin-left: auto;
  }

  /* Button full width, centered label */
  .asd-reviews-toolbar .asd-open-review {
    width: 100%;
    transform: none; /* undo desktop offset */
    justify-content: center;
  }
}

/* Empty state */
.asd-empty-state {
  text-align: center;
  padding: 20px 12px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
}
.asd-empty-state .lead {
  font-size: 1.05rem;
  margin: 0 0 10px;
}

/* ===== Masonry reviews via columns (3/2/1) ===== */
.asd-reviews-wrap {
  background: linear-gradient(180deg, #fafbfc, #f6f7f9);
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 12px;
}
.asd-review-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  column-count: 3;
  column-gap: 12px;
  -webkit-column-count: 3;
  -webkit-column-gap: 12px;
  -moz-column-count: 3;
  -moz-column-gap: 12px;
}
@media (max-width: 1100px) {
  .asd-review-list {
    column-count: 2;
    -webkit-column-count: 2;
    -moz-column-count: 2;
  }
}
@media (max-width: 640px) {
  .asd-review-list {
    column-count: 1;
    -webkit-column-count: 1;
    -moz-column-count: 1;
  }
}

/* Make sure theme grids don't break columns */
.asd-internal-reviews .asd-reviews-wrap {
  display: block !important;
}
.asd-internal-reviews ul.asd-review-list {
  display: block !important;
  column-fill: balance;
  grid-template-columns: unset !important;
  grid-auto-rows: unset !important;
}
.asd-internal-reviews ul.asd-review-list > li.asd-review {
  display: inline-block !important;
  width: 100%;
  margin: 0 0 12px !important;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
}

/* Review card */
.asd-review {
  border: 1px solid #e7e9ec;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.asd-review .asd-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #eef0f3;
  margin-left: -4px;
  margin-right: -4px;
}
.asd-review .name {
  font-weight: 700;
}
.asd-review .date {
  font-size: 0.85rem;
  color: #6b7280;
}
.asd-review .stars {
  display: inline-flex;
  gap: 2px;
  margin: 4px 0;
}
.asd-review .stars svg {
  width: 15px;
  height: 15px;
  fill: #f59e0b;
}
.asd-review .content {
  overflow-wrap: anywhere;
  color: #111827;
  line-height: 1.45;
  font-size: 0.95rem;
}

/* Verified badge */
.badge-verified {
  display: inline-block;
  margin-left: 8px;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid #a7f3d0;
}

/* Attached media in reviews */
.asd-review-media {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.asd-review-media img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.asd-review-media .file {
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 0.75rem;
}

/* Pagination */
.asd-reviews-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0.75rem 0 1rem;
}
.asd-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
.asd-page-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.asd-page-btn.is-active {
  background: linear-gradient(180deg, #e00024, #c4001d);
  color: #fff;
  border-color: #b0021a;
}

/* Optional small-screen scroll area */
@media (max-width: 420px) {
  .asd-reviews-wrap {
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ===== Modal Wizard ===== */
.asd-modal[hidden] {
  display: none;
}
/* FULLSCREEN OVERLAY – strictly constrained to viewport */
.asd-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 16px; /* a bit lighter on mobile */
  box-sizing: border-box; /* padding counted inside width */
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden; /* never make the page wider */
}

.asd-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* DIALOG – responsive width */
.asd-modal-dialog {
  position: relative;
  z-index: 1;

  width: 100%; /* take all the available space inside the padded overlay */
  max-width: 760px; /* same idea as min(760px, 100%) but clearer */
  max-height: 90vh;

  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  padding: 22px 22px 16px;
  display: flex;
  flex-direction: column;
}

.asd-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.asd-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
}
.step {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.step[hidden] {
  display: none;
}
.step .grow {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.step .muted {
  margin: 0 0 6px;
  color: #6b7280;
  font-size: 0.9rem;
}
.step .muted.small {
  font-size: 0.8rem;
}

/* Rating stars in step 1 */
.asd-rating-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

/* Stars: radios hidden, labels are the visible stars.
   DOM order is 5→1, but we reverse visually so user sees 1→5. */
.asd-rating-stars {
  display: inline-flex;
  flex-direction: row-reverse; /* 1★ on the left, 5★ on the right */
  gap: 10px;
}

/* Radios hidden but still accessible */
.asd-rating-stars input {
  display: none;
}

/* Base star */
.asd-rating-stars label {
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #e5e7eb; /* empty star */
  transition: color 0.15s ease;
}

/* Keep chosen rating visible and fill from the left up to the chosen star. */
.asd-rating-stars input:checked ~ label {
  color: #f59e0b; /* selected colour */
}

/* Hover preview: while hovering, show what the rating would be */
.asd-rating-stars label:hover,
.asd-rating-stars label:hover ~ label {
  color: #f97316;
}

/* Textarea (Tell us more) */
.m_content {
  width: 100%;
  min-height: 200px;
  max-height: 260px;
  resize: none;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Inputs */
.asd-input,
.step input[type="text"],
.step input[type="email"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
}
.step .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .step .two {
    grid-template-columns: 1fr;
  }
}

/* Terms checkbox */
.terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #4b5563;
}
.terms input {
  margin-top: 3px;
}

/* Upload card */
.asd-upload-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 100%);
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  text-align: left;
  transition:
    box-shadow 0.15s ease,
    transform 0.05s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.asd-upload-card:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.asd-upload-card-icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.asd-upload-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.asd-upload-card-main strong {
  font-size: 0.95rem;
}
.asd-upload-card-main span {
  font-size: 0.8rem;
  color: #6b7280;
}

/* Offer description block (when enabled in settings) */
.asd-offer-card {
  margin-top: 10px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  font-size: 0.85rem;
  line-height: 1.4;
}
.asd-offer-card strong {
  font-weight: 700;
}

/* Upload previews */
.upload-previews {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.preview-item {
  position: relative;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 3px;
}
.preview-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}
.preview-file {
  font-size: 0.8rem;
  padding: 4px 6px;
  display: inline-block;
}

/* X button */
.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Success screen (Step 5) */
.success {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.success .success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
  margin-bottom: 8px;
}
.asd-link {
  color: #0b6cff;
  text-decoration: none;
}
.asd-link:hover {
  text-decoration: underline;
}

/* Buttons */
.asd-btn {
  --asd-ring: 0 0 0 2px rgba(222, 27, 42, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.05s ease,
    box-shadow 0.18s ease,
    filter 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}
.asd-btn:focus-visible {
  outline: none;
  box-shadow: var(--asd-ring);
}
.asd-btn:active {
  transform: translateY(1px);
}
.asd-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.05);
}
.asd-btn-primary {
  background: linear-gradient(180deg, #e00024, #c4001d);
  color: #fff;
  border-color: #b0021a;
  box-shadow: 0 8px 20px rgba(196, 0, 29, 0.22);
}
.asd-btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 24px rgba(196, 0, 29, 0.28);
}
.asd-btn-secondary {
  background: #fff;
  color: #111;
  border-color: #e5e7eb;
}
.asd-btn-secondary:hover {
  background: #f7f7f9;
}
.asd-btn-ghost {
  background: transparent;
  color: #111;
  border-color: #111;
}
.asd-btn-ghost:hover {
  background: #111;
  color: #fff;
}
.asd-btn-icon {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
}

/* Toolbar / empty-state CTAs */
.asd-reviews-toolbar .asd-open-review {
  composes: asd-btn asd-btn-secondary;
}
.asd-empty-state .asd-open-review {
  composes: asd-btn asd-btn-primary;
}

/* Wizard nav (bottom row of buttons) */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}
.wizard-nav .asd-btn {
  flex: 0 0 auto;
}
.wizard-nav .asd-btn.submit {
  min-width: 160px;
}

/* Banner informing user they already reviewed */
.asd-review-banner {
  font-size: 0.8rem;
}

/* Fix unwanted WordPress <p> wrappers */
.asd-reviews-toolbar > p {
  margin: 0 !important;
  padding: 0 !important;
  display: contents !important; /* makes <p> behave like it's not even there */
}

/* Improve layout: put summary left, controls right, aligned at the bottom */
.asd-reviews-toolbar {
  display: flex;
  align-items: flex-end; /* align sort + button to the same bottom baseline as summary */
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

/* Ensure summary box stays compact */
.asd-summary {
  flex: 0 0 auto;
}

/* Controls container (sort + button) */
.asd-reviews-toolbar .sort,
.asd-reviews-toolbar .asd-open-review {
  margin-bottom: 0 !important;
}

/* Add a tiny vertical offset so the controls align perfectly with bottom of box */
.asd-reviews-toolbar .sort,
.asd-reviews-toolbar .asd-open-review {
  transform: translateY(4px);
}

/* --- Review media thumbnails & links --- */
.asd-review-media {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asd-review-media a.asd-rm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Images */
.asd-review-media a.asd-rm img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* Video "chips" */
.asd-review-media a.asd-review-media-file {
  min-width: 140px;
  height: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Upload previews with nice remove button --- */
.upload-previews {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-item {
  position: relative;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 4px;
}

.preview-thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.preview-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 72px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 0.8rem;
}

/* X button */
.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Review submission: measurable upload followed by indeterminate server work. */
.asd-upload-progress {
  margin-top: 14px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .18s ease;
  color: #374151;
  font-size: 13px;
}
.asd-upload-progress.is-active {
  opacity: 1;
  max-height: 160px;
  overflow: visible;
}
.asd-upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
  font-weight: 600;
}
.asd-upload-progress-percent { color: #b91c1c; font-variant-numeric: tabular-nums; }
.asd-upload-progress-track {
  position: relative;
  height: 7px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.asd-upload-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e00024, #f97316);
  transition: width .16s ease;
}
.asd-upload-progress.is-processing .asd-upload-progress-bar {
  width: 35%;
  animation: asd-review-processing 1.35s ease-in-out infinite;
}
.asd-upload-progress-note {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}
@keyframes asd-review-processing {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(305%); }
}
@media (prefers-reduced-motion: reduce) {
  .asd-upload-progress.is-processing .asd-upload-progress-bar { animation: none; }
}

/* --- Video tile in review cards --- */
.asd-review-media-video {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #111827;
  text-decoration: none;
  color: #fff;
}

.asd-review-media-video .asd-video-icon {
  font-size: 26px;
  line-height: 1;
}

/* Lightbox body-lock */
.asd-rlb-open {
  overflow: hidden;
}

/* Simple lightbox visuals (if not already styled) */
.asd-review-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}
.asd-review-lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.asd-rlb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.asd-rlb-dialog {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  background: #000;
  border-radius: 12px;
  padding: 8px;
}
.asd-rlb-content img,
.asd-rlb-content video {
  max-width: 80vw;
  max-height: 80vh;
  display: block;
}
.asd-rlb-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: #f9fafb;
  cursor: pointer;
}

@media (max-width: 600px) {
  .asd-modal {
    padding: 10px;
  }

  .asd-modal-dialog {
    border-radius: 14px;
    padding: 18px 14px 12px;
  }
}

/* Allow tabs + sidebar to shrink within the grid (fix overflow) */
.asd-description-tabs > .asd-tabs,
.asd-description-tabs > .asd-sidebar {
  min-width: 0;       /* critical for CSS grid */
}

/* Make the internal reviews module respect the column width */
.asd-tabs .asd-internal-reviews {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Tighter header alignment for name / badge / date */
.asd-review .asd-review-head {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 8px;
  row-gap: 2px;        /* smaller vertical gap */
  align-items: start;  /* badge aligns with top of name */
}

/* Name: left, first row */
.asd-review .asd-review-head .name {
  grid-column: 1 / 2;
  grid-row: 1 / 3;     /* let the name span both rows */
}

/* Badge: top-right (aligned with first line of name) */
.asd-review .asd-review-head .badge-verified {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-self: end;
}

/* Date: just under the badge, with minimal gap */
.asd-review .asd-review-head .date {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  justify-self: end;
  white-space: nowrap;
  margin-top: 0;       /* remove extra spacing */
}

/* 2-column range: allow the date to wrap so badge+date don't overflow */
@media (max-width: 1400px) and (min-width: 641px) {
  .asd-review .asd-review-head .date {
    white-space: normal;   /* let "December 5, 2025" break if needed */
    text-align: right;
  }
}
