/* Plus2 Reviews — Landing Page + Badge Styles */

/* ── Reset & Base ── */
.p2r-body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f8f8f8;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Layout ── */
.p2r-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.p2r-header {
  text-align: center;
  margin-bottom: 24px;
}

.p2r-logo {
  height: 40px;
  width: auto;
}

.p2r-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
}

/* ── Card ── */
.p2r-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: center;
  flex: 1;
}

.p2r-card h1 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: #1a1a1a;
}

/* ── Icons ── */
.p2r-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.p2r-icon-check {
  background: #dcfce7;
  color: #16a34a;
}

.p2r-icon-error {
  background: #fef2f2;
  color: #dc2626;
}

/* ── Product ── */
.p2r-product {
  margin: 20px 0 24px;
}

.p2r-product-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.p2r-product-name {
  font-size: 0.95rem;
  color: #444;
  margin: 10px 0 0;
}

/* ── Stars ── */
.p2r-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 24px;
}

.p2r-star {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #d4d4d4;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.p2r-star:hover,
.p2r-star:focus {
  transform: scale(1.15);
}

.p2r-star.active {
  color: #B7995B;
}

/* ── Form ── */
.p2r-form {
  text-align: left;
}

.p2r-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.p2r-optional {
  font-weight: 400;
  color: #9ca3af;
}

.p2r-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.p2r-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Buttons ── */
.p2r-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.p2r-btn-primary {
  background: #1a1a1a;
  color: #fff;
  width: 100%;
  margin-top: 16px;
}

.p2r-btn-primary:hover {
  background: #333;
}

.p2r-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  margin-top: 20px;
}

.p2r-btn-secondary:hover {
  background: #e5e7eb;
}

/* ── Message ── */
.p2r-message {
  font-size: 1rem;
  color: #6b7280;
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ── Footer ── */
.p2r-footer {
  text-align: center;
  margin-top: 24px;
  padding: 16px 0;
}

.p2r-footer p {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
}

/* ── Verified Notice (product page) ── */
.p2r-verified-notice {
  font-style: italic;
}

/* ── Verified Buyer Badge (product reviews) ── */
.p2r-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  line-height: 1.4;
  white-space: nowrap;
}

/* ── Review Summary ── */
.p2r-summary {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 20px 0 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.p2r-summary-left {
  text-align: center;
  min-width: 100px;
}

.p2r-summary-avg {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
}

.p2r-summary-stars {
  margin: 4px 0;
}

.p2r-summary-count {
  font-size: 0.85rem;
  color: #6b7280;
}

.p2r-summary-right {
  flex: 1;
  max-width: 300px;
}

.p2r-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: #6b7280;
}

.p2r-bar-label {
  width: 30px;
  text-align: right;
  white-space: nowrap;
}

.p2r-bar-track {
  flex: 1;
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}

.p2r-bar-fill {
  height: 100%;
  background: #B7995B;
  border-radius: 4px;
}

.p2r-bar-count {
  width: 24px;
  text-align: right;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .p2r-container {
    padding: 16px 12px;
  }

  .p2r-card {
    padding: 24px 16px;
    border-radius: 8px;
  }

  .p2r-star {
    font-size: 2.25rem;
    padding: 6px;
  }

  .p2r-product-img {
    width: 100px;
    height: 100px;
  }
}
