/* ========================================
   Smart Reviews Widget — Frontend Styles
   Elegant, refined design for hospitality
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;600;700&display=swap');

:root {
  --strw-accent: #C8A96E;
  --strw-accent-rgb: 200, 169, 110;
}

.strw-widget {
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  color: #2c2c2c;
  max-width: 1200px;
  margin: 0 auto;
}
.strw-widget *, .strw-widget *:before, .strw-widget *:after { box-sizing: inherit; }

/* ======== THEME: ELEGANT (default) ======== */
.strw-theme-elegant {
  --bg:         #faf9f7;
  --card-bg:    #ffffff;
  --card-hover: #fffef9;
  --border:     #e8e2d8;
  --text:       #2a2118;
  --muted:      #8a7a69;
  --header-bg:  #f5f1eb;
  --star-full:  #C8A96E;
  --star-empty: #ddd2c3;
  --avatar-bg:  var(--strw-accent);
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.07);
}

/* ======== THEME: MODERN ======== */
.strw-theme-modern {
  --bg:         #f8fafc;
  --card-bg:    #ffffff;
  --card-hover: #f0f9ff;
  --border:     #e2e8f0;
  --text:       #0f172a;
  --muted:      #64748b;
  --header-bg:  #f1f5f9;
  --star-full:  #f59e0b;
  --star-empty: #e2e8f0;
  --avatar-bg:  #3b82f6;
  --radius:     16px;
  --shadow:     0 2px 16px rgba(0,0,0,0.08);
}

/* ======== THEME: MINIMAL ======== */
.strw-theme-minimal {
  --bg:         #ffffff;
  --card-bg:    #fafafa;
  --card-hover: #f5f5f5;
  --border:     #ebebeb;
  --text:       #111111;
  --muted:      #888888;
  --header-bg:  #f5f5f5;
  --star-full:  #222222;
  --star-empty: #ddd;
  --avatar-bg:  #222222;
  --radius:     4px;
  --shadow:     none;
}
.strw-theme-minimal .strw-card { border: 1px solid var(--border); }

/* ======== THEME: BOLD ======== */
.strw-theme-bold {
  --bg:         #0a0a0a;
  --card-bg:    #161616;
  --card-hover: #1f1f1f;
  --border:     #2a2a2a;
  --text:       #f0f0f0;
  --muted:      #888888;
  --header-bg:  #111111;
  --star-full:  var(--strw-accent);
  --star-empty: #333333;
  --avatar-bg:  var(--strw-accent);
  --radius:     8px;
  --shadow:     0 4px 32px rgba(0,0,0,0.4);
}
.strw-theme-bold .strw-card-name { color: #ffffff; }
.strw-theme-bold .strw-summary { border-color: #2a2a2a; }
.strw-theme-bold .strw-cta-bar { border-top-color: #2a2a2a; }

/* ======== SUMMARIES ======== */
.strw-summaries {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.strw-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  flex: 1;
  min-width: 220px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.strw-summary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--strw-accent-rgb),0.05), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.strw-summary:hover::before { opacity: 1; }
.strw-summary:hover {
  border-color: rgba(var(--strw-accent-rgb), 0.4);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.strw-summary-logo svg { display: block; }
.strw-ta-badge {
  width: 36px; height: 36px;
  background: #34E0A1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
}
.strw-summary-data { flex: 1; }
.strw-summary-name {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.strw-summary-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
}
.strw-summary-row strong { color: var(--text); font-size: 1.05rem; }
.strw-muted { color: var(--muted); font-size: 0.78rem; }
.strw-summary-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateX(-4px);
}
.strw-summary:hover .strw-summary-arrow { opacity: 1; transform: translateX(0); }

/* ======== STARS ======== */
.strw-stars-sm, .strw-card-stars {
  display: inline-flex;
  gap: 1px;
}
.strw-star { font-size: 13px; line-height: 1; }
.strw-star.full  { color: var(--star-full); }
.strw-star.half  { color: var(--star-full); opacity: 0.55; }
.strw-star.empty { color: var(--star-empty); }
.strw-stars-ta .strw-star.full { color: #00AA6C; }
.strw-stars-ta .strw-star.half { color: #00AA6C; }

/* ======== GRID LAYOUTS ======== */
.strw-layout-grid .strw-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
.strw-layout-list .strw-reviews-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.strw-layout-masonry .strw-reviews-grid {
  columns: 3;
  column-gap: 20px;
}
.strw-layout-masonry .strw-card {
  break-inside: avoid;
  margin-bottom: 20px;
}

/* ======== CARD ======== */
.strw-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all 0.28s ease;
  position: relative;
  overflow: hidden;
}
.strw-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--strw-accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.strw-card:hover {
  background: var(--card-hover);
  border-color: rgba(var(--strw-accent-rgb), 0.3);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.strw-card:hover::after { transform: scaleX(1); }

.strw-featured {
  border-color: rgba(var(--strw-accent-rgb), 0.4);
  background: linear-gradient(135deg, var(--card-bg), rgba(var(--strw-accent-rgb), 0.04));
}
.strw-featured::after { transform: scaleX(0.6); }
.strw-featured-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--strw-accent);
  background: rgba(var(--strw-accent-rgb), 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(var(--strw-accent-rgb), 0.25);
}

.strw-card-top {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}
.strw-card-avatar {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  overflow: hidden;
}
.strw-card-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.strw-avatar-init {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--avatar-bg);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  font-family: 'Playfair Display', serif;
}
.strw-card-meta { flex: 1; min-width: 0; }
.strw-card-name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 5px;
  font-family: 'Lato', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strw-card-stars {
  display: flex;
  align-items: center;
  gap: 8px;
}
.strw-card-date {
  font-size: 0.75rem;
  color: var(--muted);
}
.strw-card-source {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.strw-ta-icon-sm {
  background: #34E0A1;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 900;
  color: #000;
  padding: 1px 4px;
}

.strw-card-text {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg);
  border-left: 3px solid rgba(var(--strw-accent-rgb), 0.35);
  border-radius: 0 8px 8px 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
  font-style: italic;
  position: relative;
}
.strw-card-text::before {
  content: '"';
  position: absolute;
  top: -6px; left: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: rgba(var(--strw-accent-rgb), 0.25);
  line-height: 1;
}
.strw-card-text p:last-child { margin-bottom: 0; }

/* ======== TITLE ======== */
.strw-widget-title h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px;
  text-align: center;
}

/* ======== SLIDER ======== */
.strw-layout-slider .strw-slider-outer {
  position: relative;
  overflow: hidden;
  padding: 4px 0 48px;
}
.strw-slider-track {
  display: flex;
  gap: 20px;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
.strw-slider-track .strw-card {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 280px;
}
.strw-sl-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 5;
  line-height: 1;
}
.strw-sl-prev { left: -20px; }
.strw-sl-next { right: -20px; }
.strw-sl-btn:hover {
  background: var(--strw-accent);
  border-color: var(--strw-accent);
  color: #fff;
}
.strw-sl-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}
.strw-sl-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.25s;
}
.strw-sl-dot.active {
  background: var(--strw-accent);
  width: 22px;
  border-radius: 4px;
}

/* ======== CTA BAR ======== */
.strw-cta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.strw-cta-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.strw-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.strw-cta-google {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  color: #3c4043;
}
.strw-cta-google:hover {
  background: #f8f9fa;
  border-color: #4285F4;
  box-shadow: 0 2px 10px rgba(66,133,244,0.2);
  color: #3c4043;
}
.strw-cta-ta {
  background: #34E0A1;
  border: 1.5px solid transparent;
  color: #000;
}
.strw-cta-ta:hover {
  background: #00AA6C;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,170,108,0.3);
}
.strw-ta-cta-logo {
  font-size: 10px;
  font-weight: 900;
  background: rgba(0,0,0,0.15);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ======== EMPTY STATE ======== */
.strw-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.strw-empty span { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.strw-empty p { margin: 0; font-size: 0.9rem; }
.strw-empty a { color: var(--strw-accent); }

/* ======== RESPONSIVE ======== */
@media (max-width: 860px) {
  .strw-layout-grid .strw-reviews-grid,
  .strw-layout-masonry .strw-reviews-grid {
    grid-template-columns: 1fr;
    columns: 1;
  }
  .strw-slider-track .strw-card { flex: 0 0 calc(50% - 10px); }
}
@media (max-width: 560px) {
  .strw-summaries { flex-direction: column; }
  .strw-slider-track .strw-card { flex: 0 0 88%; }
  .strw-cta-bar { flex-direction: column; align-items: flex-start; }
  .strw-sl-prev { left: 4px; }
  .strw-sl-next { right: 4px; }
}
