/* ==========================================================================
   LAPSERO - MEESHO STYLE REVIEWS & RATINGS SYSTEM
   Color Theme: Navy (#0e1b2c), Brand Orange (#f97316), Trust Green (#16a34a)
   ========================================================================== */

/* Product Card Rating Badge (Requirement 1) */
.card-rating-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}
.card-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #15803d;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
}
.card-rating-pill i {
  font-size: 9.5px;
}
.card-rating-count {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
}

/* Reviews Section in Product Details Page (PDP) */
.pdp-reviews-wrap {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1.5px solid #e2e8f0;
}
.pdp-reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.pdp-reviews-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0e1b2c;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdp-reviews-head h3 i {
  color: #f97316;
}
.rv-write-btn {
  background: #ffffff;
  color: #0e1b2c;
  border: 1.5px solid #0e1b2c;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}
.rv-write-btn:hover {
  background: #0e1b2c;
  color: #ffffff;
}

/* Meesho Style Rating Overview Box */
.rv-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .rv-summary-box {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
}
.rv-score-side {
  text-align: center;
  border-right: 1.5px solid #e2e8f0;
  padding-right: 16px;
}
@media (max-width: 640px) {
  .rv-score-side {
    border-right: none;
    border-bottom: 1.5px solid #e2e8f0;
    padding-right: 0;
    padding-bottom: 14px;
  }
}
.rv-big-score {
  font-size: 42px;
  font-weight: 900;
  color: #0e1b2c;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.rv-big-score i {
  color: #f59e0b;
  font-size: 32px;
}
.rv-big-stars {
  color: #f59e0b;
  font-size: 18px;
  margin: 6px 0 4px;
  letter-spacing: 2px;
}
.rv-total-text {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}
.rv-verified-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 8px;
}

/* Star Breakdown Progress Bars */
.rv-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}
.rv-bar-label {
  width: 32px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.rv-bar-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.rv-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.rv-bar-fill.bar-5 { background: #15803d; }
.rv-bar-fill.bar-4 { background: #22c55e; }
.rv-bar-fill.bar-3 { background: #84cc16; }
.rv-bar-fill.bar-2 { background: #f59e0b; }
.rv-bar-fill.bar-1 { background: #ef4444; }
.rv-bar-num {
  width: 34px;
  text-align: right;
  color: #64748b;
  font-size: 12px;
}

/* Review Form Container */
.rv-form-panel {
  background: #ffffff;
  border: 1.5px solid #16a34a;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(22, 163, 74, 0.08);
  animation: rvFadeIn 0.25s ease;
}
@keyframes rvFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.rv-form-title {
  font-size: 16px;
  font-weight: 800;
  color: #0e1b2c;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rv-form-title span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rv-form-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

/* Star Selection in Form */
.rv-star-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 16px;
}
.rv-star-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0 3px;
  transition: transform 0.15s, color 0.15s;
  line-height: 1;
}
.rv-star-btn:hover,
.rv-star-btn.active {
  color: #f59e0b;
  transform: scale(1.15);
}
.rv-star-tip {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
}

/* Form Fields */
.rv-field {
  margin-bottom: 14px;
}
.rv-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0e1b2c;
  margin-bottom: 5px;
}
.rv-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0e1b2c;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.rv-input:focus {
  border-color: #16a34a;
}
textarea.rv-input {
  min-height: 90px;
  resize: vertical;
}

/* Photo Upload Box */
.rv-file-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rv-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.rv-file-btn:hover {
  background: #e2e8f0;
}
.rv-img-preview-wrap {
  position: relative;
  display: none;
}
.rv-img-preview-wrap.show {
  display: inline-block;
}
.rv-img-preview-wrap img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid #16a34a;
}
.rv-img-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Submit Button */
.rv-submit-btn {
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.rv-submit-btn:hover {
  background: #15803d;
}
.rv-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Reviews List */
.rv-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.rv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.rv-card-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rv-user-avatar {
  width: 34px;
  height: 34px;
  background: #e2e8f0;
  color: #0e1b2c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13.5px;
}
.rv-user-name {
  font-size: 14px;
  font-weight: 800;
  color: #0e1b2c;
}
.rv-verified-tag {
  color: #16a34a;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}
.rv-card-date {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.rv-card-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f59e0b;
  font-size: 13px;
  margin-bottom: 8px;
}
.rv-card-rating-badge {
  background: #15803d;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 800;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.rv-card-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #334155;
  margin: 0 0 10px;
}
.rv-card-photo {
  margin-top: 10px;
}
.rv-card-photo img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s;
}
.rv-card-photo img:hover {
  transform: scale(1.05);
}

/* Empty Reviews State */
.rv-empty {
  text-align: center;
  padding: 30px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}
.rv-empty-icon {
  font-size: 32px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.rv-empty h4 {
  font-size: 15px;
  font-weight: 800;
  color: #0e1b2c;
  margin: 0 0 4px;
}
.rv-empty p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 14px;
}

/* Google Review Header Button */
.rv-google-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}
.rv-google-btn:hover {
  border-color: #4285f4;
  background: #f8fafc;
  color: #1a73e8;
}

/* Lightbox Modal for Review Photos */
.rv-photo-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.94);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
  animation: rvPhotoFadeIn 0.2s ease;
}
@keyframes rvPhotoFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.rv-photo-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-photo-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  background: #000;
}
.rv-photo-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.rv-photo-close:hover {
  background: #ef4444;
}

/* Google Review Prompt Modal After Submission */
.rv-google-prompt-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.72);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: rvPhotoFadeIn 0.2s ease;
}
.rv-google-prompt-box {
  background: #ffffff;
  color: #0e1b2c;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 22px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
.rv-gp-icon {
  font-size: 46px;
  margin-bottom: 10px;
}
.rv-google-prompt-box h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: #0e1b2c;
}
.rv-google-prompt-box p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}
.rv-gp-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 14px 0;
}
.rv-gp-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rv-gp-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #168447;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  transition: background 0.2s;
}
.rv-gp-google-btn:hover {
  background: #126b39;
}
.rv-gp-skip-btn {
  background: none;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.rv-gp-skip-btn:hover {
  background: #f1f5f9;
  color: #0e1b2c;
}
