/* ODR Combined Reviews — frontend */

.odr-cr-wrapper {
  --odr-cr-primary: #f97316;
  --odr-cr-text: #1f2937;
  --odr-cr-muted: #6b7280;
  --odr-cr-border: #e5e7eb;
  --odr-cr-bg: #ffffff;
  --odr-cr-bg-soft: #f9fafb;
  --odr-cr-radius: 10px;

  font-family: inherit;
  color: var(--odr-cr-text);
  margin: 32px 0;
  background: var(--odr-cr-bg);
  border: 1px solid var(--odr-cr-border);
  border-radius: var(--odr-cr-radius);
  padding: 24px;
}

.odr-cr-wrapper * {
  box-sizing: border-box;
}

.odr-cr-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--odr-cr-border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.odr-cr-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.odr-cr-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--odr-cr-muted);
}

.odr-cr-avg {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--odr-cr-text);
}

.odr-cr-summary-empty {
  color: var(--odr-cr-muted);
}

/* Stars (display) */
.odr-cr-stars {
  display: inline-block;
  position: relative;
  width: 6em;
  font-size: 1rem;
  line-height: 1;
  color: #d1d5db;
  letter-spacing: 2px;
}
.odr-cr-stars::before {
  content: "★★★★★";
}
.odr-cr-stars-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--odr-cr-primary);
  white-space: nowrap;
}
.odr-cr-stars-fill::before {
  content: "★★★★★";
}

/* List */
.odr-cr-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.odr-cr-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--odr-cr-border);
}
.odr-cr-item:last-child {
  border-bottom: none;
}

.odr-cr-item-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.odr-cr-item-head img.avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.odr-cr-item-meta {
  flex: 1;
  min-width: 0;
}

.odr-cr-author {
  font-weight: 600;
  color: var(--odr-cr-text);
}

.odr-cr-verified {
  display: inline-block;
  margin-left: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
}

.odr-cr-date {
  font-size: 0.82rem;
  color: var(--odr-cr-muted);
  margin-top: 2px;
}

.odr-cr-product em {
  font-style: normal;
  color: var(--odr-cr-text);
  font-weight: 500;
}

.odr-cr-item-rating {
  flex-shrink: 0;
}

.odr-cr-item-body {
  color: var(--odr-cr-text);
  line-height: 1.7;
  font-size: 0.95rem;
}
.odr-cr-item-body p {
  margin: 0 0 8px;
  color: inherit;
}

.odr-cr-empty {
  text-align: center;
  color: var(--odr-cr-muted);
  padding: 24px 0;
}

/* Pagination */
.odr-cr-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.odr-cr-pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--odr-cr-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--odr-cr-text);
  font-size: 0.88rem;
}
.odr-cr-pagination .page-numbers.current {
  background: var(--odr-cr-primary);
  color: #fff;
  border-color: var(--odr-cr-primary);
}

/* Notice */
.odr-cr-notice {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--odr-cr-bg-soft);
  border: 1px dashed var(--odr-cr-border);
  border-radius: 8px;
  color: var(--odr-cr-muted);
  font-size: 0.92rem;
}
.odr-cr-notice p { margin: 0; color: inherit; }

/* Form */
.odr-cr-form-wrap {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--odr-cr-border);
}

.odr-cr-form-title {
  font-size: 1.1rem;
  margin: 0 0 16px;
  font-weight: 700;
}

.odr-cr-form p {
  margin: 0 0 14px;
  color: inherit;
}

.odr-cr-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.odr-cr-form .required { color: #dc2626; }

.odr-cr-form input[type="text"],
.odr-cr-form input[type="email"],
.odr-cr-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--odr-cr-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--odr-cr-text);
}
.odr-cr-form input:focus,
.odr-cr-form textarea:focus {
  outline: 2px solid var(--odr-cr-primary);
  outline-offset: -1px;
  border-color: var(--odr-cr-primary);
}

.odr-cr-logged {
  background: var(--odr-cr-bg-soft);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Star input (radio reverse trick) */
.odr-cr-rating-row > label {
  display: inline-block;
  margin-right: 12px;
}

.odr-cr-stars-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 2px;
  vertical-align: middle;
}
.odr-cr-stars-input input[type="radio"] {
  display: none;
}
.odr-cr-stars-input label {
  cursor: pointer;
  font-size: 1.6rem;
  color: #d1d5db;
  margin-bottom: 0;
  transition: color 0.15s;
}
.odr-cr-stars-input label:hover,
.odr-cr-stars-input label:hover ~ label,
.odr-cr-stars-input input[type="radio"]:checked ~ label {
  color: var(--odr-cr-primary);
}

.odr-cr-submit {
  background: var(--odr-cr-primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.odr-cr-submit:hover {
  opacity: 0.9;
}

.odr-cr-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0;
  font-family: monospace;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .odr-cr-wrapper { padding: 16px; }
  .odr-cr-item-head { flex-wrap: wrap; }
  .odr-cr-item-rating { margin-left: 60px; }
}
