/* ============================================================
   BrandVelocity — Review System Styles
   Minimalist Luxury + Antigravity Animations
   ============================================================ */

/* ===== REVIEW FORM SECTION ===== */
.review-form-section {
  background: linear-gradient(145deg, #F0F4FF 0%, #FAF0FF 60%, #FFF5F0 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.review-form-section::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,63,190,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.review-form-section::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,30,140,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.review-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 32px;
  padding: 56px 56px;
  border: 1px solid rgba(123,63,190,0.12);
  box-shadow: 0 32px 80px rgba(27,43,107,0.12), 0 0 0 1px rgba(255,255,255,0.6) inset;
  position: relative;
  z-index: 1;
}

.review-form-wrap .section-tag {
  margin-bottom: 12px;
}

.review-form-wrap h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 8px;
}

.review-form-wrap > p {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 40px;
}

/* ===== STAR RATING INPUT ===== */
.star-rating-group {
  margin-bottom: 28px;
}

.star-rating-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.star-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.star-input-row .star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  /* Default = unselected grey */
  color: #E2E8F0;
  /* Disable browser default :hover — JS paintStars() handles all state */
  transition: transform 0.15s ease;
  padding: 0;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* JS adds .active for committed selection */
.star-input-row .star-btn.active {
  color: #FFB800;
  transform: scale(1.15);
}

/* JS adds .hovered for mouse-over preview */
.star-input-row .star-btn.hovered {
  color: #FFD700;
  transform: scale(1.12);
}

.star-label-text {
  font-size: 0.85rem;
  color: var(--gray);
  margin-left: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

/* ===== FORM INPUTS ===== */
.review-field {
  margin-bottom: 24px;
}

.review-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.review-field input,
.review-field textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1.5px solid rgba(123,63,190,0.15);
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--dark);
  background: rgba(255,255,255,0.9);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  resize: none;
}

.review-field input:focus,
.review-field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(123,63,190,0.1);
  background: white;
}

.review-field input::placeholder,
.review-field textarea::placeholder {
  color: #A0AEC0;
}

.review-field textarea {
  min-height: 130px;
  line-height: 1.6;
}

/* ===== SUBMIT BUTTON ===== */
#submit-review-btn {
  width: 100%;
  justify-content: center;
  padding: 18px 32px;
  font-size: 1rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

#submit-review-btn.loading {
  opacity: 0.75;
  pointer-events: none;
}

#submit-review-btn.success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  box-shadow: 0 8px 30px rgba(34,197,94,0.4) !important;
}

/* ===== REVIEW FEED SECTION ===== */
.review-feed-section {
  padding: 100px 0;
  background: var(--white);
}

.review-feed-section .section-header {
  margin-bottom: 56px;
}

/* ===== FEED GRID ===== */
.review-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  min-height: 100px;
}

/* ===== SKELETON LOADING ===== */
.review-skeleton {
  background: white;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
  height: 14px;
  margin-bottom: 12px;
}

.skeleton-line.wide { width: 80%; }
.skeleton-line.medium { width: 55%; }
.skeleton-line.narrow { width: 35%; }
.skeleton-line.stars { width: 100px; height: 18px; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== DYNAMIC REVIEW CARD ===== */
.dynamic-review-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s cubic-bezier(0.4,0,0.2,1);

  /* Antigravity entrance animation */
  opacity: 0;
  transform: translateY(28px);
}

.dynamic-review-card.antigravity-in {
  animation: antigravity-float-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes antigravity-float-up {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.96);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.005);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dynamic-review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(123,63,190,0.15);
  border-color: rgba(123,63,190,0.2);
}

.dynamic-review-card::before {
  content: '"';
  position: absolute;
  top: 12px; right: 20px;
  font-size: 5rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  opacity: 0.1;
}

.drc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.drc-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.drc-meta { flex: 1; }
.drc-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 2px;
}

.drc-job {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 2px;
}

.drc-date {
  font-size: 0.78rem;
  color: var(--gray);
}

.drc-stars {
  color: #FFB800;
  font-size: 1rem;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.drc-comment {
  font-size: 0.93rem;
  color: var(--dark);
  line-height: 1.7;
  font-style: italic;
  margin: 0;
}

/* ===== EMPTY STATE ===== */
.review-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.review-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.review-empty-state p {
  font-size: 1rem;
  color: var(--gray);
}

/* ===== FORM ERROR / VALIDATION ===== */
.review-field input.error,
.review-field textarea.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.1);
}

.field-error-msg {
  display: block;
  font-size: 0.8rem;
  color: #EF4444;
  margin-top: 6px;
  font-weight: 600;
}

/* ===== NEW REVIEW BADGE ===== */
.review-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .review-form-wrap {
    padding: 36px 24px;
    border-radius: 24px;
  }

  .review-feed-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .review-form-wrap {
    padding: 28px 20px;
  }
}
