/* ── TG Reviews – Public Styles ──────────────────────────────────── */
/* Matches thetgcreations.com brand: #F2A7B0 accent, #C96B8A pink,   */
/* #3D2B2B dark text, #EDD8DC border, DM Sans font.                  */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

.tg-rv-wrap {
  font-family: 'DM Sans', sans-serif;
  color: #3D2B2B;
  margin: 28px 0 0;
}

/* ── Summary ── */
.tg-rv-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #FDF5F6;
  border: 1px solid #EDD8DC;
  border-radius: 14px;
  padding: 22px 24px;
  flex-wrap: wrap;
}

.tg-rv-avg-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}
.tg-rv-avg-num {
  font-size: 42px;
  font-weight: 700;
  color: #3D2B2B;
  line-height: 1;
  margin-bottom: 6px;
}
.tg-rv-avg-label {
  font-size: 11.5px;
  color: #9A8A8A;
  margin-top: 5px;
  text-align: center;
}

/* Rating distribution bars */
.tg-rv-dist { flex: 1; min-width: 160px; }
.tg-rv-dist-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.tg-rv-dist-label {
  font-size: 12px;
  color: #7A6A6A;
  width: 10px;
  text-align: right;
}
.tg-rv-dist-bar-wrap {
  flex: 1;
  height: 7px;
  background: #EDD8DC;
  border-radius: 4px;
  overflow: hidden;
}
.tg-rv-dist-bar {
  height: 100%;
  background: linear-gradient(90deg, #F2A7B0, #C96B8A);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.tg-rv-dist-count {
  font-size: 11px;
  color: #9A8A8A;
  width: 14px;
}

/* Write a review button */
.tg-rv-write-col { margin-left: auto; }
.tg-rv-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #C96B8A;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.tg-rv-write-btn:hover { background: #b05878; transform: translateY(-1px); }
.tg-rv-write-btn svg {
  width: 15px; height: 15px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Review form ── */
.tg-rv-form-wrap {
  background: #fff;
  border: 1px solid #EDD8DC;
  border-radius: 14px;
  padding: 26px 24px;
  margin: 18px 0;
}
.tg-rv-form-title {
  font-size: 16px;
  font-weight: 700;
  color: #3D2B2B;
  margin: 0 0 20px;
}
.tg-rv-field { margin-bottom: 16px; }
.tg-rv-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #3D2B2B;
  margin-bottom: 6px;
}
.tg-req { color: #C96B8A; }
.tg-rv-input, .tg-rv-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #EDD8DC;
  border-radius: 9px;
  padding: 10px 13px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #3D2B2B;
  background: #FAFAFA;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.tg-rv-input:focus, .tg-rv-textarea:focus {
  border-color: #C96B8A;
  box-shadow: 0 0 0 3px rgba(201,107,138,0.12);
  background: #fff;
}
.tg-rv-textarea { resize: vertical; min-height: 100px; }
.tg-rv-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Star picker */
.tg-rv-star-picker {
  display: flex;
  gap: 5px;
  cursor: pointer;
  width: fit-content;
}
.tg-pick-star {
  width: 30px; height: 30px;
  fill: #EDD8DC;
  stroke: #EDD8DC;
  stroke-width: 1;
  transition: fill 0.15s, transform 0.15s;
}
.tg-pick-star.tg-hovered,
.tg-pick-star.tg-selected {
  fill: #F2A7B0;
  stroke: #C96B8A;
  transform: scale(1.15);
}

/* Form actions */
.tg-rv-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}
.tg-rv-cancel-btn {
  background: transparent;
  border: 1px solid #EDD8DC;
  border-radius: 9px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #7A6A6A;
  cursor: pointer;
  transition: background 0.2s;
}
.tg-rv-cancel-btn:hover { background: #FDF5F6; }
.tg-rv-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #C96B8A;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.tg-rv-submit-btn:hover { background: #b05878; }
.tg-rv-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* Spinner */
.tg-spin {
  width: 16px; height: 16px;
  stroke: #fff; fill: none;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: tg-spin 0.8s linear infinite;
}
@keyframes tg-spin { to { stroke-dashoffset: 0; } }

/* Message */
.tg-rv-msg {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}
.tg-rv-msg.tg-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.tg-rv-msg.tg-error   { background: #FFF5F7; color: #9B2C47; border: 1px solid #FECDD3; }

/* ── Stars display ── */
.tg-rv-stars { display: inline-flex; gap: 2px; }
.tg-star {
  width: 16px; height: 16px;
  stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.tg-star-full  { fill: #F2A7B0; stroke: #C96B8A; }
.tg-star-empty { fill: #EDD8DC; stroke: #D9C2C6; }
.tg-star-sm { width: 12px; height: 12px; }

/* ── Reviews list ── */
.tg-rv-list { margin-top: 22px; }

.tg-rv-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9A8A8A;
}
.tg-rv-empty svg {
  width: 36px; height: 36px;
  stroke: #D9C2C6; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 10px;
}
.tg-rv-empty p { font-size: 13.5px; margin: 0; }

/* Review card */
.tg-rv-card {
  border-bottom: 1px solid #EDD8DC;
  padding: 18px 0;
}
.tg-rv-card:last-child { border-bottom: none; }
.tg-rv-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.tg-rv-avatar {
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F2A7B0, #C96B8A);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tg-rv-meta { flex: 1; }
.tg-rv-author {
  font-size: 13.5px;
  font-weight: 600;
  color: #3D2B2B;
  margin-bottom: 3px;
}
.tg-rv-date {
  font-size: 11.5px;
  color: #9A8A8A;
  margin-left: auto;
  white-space: nowrap;
}
.tg-rv-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #3D2B2B;
  margin-bottom: 5px;
}
.tg-rv-card-body {
  font-size: 13px;
  color: #7A6A6A;
  line-height: 1.75;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tg-rv-summary { flex-direction: column; align-items: flex-start; gap: 16px; }
  .tg-rv-write-col { margin-left: 0; width: 100%; }
  .tg-rv-write-btn { width: 100%; justify-content: center; }
  .tg-rv-row2 { grid-template-columns: 1fr; }
  .tg-rv-form-actions { flex-direction: column-reverse; }
  .tg-rv-cancel-btn, .tg-rv-submit-btn { width: 100%; justify-content: center; }
}
