/* ═══════════════════════════════════════════════
   Google Reviews WP — Frontend v2.1
   Responsive · Mobile-first
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --grwp-gold:      #f59e0b;
  --grwp-gold-dim:  #e2e8f0;
  --grwp-blue:      #1a73e8;
  --grwp-text:      #111827;
  --grwp-sub:       #6b7280;
  --grwp-bg:        #ffffff;
  --grwp-surface:   #f8fafc;
  --grwp-border:    #e5e7eb;
  --grwp-radius:    14px;
  --grwp-shadow:    0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
  /* Buton renkleri — admin'den inline style ile override edilir */
  --grwp-btn-write-bg:    #1a73e8;
  --grwp-btn-write-text:  #ffffff;
  --grwp-btn-write-hover: #1558c0;
  --grwp-btn-all-bg:      transparent;
  --grwp-btn-all-text:    #1a73e8;
  --grwp-btn-all-hover:   #1a73e8;
}

.grwp {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--grwp-text);
  box-sizing: border-box;
}
.grwp *, .grwp *::before, .grwp *::after { box-sizing: inherit; }

/* ── Header ─────────────────────────────────── */
.grwp__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--grwp-border);
}

.grwp__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grwp-surface);
  border: 1px solid var(--grwp-border);
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--grwp-sub);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.grwp__google-icon { width: 16px; height: 16px; display: block; flex-shrink: 0; }

.grwp__place {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 400;
  margin: 0;
  flex: 1;
  min-width: 120px;
}

.grwp__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.grwp__score {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 400;
  line-height: 1;
}
.grwp__summary-detail { display: flex; flex-direction: column; gap: 3px; }
.grwp__total { font-size: 11px; color: var(--grwp-sub); }

/* ── Stars ───────────────────────────────────── */
.grwp__stars { display: inline-flex; gap: 1px; }
.grwp__star  { font-size: 14px; color: var(--grwp-gold-dim); line-height: 1; }
.grwp__star--full, .grwp__star--half { color: var(--grwp-gold); }

/* ── Grid / List ─────────────────────────────── */
.grwp--grid .grwp__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.grwp--list .grwp__grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Card ────────────────────────────────────── */
.grwp__card {
  background: var(--grwp-bg);
  border: 1px solid var(--grwp-border);
  border-radius: var(--grwp-radius);
  padding: 16px 18px;
  box-shadow: var(--grwp-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.grwp__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
}

.grwp__card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grwp__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--grwp-border);
}
.grwp__avatar--initials {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.grwp__author { flex: 1; min-width: 0; }
.grwp__author-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grwp__date { font-size: 11px; color: var(--grwp-sub); }

.grwp__card-rating { margin-left: auto; flex-shrink: 0; }
.grwp__card-rating .grwp__star { font-size: 12px; }

.grwp__text-wrap {
  position: relative;
}

.grwp__text {
  font-size: 13px;
  line-height: 1.65;
  color: #374151;
  margin: 0;
  overflow: hidden;
  max-height: calc(1.65em * 4);   /* 4 satır */
  transition: max-height .35s ease;
}
.grwp__text.is-expanded {
  max-height: 600px;
}

/* Fade overlay — sadece kısık halde */
.grwp__text-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--grwp-bg, #fff));
  pointer-events: none;
  transition: opacity .25s ease;
}
.grwp__text.is-expanded + .grwp__text-fade {
  opacity: 0;
}

/* Devamını oku butonu */
.grwp__read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--grwp-btn-write-bg, #1a73e8);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity .15s;
  font-family: inherit;
}
.grwp__read-more:hover { opacity: .75; }
.grwp__read-more svg {
  transition: transform .3s ease;
  flex-shrink: 0;
}
.grwp__read-more.is-expanded svg {
  transform: rotate(180deg);
}
/* Kısa yorumlarda gizle */
.grwp__read-more.is-short { display: none; }

/* ── Footer ──────────────────────────────────── */
.grwp__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--grwp-border);
}
.grwp__sync { font-size: 11px; color: var(--grwp-sub); }
.grwp__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────── */
.grwp__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.grwp__btn:hover { transform: translateY(-1px); }

.grwp__btn--write {
  background:   var(--grwp-btn-write-bg);
  color:        var(--grwp-btn-write-text) !important;
  border-color: var(--grwp-btn-write-bg);
}
.grwp__btn--write:hover {
  background:   var(--grwp-btn-write-hover);
  border-color: var(--grwp-btn-write-hover);
  color:        var(--grwp-btn-write-text) !important;
}

.grwp__btn--all {
  background:   var(--grwp-btn-all-bg);
  color:        var(--grwp-btn-all-text) !important;
  border-color: var(--grwp-btn-all-text);
}
.grwp__btn--all:hover {
  background:   var(--grwp-btn-all-hover);
  border-color: var(--grwp-btn-all-hover);
  color:        #fff !important;
}

/* ── Notices ─────────────────────────────────── */
.grwp-notice {
  padding: 12px 16px;
  border-radius: var(--grwp-radius);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.grwp-notice--error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.grwp-notice--empty { background: var(--grwp-surface); border: 1px dashed var(--grwp-border); color: var(--grwp-sub); }
.grwp-notice__icon  { font-size: 18px; flex-shrink: 0; }

/* ════════════════════════════════════════════════
   RESPONSIVE — Mobile First
════════════════════════════════════════════════ */

/* Küçük telefon (< 480px) */
@media (max-width: 479px) {
  .grwp__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .grwp__summary { margin-left: 0; width: 100%; }
  .grwp__score   { font-size: 40px; }
  .grwp--grid .grwp__grid { grid-template-columns: 1fr; gap: 10px; }
  .grwp__footer  { flex-direction: column; align-items: flex-start; }
  .grwp__actions { width: 100%; }
  .grwp__btn     { flex: 1; justify-content: center; padding: 10px 12px; }
  .grwp__card    { padding: 14px; }
}

/* Tablet (480px – 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .grwp--grid .grwp__grid { grid-template-columns: repeat(2, 1fr); }
  .grwp__header { gap: 10px; }
  .grwp__summary { margin-left: auto; }
}

/* Büyük ekran (768px+) */
@media (min-width: 768px) {
  .grwp--grid .grwp__grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ══════════════════════════════════════════════
   MİNİMAL STİL
══════════════════════════════════════════════ */
.grwp-style--minimal .grwp__card--minimal {
  background: var(--grwp-bg);
  border: 1px solid var(--grwp-border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: none;
  transition: border-color .18s;
}
.grwp-style--minimal .grwp__card--minimal:hover {
  border-color: var(--grwp-blue);
  transform: none;
  box-shadow: none;
}
.grwp__minimal-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.grwp__minimal-top .grwp__date { margin-left: auto; }
.grwp-style--minimal .grwp__text {
  font-size: 13px;
  color: #374151;
  margin: 0;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grwp__minimal-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--grwp-sub);
  font-style: italic;
}

/* ══════════════════════════════════════════════
   TESTİMONİAL STİL
══════════════════════════════════════════════ */
.grwp-style--testimonial .grwp__card--testimonial {
  background: var(--grwp-surface);
  border: 1px solid var(--grwp-border);
  border-radius: var(--grwp-radius);
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: var(--grwp-shadow);
  transition: transform .2s, box-shadow .2s;
}
.grwp-style--testimonial .grwp__card--testimonial:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.grwp__testimonial-quote {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 64px;
  line-height: .7;
  color: var(--grwp-blue);
  opacity: .18;
  position: absolute;
  top: 14px;
  left: 18px;
  pointer-events: none;
  user-select: none;
}
.grwp-style--testimonial .grwp__text {
  font-size: 14px;
  line-height: 1.7;
  color: #1f2937;
  margin: 0;
  font-style: italic;
  -webkit-line-clamp: 6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grwp__testimonial-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--grwp-border);
}
.grwp__testimonial-footer > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.grwp__testimonial-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--grwp-text);
}
.grwp__avatar--sm {
  width: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
}
