/* ── ReviewFlow Pro — Frontend Styles ─────────────────────────────────────── */
:root {
  --rf-primary: #2563eb;
  --rf-primary-dark: #1d4ed8;
  --rf-success: #16a34a;
  --rf-danger: #dc2626;
  --rf-star: #f59e0b;
  --rf-star-empty: #d1d5db;
  --rf-bg: #ffffff;
  --rf-card-bg: #ffffff;
  --rf-border: #e5e7eb;
  --rf-text: #374151;
  --rf-meta: #6b7280;
  --rf-heading: #111827;
  --rf-radius: 12px;
  --rf-shadow: 0 4px 24px rgba(0,0,0,.10);
}

/* ── Stars ───────────────────────────────────────────────────────────────── */
.rf-stars { display: inline-flex; gap: 2px; }
.rf-star--full, .rf-star--half { color: var(--rf-star); }
.rf-star--empty { color: var(--rf-star-empty); }

/* ── Funnel Widget ───────────────────────────────────────────────────────── */
.rf-funnel-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--rf-radius);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.rf-funnel-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,.25); }
.rf-funnel-card { background: var(--rf-card-bg); border: 1px solid var(--rf-border); border-radius: var(--rf-radius); padding: 36px 32px; max-width: 540px; margin: 0 auto; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.rf-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); animation: rfFadeIn .2s ease; }
.rf-modal-overlay[hidden] { display: none; }
@keyframes rfFadeIn { from { opacity: 0; } to { opacity: 1; } }
.rf-modal { background: var(--rf-bg); border-radius: 18px; padding: 0; max-width: 520px; width: 100%; box-shadow: var(--rf-shadow); position: relative; animation: rfSlideUp .25s ease; max-height: 90vh; overflow-y: auto; }
@keyframes rfSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.rf-modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--rf-border); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--rf-meta); z-index: 1; transition: background .15s; }
.rf-modal-close:hover { background: #d1d5db; }
.rf-modal-body { padding: 36px 32px; }

/* ── Funnel Steps ─────────────────────────────────────────────────────────── */
.rf-step { display: none; }
.rf-step--active { display: block; animation: rfFadeIn .2s ease; }

.rf-funnel-header { text-align: center; margin-bottom: 28px; }
.rf-funnel-title { font-size: 22px; font-weight: 700; color: var(--rf-heading); margin: 0 0 8px; }
.rf-funnel-subtitle { color: var(--rf-meta); margin: 0; font-size: 14px; }

/* Star Selector */
.rf-star-selector { display: flex; justify-content: center; gap: 8px; margin: 0 0 12px; }
.rf-star-btn { background: none; border: none; cursor: pointer; font-size: 42px; color: var(--rf-star-empty); padding: 4px; line-height: 1; transition: color .15s, transform .15s; }
.rf-star-btn--active, .rf-star-btn:hover { color: var(--rf-star); transform: scale(1.12); }
.rf-star-hint { text-align: center; color: var(--rf-meta); font-size: 13px; margin: 0; }

/* Selected stars display */
.rf-selected-stars { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 22px; }
.rf-sd-star { color: var(--rf-star-empty); }
.rf-sd-star--on { color: var(--rf-star); }
.rf-rating-text { font-size: 14px; color: var(--rf-meta); font-weight: 600; }

/* Prompt + Textarea */
.rf-step-prompt { color: var(--rf-text); font-size: 15px; line-height: 1.6; margin: 0 0 14px; font-weight: 500; }
.rf-review-textarea { width: 100%; border: 1.5px solid var(--rf-border); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--rf-text); resize: vertical; font-family: inherit; line-height: 1.6; transition: border-color .2s; box-sizing: border-box; }
.rf-review-textarea:focus { outline: none; border-color: var(--rf-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.rf-char-count { text-align: right; font-size: 12px; color: var(--rf-meta); margin: 4px 0 16px; }
.rf-form-group { margin-bottom: 10px; }

/* Buttons */
.rf-btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: all .18s; }
.rf-btn--primary { background: var(--rf-primary); color: #fff; border-color: var(--rf-primary); }
.rf-btn--primary:hover { background: var(--rf-primary-dark); border-color: var(--rf-primary-dark); }
.rf-btn--ghost { background: transparent; color: var(--rf-meta); border-color: var(--rf-border); }
.rf-btn--ghost:hover { border-color: #9ca3af; color: var(--rf-text); }
.rf-btn--outline { background: transparent; color: var(--rf-primary); border-color: var(--rf-primary); }
.rf-btn--outline:hover { background: var(--rf-primary); color: #fff; }
.rf-btn--google { background: #4285F4; color: #fff; border-color: #4285F4; width: 100%; justify-content: center; font-size: 15px; padding: 14px 22px; margin-top: 16px; }
.rf-btn--google:hover { background: #3367d6; border-color: #3367d6; }
.rf-funnel-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* Thank you screens */
.rf-thankyou-icon { font-size: 48px; text-align: center; margin-bottom: 12px; }
.rf-thankyou-title { text-align: center; font-size: 20px; font-weight: 700; color: var(--rf-heading); margin: 0 0 12px; }
.rf-thankyou-text { text-align: center; color: var(--rf-text); line-height: 1.6; }
.rf-thankyou-badge { text-align: center; background: #f0fdf4; color: #16a34a; border-radius: 8px; padding: 10px 16px; font-size: 13px; margin-top: 16px; }

/* Copy Box */
.rf-copy-instruction p { font-size: 14px; color: var(--rf-text); line-height: 1.6; margin-bottom: 12px; }
.rf-review-copy-box { background: #f8fafc; border: 1.5px solid var(--rf-border); border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; position: relative; }
.rf-review-copy-box__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--rf-meta); font-weight: 700; margin: 0 0 6px; }
.rf-review-copy-box__text { font-size: 14px; color: var(--rf-text); line-height: 1.6; max-height: 120px; overflow-y: auto; }
.rf-copy-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 6px 12px; border: 1px solid var(--rf-border); border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; color: var(--rf-text); transition: all .15s; }
.rf-copy-btn:hover { border-color: var(--rf-primary); color: var(--rf-primary); }

/* Step-by-step instructions */
.rf-step-instructions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.rf-instruction-step { display: flex; align-items: flex-start; gap: 12px; font-size: 13.5px; color: var(--rf-text); line-height: 1.5; }
.rf-instruction-num { flex-shrink: 0; width: 24px; height: 24px; background: var(--rf-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.rf-done-confirm { text-align: center; margin-top: 14px; font-size: 13px; }
.rf-done-link { color: var(--rf-meta); }

/* Form helpers */
.rf-input { width: 100%; padding: 10px 13px; border: 1.5px solid var(--rf-border); border-radius: 8px; font-size: 14px; color: var(--rf-text); font-family: inherit; box-sizing: border-box; }
.rf-input:focus { outline: none; border-color: var(--rf-primary); }
.rf-checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--rf-meta); cursor: pointer; line-height: 1.5; }
.rf-privacy-note { font-size: 12px; color: var(--rf-meta); margin-top: 12px; text-align: center; }
.rf-field-error { color: var(--rf-danger); font-size: 12px; display: block; margin-top: 4px; }

/* ── Reviews Display ─────────────────────────────────────────────────────── */
.rf-overall-rating { display: flex; align-items: center; gap: 20px; background: var(--rf-card-bg); border: 1px solid var(--rf-border); border-radius: var(--rf-radius); padding: 20px 28px; margin-bottom: 24px; }
.rf-overall-rating__score { font-size: 52px; font-weight: 900; color: var(--rf-heading); line-height: 1; }
.rf-overall-rating__right { display: flex; flex-direction: column; gap: 4px; }
.rf-overall-rating__count { font-size: 13px; color: var(--rf-meta); }

.rf-reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.rf-review-card { background: var(--rf-card-bg); border: 1px solid var(--rf-border); border-radius: var(--rf-radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .2s; }
.rf-review-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.rf-review-card__header { display: flex; align-items: center; gap: 10px; }
.rf-reviewer-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rf-reviewer-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--rf-primary), #7c3aed); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rf-reviewer-info { flex: 1; min-width: 0; }
.rf-reviewer-name { font-weight: 600; font-size: 14px; color: var(--rf-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-review-date { font-size: 12px; color: var(--rf-meta); }
.rf-review-google-icon { margin-left: auto; flex-shrink: 0; }
.rf-review-card__stars .rf-star { font-size: 16px; }
.rf-review-text { font-size: 13.5px; color: var(--rf-text); line-height: 1.65; margin: 0; }
.rf-read-more-btn { background: none; border: none; color: var(--rf-primary); font-size: 13px; cursor: pointer; padding: 0; font-weight: 600; }
.rf-reviews-footer { margin-top: 24px; text-align: center; }

/* List layout */
.rf-reviews-list { display: flex; flex-direction: column; gap: 20px; }
.rf-review-list-item { display: flex; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--rf-border); }
.rf-review-list-item:last-child { border-bottom: 0; }
.rf-review-list-item__left { flex-shrink: 0; }
.rf-review-list-item__body { flex: 1; min-width: 0; }
.rf-review-list-item__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }

/* Carousel */
.rf-carousel { position: relative; overflow: hidden; }
.rf-carousel__track { display: flex; transition: transform .4s ease; }
.rf-carousel__slide { flex: 0 0 100%; padding: 4px; box-sizing: border-box; }
.rf-carousel__controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.rf-carousel__btn { background: var(--rf-card-bg); border: 1.5px solid var(--rf-border); border-radius: 50%; width: 36px; height: 36px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--rf-text); transition: all .15s; }
.rf-carousel__btn:hover { background: var(--rf-primary); border-color: var(--rf-primary); color: #fff; }
.rf-carousel__dots { display: flex; gap: 6px; }
.rf-carousel__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rf-border); border: none; cursor: pointer; padding: 0; transition: background .15s; }
.rf-carousel__dot--active { background: var(--rf-primary); width: 20px; border-radius: 4px; }

/* ── Rating Badge ────────────────────────────────────────────────────────── */
.rf-badge { display: inline-flex; align-items: center; gap: 14px; background: var(--rf-card-bg); border: 1.5px solid var(--rf-border); border-radius: 10px; padding: 14px 20px; }
.rf-badge__logo { display: flex; align-items: center; }
.rf-badge__name { font-size: 13px; font-weight: 700; color: var(--rf-heading); margin-bottom: 3px; }
.rf-badge__stars { display: flex; align-items: center; gap: 4px; }
.rf-badge__rating { font-size: 15px; font-weight: 700; color: var(--rf-heading); }
.rf-badge__count { font-size: 12px; color: var(--rf-meta); margin-top: 2px; }

/* ── Float Button ────────────────────────────────────────────────────────── */
.rf-float-btn { position: fixed; bottom: 28px; z-index: 9998; padding: 12px 22px; border-radius: 40px; background: var(--rf-primary); color: #fff; border: none; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 20px rgba(37,99,235,.35); transition: transform .18s, box-shadow .18s; }
.rf-float-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(37,99,235,.4); }
.rf-float-btn.rf-float--right { right: 28px; }
.rf-float-btn.rf-float--left  { left: 28px; }

/* ── Display Errors / Empty ──────────────────────────────────────────────── */
.rf-display-error, .rf-display-empty { padding: 24px; text-align: center; color: var(--rf-meta); border: 1px dashed var(--rf-border); border-radius: 8px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .rf-modal-body { padding: 24px 20px; }
  .rf-funnel-card { padding: 24px 18px; }
  .rf-star-btn { font-size: 34px; }
  .rf-reviews-grid { grid-template-columns: 1fr; }
  .rf-overall-rating { flex-direction: column; text-align: center; gap: 10px; }
  .rf-float-btn { bottom: 16px; right: 16px; padding: 10px 16px; font-size: 14px; }
  .rf-float-btn.rf-float--left { left: 16px; right: auto; }
}

/* ── Suggestion Chips ────────────────────────────────────────────────────── */
.rf-suggestions { margin: 12px 0 14px; }
.rf-suggestions__label { font-size: 12px; color: var(--rf-meta); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.rf-suggestion-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rf-suggestion-chip { padding: 7px 13px; border-radius: 20px; border: 1.5px solid var(--rf-border); background: #fff; font-size: 12.5px; color: var(--rf-text); cursor: pointer; transition: all .15s; line-height: 1.3; text-align: left; }
.rf-suggestion-chip:hover { border-color: var(--rf-primary); color: var(--rf-primary); background: #eff6ff; }
.rf-suggestion-chip.rf-chip--active { background: var(--rf-primary); border-color: var(--rf-primary); color: #fff; }

/* ── Name/email row ──────────────────────────────────────────────────────── */
.rf-name-email-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
@media (max-width: 500px) { .rf-name-email-row { grid-template-columns: 1fr; } }

/* ── Skip writing ────────────────────────────────────────────────────────── */
.rf-skip-wrap { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.rf-skip-divider { font-size: 12px; color: var(--rf-meta); flex-shrink: 0; }
.rf-skip-btn { background: none; border: none; font-size: 13px; color: var(--rf-primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; font-weight: 600; }
.rf-skip-btn:hover { color: var(--rf-primary-dark); }

/* ── Copy box header ─────────────────────────────────────────────────────── */
.rf-review-copy-box__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rf-review-copy-box__label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--rf-meta); font-weight: 700; }

/* ── Public Review Wall ──────────────────────────────────────────────────── */
.rf-wall-wrap { padding: 40px 0; }
.rf-wall-title { font-size: 26px; font-weight: 800; color: var(--rf-heading); text-align: center; margin: 0 0 8px; }
.rf-wall-subtitle { text-align: center; color: var(--rf-meta); font-size: 14px; margin: 0 0 32px; }
.rf-wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.rf-wall-card { background: var(--rf-card-bg); border: 1px solid var(--rf-border); border-radius: var(--rf-radius); padding: 22px; }
.rf-wall-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rf-wall-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rf-wall-name { font-weight: 700; font-size: 14px; color: var(--rf-heading); }
.rf-wall-date { font-size: 12px; color: var(--rf-meta); margin-top: 2px; }
.rf-wall-card__stars { margin-bottom: 10px; }
.rf-wall-card__stars .rf-star { font-size: 16px; }
.rf-wall-text { font-size: 14px; color: var(--rf-text); line-height: 1.65; margin: 0; }
.rf-wall-empty { text-align: center; padding: 40px; color: var(--rf-meta); border: 1px dashed var(--rf-border); border-radius: 10px; }
