/* =========================================================
   TREC RENTALS · Guest experience (verified customer reviews)
   Shared by: homepage section, reviews.html, review.html.
   Uses the site tokens (paper/ink/navy/royal) — refined navy
   and blue accents, serif headings, premium card styling.
   ========================================================= */

/* ---------- homepage section + list grid ---------- */
.gx__head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.gx__meta { text-align: right; }
.gx__score {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  justify-content: flex-end;
}
.gx__avg {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: var(--ink);
  line-height: 1;
}
.gx__count {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}
.gx__grid {
  max-width: var(--maxw);
  margin: 2.4rem auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: stretch;
}
@media (max-width: 980px) { .gx__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gx__grid { grid-template-columns: 1fr; } }

.gx-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}
.gx-card__text {
  color: var(--ink-2);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.gx-card__text::before { content: "\201C"; color: var(--faint); }
.gx-card__text::after  { content: "\201D"; color: var(--faint); }
.gx-card__who {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  min-width: 0;
}
.gx-card__id { flex: 1 1 9rem; min-width: 0; }
.gx-card__photo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex: 0 0 auto;
}
.gx-card__name {
  font-family: var(--f-display);
  font-weight: 500;
  color: var(--ink);
  display: block;
}
.gx-card__trip {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
  overflow-wrap: anywhere;
}
.gx-card__badge {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
}

/* styles.css sets img{display:block}, which outranks the UA [hidden] rule —
   restate it so unloaded photo slots never render as broken images. */
.gx-card__photo[hidden], .rv-photo__preview[hidden] { display: none; }

/* Stars (shared) */
.gx-stars { display: inline-flex; gap: 2px; line-height: 0; }
.gx-stars svg { width: 18px; height: 18px; }
.gx-stars--lg svg { width: 22px; height: 22px; }
.gx-stars .is-on  { fill: var(--brand); }
.gx-stars .is-off { fill: var(--paper-3); }

/* Empty state */
.gx-empty {
  grid-column: 1 / -1;
  text-align: center;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(2.2rem, 6vw, 3.6rem) 1.4rem;
}
.gx-empty h3 {
  font-family: var(--f-display);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}
.gx-empty p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0.7rem auto 0;
}

.gx__actions {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding: 0 var(--gutter);
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- review form (review.html) ---------- */
.rv-wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 5rem);
}
.rv-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
.rv-context {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.4rem;
}
.rv-context strong { font-family: var(--f-display); font-weight: 500; color: var(--ink); }
.rv-context span { color: var(--muted); font-size: 0.9rem; display: block; }
.rv-field { margin-top: 1.3rem; }
.rv-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.rv-stars { display: inline-flex; gap: 0.15rem; border: 0; padding: 0; }
.rv-stars input {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.rv-stars label { cursor: pointer; padding: 0.1rem; border-radius: 8px; }
.rv-stars label svg { width: 34px; height: 34px; fill: var(--paper-3); transition: fill 0.15s ease, transform 0.15s var(--ease); }
.rv-stars label:hover svg { transform: scale(1.08); }
.rv-stars label.is-on svg { fill: var(--brand); }
.rv-stars input:focus-visible + svg { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.rv-starhint { color: var(--muted); font-size: 0.9rem; margin-left: 0.7rem; }
.rv-input, .rv-textarea {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
}
.rv-textarea { min-height: 150px; resize: vertical; }
.rv-input:focus, .rv-textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.rv-counter { color: var(--muted); font-size: 0.8rem; text-align: right; margin-top: 0.3rem; }
.rv-photo { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.rv-photo input[type="file"] { max-width: 100%; color: var(--muted); font-size: 0.9rem; }
.rv-photo__preview {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.rv-hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.45rem; }
.rv-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.9rem 0.95rem;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.rv-consent input { margin-top: 0.25rem; width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.rv-submit { margin-top: 1.6rem; width: 100%; justify-content: center; }
.rv-msg { margin-top: 0.9rem; font-size: 0.92rem; color: var(--error); }
.rv-msg.is-ok { color: var(--brand-deep); }
.rv-fine { color: var(--muted); font-size: 0.82rem; margin-top: 1rem; }

/* Status cards (no/invalid token, thank-you) */
.rv-status { text-align: center; padding: clamp(1.6rem, 5vw, 2.6rem) 0.6rem; }
.rv-status h2 { font-family: var(--f-display); font-weight: 500; color: var(--ink); font-size: clamp(1.4rem, 3vw, 1.9rem); }
.rv-status p { color: var(--muted); max-width: 46ch; margin: 0.8rem auto 0; }
.rv-status .btn { margin-top: 1.6rem; }
.rv-spin {
  width: 28px; height: 28px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid var(--paper-3);
  border-top-color: var(--brand);
  animation: rvspin 0.9s linear infinite;
}
@keyframes rvspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rv-spin { animation: none; } }
