/* ============================================================
   AI Review Assistant — Customer Review Page (review.css)
   ============================================================ */

/* ---------- Page Layout ---------- */
.review-page {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 60px;
}

/* ---------- Business Header ---------- */
.business-header {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  color: #fff;
  padding: 40px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.business-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.business-logo-wrap {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255,255,255,0.4);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.business-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.business-logo-initial {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
}
.business-header h1 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.business-header .biz-category {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.business-header .biz-address {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.business-header .tagline {
  margin-top: 16px;
  font-size: 1rem;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ---------- Steps Progress ---------- */
.steps-container {
  max-width: 560px;
  margin: -28px auto 0;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}
.steps-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-item.done:not(:last-child)::after { background: var(--primary); }
.step-bubble {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}
.step-item.active .step-bubble {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(108,99,255,.2);
  animation: pulse-glow 2s infinite;
}
.step-item.done .step-bubble {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--primary); }
.step-item.done .step-label { color: var(--success); }

/* ---------- Review Step Card ---------- */
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.4s ease;
  display: none;
}
.step-card.active { display: block; }

.step-card h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.step-card .step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ---------- Highlights Grid ---------- */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.highlight-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--transition);
  user-select: none;
}
.highlight-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.highlight-chip.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.highlight-chip input[type="checkbox"] { display: none; }
.highlight-chip .chip-icon { font-size: 0.9rem; }

/* ---------- Star Rating ---------- */
.star-rating-group { margin-bottom: 8px; }
.star-rating-label { font-size: 0.875rem; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.stars-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.star-btn {
  font-size: 2rem;
  cursor: pointer;
  color: var(--border);
  transition: all 0.15s ease;
  background: none;
  border: none;
  padding: 2px;
  line-height: 1;
  -webkit-text-stroke: 1px #d1d5db;
}
.star-btn:hover, .star-btn.hovered { color: #F59E0B; -webkit-text-stroke: 0; transform: scale(1.15); }
.star-btn.selected { color: #F59E0B; -webkit-text-stroke: 0; }
.star-hint { font-size: 0.8rem; color: var(--text-muted); min-height: 20px; transition: all var(--transition); }

/* ---------- AI Generate Button ---------- */
.generate-btn-wrap {
  position: relative;
  margin-top: 8px;
}
.generate-btn-wrap .btn {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  box-shadow: 0 6px 24px rgba(108,99,255,.4);
  border: none;
  font-size: 1rem;
}
.generate-btn-wrap .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(108,99,255,.5);
}
.generate-btn-wrap .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.ai-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Generated Review ---------- */
.review-output {
  background: var(--surface-2);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
  display: none;
  animation: fadeInUp 0.4s ease;
}
.review-output .output-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-output textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  min-height: 140px;
  outline: none;
}
.review-char-count {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 6px;
}
.regenerate-link {
  font-size: 0.82rem;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}
.regenerate-link:hover { text-decoration: underline; }

/* ---------- Copy & Redirect Step ---------- */
.copy-step-card { text-align: center; }
.copy-step-card .big-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
}
.copy-step-card h2 { margin-bottom: 8px; }
.instructions-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 20px 0;
  text-align: left;
}
.instructions-box ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.instructions-box li { font-size: 0.88rem; color: var(--text-muted); }
.instructions-box li strong { color: var(--text); }

/* ---------- Confirmation Banner ---------- */
.confirmation-banner {
  display: none;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 0.88rem;
  color: #065f46;
  animation: fadeInUp 0.4s ease;
}
.confirmation-banner.show { display: flex; align-items: flex-start; gap: 10px; }
[data-theme="dark"] .confirmation-banner {
  background: rgba(16,185,129,.15);
  border-color: rgba(16,185,129,.3);
  color: #6ee7b7;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .steps-container { padding: 0 12px; }
  .step-card { padding: 24px 18px; }
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .step-label { display: none; }
  .steps-progress { padding: 14px 16px; }
  .business-header { padding: 32px 16px 48px; }
}
