/**
 * NoPainStore Customer Reviews - Frontend Stylesheet
 * Replicates the clean, modern 3-column light/dark card layout.
 */

.nps-reviews-showcase-wrap,
.nps-all-reviews-container,
.nps-review-form-card {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: #0d0d0d !important;
  box-sizing: border-box !important;
  width: 100% !important;
  display: block !important;
}

.nps-reviews-showcase-wrap *,
.nps-all-reviews-container *,
.nps-review-form-card * {
  box-sizing: border-box !important;
}

/* -------------------------------------------------------------
 * 1. MASONRY REVIEWS GRID (Screenshot Replication)
 * ------------------------------------------------------------- */
.nps-reviews-grid {
  display: block !important;
  width: 100% !important;
  column-count: 3;
  column-gap: 20px;
  margin: 0 auto !important;
}

.nps-cols-1 { column-count: 1 !important; }
.nps-cols-2 { column-count: 2 !important; }
.nps-cols-3 { column-count: 3 !important; }
.nps-cols-4 { column-count: 4 !important; }

@media (max-width: 1023px) {
  .nps-reviews-grid {
    column-count: 2 !important;
    column-gap: 16px !important;
  }
}

@media (max-width: 640px) {
  .nps-reviews-grid {
    column-count: 1 !important;
  }
}

/* -------------------------------------------------------------
 * 2. REVIEW CARDS (Light & Dark Variants)
 * ------------------------------------------------------------- */
.nps-card {
  break-inside: avoid-column !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 16px !important;
  padding: 24px !important;
  margin-bottom: 20px !important;
  position: relative !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
}

.nps-card:hover {
  transform: translateY(-2px) !important;
}

/* Light Card */
.nps-card-light {
  background-color: #ffffff !important;
  border: 1px solid #e3e3e0 !important;
  color: #0d0d0d !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.nps-card-light:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04) !important;
}

/* Dark Card (Standout Black Accent) */
.nps-card-dark {
  background-color: #0d0d0d !important;
  border: 1px solid #0d0d0d !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

.nps-card-dark:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16) !important;
}

/* Card Top: Stars + Verified Badge */
.nps-card-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 14px !important;
}

.nps-card-stars {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.nps-star {
  width: 14px !important;
  height: 14px !important;
  display: inline-block !important;
}

.nps-star-filled {
  color: #f59e0b !important; /* Warm Amber */
}

.nps-star-empty {
  color: #d4d4d0 !important;
}

.nps-card-dark .nps-star-empty {
  color: #333333 !important;
}

.nps-verified-badge {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}

.nps-card-light .nps-verified-badge {
  color: #1f7a3f !important; /* Deep Green */
}

.nps-card-dark .nps-verified-badge {
  color: #22c55e !important; /* Crisp Emerald Green */
}

/* Review Photo (Strictly Contained Aspect Ratio) */
.nps-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 11;
  max-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  margin: 10px 0 14px 0;
  background-color: #f4f4f2;
}

.nps-card-dark .nps-card-img-wrap {
  background-color: #1a1a1a;
}

.nps-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Review Title & Body */
.nps-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px 0;
  letter-spacing: -0.015em;
}

.nps-card-light .nps-card-title {
  color: #0d0d0d;
}

.nps-card-dark .nps-card-title {
  color: #ffffff;
}

.nps-card-quote {
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 16px 0;
}

.nps-card-quote p {
  margin: 0;
}

.nps-card-light .nps-card-quote {
  color: #5c5c58;
}

.nps-card-dark .nps-card-quote {
  color: rgba(255, 255, 255, 0.72);
}

/* Card Footer: Avatar Circle & Metadata */
.nps-card-footer {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: auto !important;
  padding-top: 4px !important;
}

.nps-card-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.nps-card-light .nps-card-avatar {
  background-color: #f4f4f2 !important;
  color: #0d0d0d !important;
  border: 1px solid #e3e3e0 !important;
}

.nps-card-dark .nps-card-avatar {
  background-color: #262626 !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
}

.nps-card-meta {
  font-size: 12.5px !important;
  line-height: 1.35 !important;
}

.nps-card-author {
  font-weight: 600 !important;
}

.nps-card-light .nps-card-author strong {
  color: #0d0d0d !important;
}

.nps-card-dark .nps-card-author strong {
  color: #ffffff !important;
}

.nps-card-city {
  font-weight: 400 !important;
}

.nps-card-light .nps-card-city {
  color: #6b6b6b !important;
}

.nps-card-dark .nps-card-city {
  color: rgba(255, 255, 255, 0.6) !important;
}

.nps-card-submeta {
  font-size: 11.5px !important;
}

.nps-card-light .nps-card-submeta {
  color: #6b6b6b !important;
}

.nps-card-dark .nps-card-submeta {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* -------------------------------------------------------------
 * 3. "SEE ALL" BUTTON ROUTING
 * ------------------------------------------------------------- */
.nps-see-all-wrap {
  text-align: center;
  margin-top: 36px;
}

.nps-see-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  border-radius: 999px;
  border: 1.5px solid #0d0d0d;
  background-color: #ffffff;
  color: #0d0d0d;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nps-see-all-btn:hover {
  background-color: #0d0d0d;
  color: #ffffff;
  border-color: #0d0d0d;
}

/* -------------------------------------------------------------
 * 4. PRODUCT RATINGS SUMMARY BAR (Replicates Screenshot)
 * ------------------------------------------------------------- */
.nps-all-reviews-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
}

.nps-ratings-bar-card {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 48px !important;
  align-items: center !important;
  background-color: #ffffff !important;
  border: 1px solid #e3e3e0 !important;
  border-radius: 18px !important;
  padding: 32px 40px !important;
  margin: 0 auto 36px auto !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.nps-rating-score-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.nps-rating-big-num {
  font-size: 48px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  color: #0d0d0d !important;
  letter-spacing: -0.025em !important;
  margin: 0 0 6px 0 !important;
}

.nps-rating-big-stars {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-bottom: 8px !important;
}

.nps-rating-big-stars .nps-star {
  width: 22px !important;
  height: 22px !important;
  display: inline-block !important;
}

.nps-rating-based-on {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #6b6b6b !important;
  line-height: 1.35 !important;
}

.nps-rating-bars-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

.nps-bar-row {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
}

.nps-bar-label {
  width: 105px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #0d0d0d !important;
  flex-shrink: 0 !important;
}

.nps-bar-track {
  flex: 1 !important;
  height: 8px !important;
  background-color: #e8e8e6 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
}

.nps-bar-fill {
  height: 100% !important;
  background-color: #0d0d0d !important;
  border-radius: 999px !important;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nps-bar-pct {
  width: 38px !important;
  text-align: right !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #6b6b6b !important;
  flex-shrink: 0 !important;
}

@media (max-width: 767px) {
  .nps-ratings-bar-card {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 24px 20px !important;
  }
  .nps-rating-big-num {
    font-size: 40px !important;
  }
  .nps-bar-label {
    width: 90px !important;
    font-size: 12.5px !important;
  }
  .nps-bar-row {
    gap: 10px !important;
  }
}

.nps-pagination {
  text-align: center;
  margin-top: 36px;
}

.nps-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  margin: 0 4px;
  border-radius: 8px;
  border: 1px solid #e3e3e0;
  background: #ffffff;
  color: #0d0d0d;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.nps-pagination .page-numbers.current,
.nps-pagination .page-numbers:hover {
  background: #0d0d0d;
  color: #ffffff;
  border-color: #0d0d0d;
}

/* -------------------------------------------------------------
 * 5. FRONTEND SUBMISSION FORM WIDGET (Expanded Desktop Layout)
 * ------------------------------------------------------------- */
.nps-review-form-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  border: 1px solid #e3e3e0 !important;
  border-radius: 20px !important;
  padding: 36px 40px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
  box-sizing: border-box !important;
}

.nps-form-header {
  margin-bottom: 24px !important;
  border-bottom: 1px solid #f0f0ed !important;
  padding-bottom: 16px !important;
}

.nps-form-header h3 {
  font-size: 24px !important;
  font-weight: 700 !important;
  margin: 0 0 6px 0 !important;
  color: #0d0d0d !important;
  letter-spacing: -0.02em !important;
}

.nps-form-header p {
  font-size: 14.5px !important;
  color: #6b6b6b !important;
  margin: 0 !important;
}

.nps-form-grid-layout {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr !important;
  gap: 36px !important;
  align-items: start !important;
  width: 100% !important;
}

.nps-form-col-main,
.nps-form-col-side {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.nps-form-group {
  margin-bottom: 18px !important;
  width: 100% !important;
}

.nps-form-label {
  display: block !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #0d0d0d !important;
  margin-bottom: 7px !important;
}

.nps-input,
.nps-textarea {
  width: 100% !important;
  border: 1px solid #d4d4d0 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  color: #0d0d0d !important;
  background: #ffffff !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease !important;
  box-sizing: border-box !important;
}

.nps-input:focus,
.nps-textarea:focus {
  border-color: #0d0d0d !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(13, 13, 13, 0.08) !important;
}

.nps-textarea {
  resize: vertical !important;
  min-height: 110px !important;
}

.nps-input-hint {
  display: block !important;
  font-size: 11.5px !important;
  color: #8c8c88 !important;
  margin-top: 4px !important;
}

/* Interactive Star Rating Picker (Strict Reset to Prevent Theme Button Pill Styling) */
.nps-star-picker {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 0 !important;
}

.nps-star-picker .nps-star-btn,
button.nps-star-btn,
span.nps-star-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 2px !important;
  margin: 0 !important;
  cursor: pointer !important;
  color: #d4d4d0 !important;
  outline: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  line-height: 1 !important;
  transition: transform 0.15s ease, color 0.15s ease !important;
}

.nps-star-picker .nps-star-btn:hover,
.nps-star-picker .nps-star-btn.active,
.nps-star-picker .nps-star-btn.hover,
button.nps-star-btn:hover,
button.nps-star-btn.active,
span.nps-star-btn:hover,
span.nps-star-btn.active {
  color: #f59e0b !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: scale(1.15) !important;
}

.nps-star-picker .nps-star-icon {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
}

.nps-star-label {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #5c5c58 !important;
  margin-left: 10px !important;
}

/* Trust Box */
.nps-trust-box {
  background-color: #f7f9f7 !important;
  border: 1px solid #dcfce7 !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  margin: 4px 0 18px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.nps-trust-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #166534 !important;
}

/* Drag-and-drop Image Upload Box */
.nps-file-dropzone {
  position: relative !important;
  border: 2px dashed #d4d4d0 !important;
  border-radius: 12px !important;
  padding: 18px !important;
  text-align: center !important;
  background: #f9f9f8 !important;
  cursor: pointer !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
  box-sizing: border-box !important;
}

.nps-file-dropzone.dragover,
.nps-file-dropzone:hover {
  border-color: #0d0d0d !important;
  background: #f4f4f2 !important;
}

.nps-file-input {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.nps-dropzone-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  pointer-events: none !important;
}

.nps-upload-icon {
  width: 26px !important;
  height: 26px !important;
  color: #6b6b6b !important;
  margin-bottom: 6px !important;
}

.nps-dropzone-text {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #0d0d0d !important;
}

.nps-dropzone-sub {
  font-size: 11.5px !important;
  color: #8c8c88 !important;
  margin-top: 2px !important;
}

.nps-file-preview {
  position: relative !important;
  display: inline-block !important;
  margin-top: 10px !important;
}

.nps-file-preview img {
  max-width: 120px !important;
  max-height: 90px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  border: 1px solid #e3e3e0 !important;
  display: block !important;
}

.nps-remove-file-btn {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #0d0d0d !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 14px !important;
  line-height: 20px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* Feedback Box */
.nps-form-feedback {
  padding: 14px 18px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin-bottom: 18px !important;
  box-sizing: border-box !important;
}

.nps-form-feedback.success {
  background-color: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
}

.nps-form-feedback.error {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

/* Submit Button */
.nps-submit-btn {
  width: 100% !important;
  min-height: 48px !important;
  background-color: #0d0d0d !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease, transform 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-sizing: border-box !important;
}

.nps-submit-btn:hover {
  opacity: 0.92 !important;
  transform: translateY(-1px) !important;
}

.nps-submit-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.nps-btn-spinner {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-top-color: #ffffff !important;
  border-radius: 50% !important;
  animation: npsSpin 0.6s linear infinite !important;
}

@keyframes npsSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 859px) {
  .nps-form-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .nps-review-form-card {
    padding: 24px 20px !important;
  }
}
