/* ===== FLOATING REVIEWS WIDGET ===== */
/* Elfsight-style expandable review panel */

/* ── Floating Badge — HIDDEN ── */
/* Removed: was overlapping the mobile CTA "Text" button.
   The hero badge already opens the same panel. */
#rw-floating-badge {
  display: none !important;
}


/* ── Panel (expanded state) ── */
#rw-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 9999;
  width: 420px;
  max-width: 94vw;
  height: 75vh;
  max-height: 75vh;
  background: #f8fafc;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
  font-family: 'DM Sans', 'Plus Jakarta Sans', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  border-radius: 16px 16px 0 0;
  transform: translateX(-50%);
}
#rw-panel.rw-panel--closed {
  transform: translateX(-50%) translateY(100%);
  opacity: 0;
  pointer-events: none;
}
#rw-panel.rw-panel--open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Panel Header / Tabs */
.rw-panel-header {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  flex-shrink: 0;
}
.rw-tabs {
  display: flex;
  overflow-x: auto;
  flex: 1;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rw-tabs::-webkit-scrollbar { display: none; }

.rw-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0.9rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.rw-tab:hover {
  color: #1e293b;
}
.rw-tab--active {
  color: #111845;
  border-bottom-color: #111845;
}
.rw-panel-close {
  background: #f1f5f9;
  border: none;
  font-size: 1.6rem;
  color: #1e293b;
  cursor: pointer;
  padding: 0.85rem 1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.rw-panel-close:hover {
  color: #fff;
  background: #ef4444;
}

/* Panel Body */
.rw-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Summary Card */
.rw-summary {
  background: #fff;
  padding: 1.25rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}
.rw-summary-platform {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.rw-summary-title {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.rw-summary-score {
  font-size: 2rem;
  font-weight: 800;
  color: #111845;
  line-height: 1.2;
}
.rw-summary-stars {
  margin: 0.25rem 0;
}
.rw-summary-count {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}
.rw-write-btn {
  display: inline-block;
  background: #111845;
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1.5rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}
.rw-write-btn:hover {
  background: #1e293b;
}

/* Review Cards */
.rw-reviews-list {
  padding: 0.75rem;
}
.rw-review-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
}
.rw-review-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.rw-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.rw-review-meta {
  flex: 1;
  min-width: 0;
}
.rw-review-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #111845;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rw-review-date {
  font-size: 0.72rem;
  color: #64748b;
}
.rw-review-platform {
  flex-shrink: 0;
}
.rw-review-stars {
  margin-bottom: 0.4rem;
}
.rw-review-stars span {
  font-size: 0.85rem !important;
}
.rw-review-text {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #334155;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Review Photos */
.rw-review-photos {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.rw-review-photos::-webkit-scrollbar { display: none; }
.rw-review-photo {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e2e8f0;
}
.rw-review-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
  #rw-panel {
    width: 100vw;
    max-width: 100vw;
    height: 80vh;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
  }
  .rw-panel-close {
    font-size: 1.8rem;
    padding: 1rem 1.1rem;
  }
}
