/* Puramu Product Review Public Stylesheet */
/* Clean plain CSS, no Tailwind, matched to desktop & mobile mockups */

.ppr-wrapper {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  color: #161412;
  box-sizing: border-box;
  background: #f3f8ff;
  box-shadow:
    0px 6px 24px rgba(0, 0, 0, 0.05),
    0px 0px 0px 1px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 20px;
}

.ppr-wrapper * {
  box-sizing: border-box;
}

/* Card layout for the summary */
.ppr-summary-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 60px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 80px;
  margin-bottom: 24px;
}

.ppr-summary-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
  max-width: 542px;
}

.ppr-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  text-transform: uppercase;
  color: #040404;
}

.ppr-rating-info {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  line-height: 1;
}

.ppr-score-text {
  font-size: 40px;
  font-weight: 600;
  color: #161412;
}

.ppr-score-max {
  font-size: 24px;
  font-weight: 400;
  color: #707f9b;
}

.ppr-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.ppr-stars svg,
.ppr-stars img {
  width: 32px;
  height: 32px;
}

.ppr-write-btn-desktop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 32px;
  background: #0046af;
  color: #ffffff;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: fit-content;
}

.ppr-write-btn-desktop:hover {
  background: #033682;
}

.ppr-write-btn-mobile {
  display: none;
}

.ppr-mobile-header {
  display: none;
}

.ppr-summary-right {
  flex: 1;
  max-width: 598px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Distribution Grid */
.ppr-dist-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.ppr-dist-row {
  display: grid;
  grid-template-columns: 44px 1fr 96px;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}

.ppr-dist-label {
  font-size: 16px;
  font-weight: 400;
  color: #161412;
  white-space: nowrap;
}

.ppr-dist-progress-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 212, 164, 0.4);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.ppr-dist-progress-bar {
  height: 100%;
  background: #ffbe0b;
  border-radius: 100px;
  transition: width 0.3s ease;
}

.ppr-dist-count {
  font-size: 16px;
  font-weight: 400;
  color: #161412;
  text-align: right;
  white-space: nowrap;
}

/* Divider */
.ppr-divider {
  display: none;
}

/* Reviews List Container */
.ppr-reviews-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

/* Review Title */
.ppr-reviews-title {
  font-size: 24px;
  font-weight: 700;
  color: #040404;
  margin: 0 0 40px 0;
}

/* Review List */
.ppr-reviews-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ppr-review-card {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 40px 0;
  border-bottom: 1px solid #bfc6d6;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

.ppr-review-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ppr-review-avatar-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

.ppr-review-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ppr-review-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ppr-review-header-flex {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.ppr-review-meta-stack {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.ppr-review-author-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.ppr-review-date {
  font-size: 16px;
  color: #979797;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppr-review-date svg {
  width: 16px;
  height: 16px;
  stroke: #979797;
}

.ppr-review-stars {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.ppr-review-stars svg,
.ppr-review-stars img {
  width: 24px;
  height: 24px;
}

.ppr-review-content {
  font-size: 16px;
  line-height: 150%;
  color: #111827;
  margin-top: 12px;
}

/* Pagination Load More */
.ppr-load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.ppr-load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0046af;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  padding: 8px 16px;
}

.ppr-load-more-btn:hover {
  opacity: 0.8;
}

.ppr-load-more-btn svg {
  stroke: #0046af;
  transition: transform 0.3s;
}

/* Modal Popup Styles */
.ppr-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ppr-modal-backdrop.ppr-show {
  display: flex;
  opacity: 1;
}

.ppr-modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  margin: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.ppr-modal-backdrop.ppr-show .ppr-modal-content {
  transform: scale(1);
}

.ppr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e1e6f0;
}

.ppr-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f1f1f;
}

.ppr-modal-close {
  background: transparent;
  border: none;
  color: #707f9b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.ppr-modal-close:hover {
  color: #0046af;
}

.ppr-modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.ppr-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ppr-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ppr-form-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
}

.ppr-form-label .required {
  color: #ff0000;
}

.ppr-form-input,
.ppr-form-textarea {
  width: 100%;
  border: 1px solid #cbcbcb;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: #ffffff;
}

.ppr-form-input:focus,
.ppr-form-textarea:focus {
  border-color: #0046af;
}

.ppr-form-textarea {
  min-height: 100px;
  resize: vertical;
}

.ppr-form-rating-stars {
  display: flex;
  gap: 8px;
}

.ppr-form-rating-stars input[type='radio'] {
  display: none;
}

.ppr-form-rating-stars label {
  cursor: pointer;
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z" stroke="%23FFBE0B" stroke-width="1.5"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s;
}

.ppr-form-rating-stars label:hover,
.ppr-form-rating-stars label:has(~ label:hover),
.ppr-form-rating-stars input:checked + label,
.ppr-form-rating-stars input:has(~ input:checked) + label {
  background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z" fill="%23FFBE0B"/></svg>');
}

.ppr-form-submit {
  background: #0046af;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  padding: 12px 24px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
  margin-top: 8px;
}

.ppr-form-submit:hover {
  background: #033682;
}

.ppr-form-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Mobile Breakpoint styles */
@media (max-width: 768px) {
  .ppr-wrapper {
    padding: 8px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f3f8ff;
    box-shadow:
      0px 1px 6px rgba(0, 0, 0, 0.16),
      0px 0px 0px 1px rgba(0, 0, 0, 0.08);
  }

  .ppr-summary-card {
    padding: 24px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    border-radius: 16px;
    background: #ffffff;
    margin-bottom: 0;
  }

  .ppr-summary-left {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 20px;
  }

  .ppr-title-desktop {
    display: none;
  }

  .ppr-mobile-header {
    display: contents;
  }

  .ppr-mobile-header .ppr-title-mobile {
    display: block;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    line-height: 22px;
    text-transform: uppercase;
    color: #040404;
    margin: 0;
  }

  .ppr-write-btn-mobile {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    justify-content: center;
    padding: 0px 14px;
    gap: 8px;
    background: #0046af;
    color: #ffffff;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    line-height: 17px;
    border: none;
    cursor: pointer;
    height: 44px;
    width: 151px;
    align-self: center;
  }

  .ppr-write-btn-desktop {
    display: none;
  }

  .ppr-rating-info {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
  }

  .ppr-score-text {
    font-size: 32px;
    font-weight: 600;
    line-height: 39px;
    display: flex;
    align-items: center;
    color: #161412;
  }

  .ppr-score-max {
    font-size: 32px;
    font-weight: 600;
  }

  .ppr-stars {
    gap: 2px;
    margin-bottom: 0;
  }

  .ppr-stars svg,
  .ppr-stars img {
    width: 24px;
    height: 24px;
  }

  .ppr-summary-right {
    max-width: 100%;
    margin-top: 0;
  }

  .ppr-dist-grid {
    gap: 2px;
  }

  .ppr-dist-row {
    grid-template-columns: 44px 1fr 24px;
    gap: 7px;
    min-height: 24px;
  }

  .ppr-dist-label {
    font-size: 16px;
    line-height: 20px;
    color: #161412;
  }

  .ppr-dist-progress-wrap {
    height: 8px;
    background: rgba(255, 212, 164, 0.4);
    border-radius: 100px;
  }

  .ppr-dist-count {
    font-size: 16px;
    line-height: 20px;
    width: 24px;
    text-align: right;
    color: #161412;
  }

  .ppr-dist-count-text {
    display: none;
  }

  .ppr-reviews-container {
    padding: 24px 16px;
    border-radius: 12px;
    background: #ffffff;
    margin-top: 0;
  }

  .ppr-reviews-title {
    display: none;
  }

  .ppr-reviews-list {
    gap: 20px;
  }

  .ppr-review-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 0 0 20px 0;
    border-bottom: none;
  }

  .ppr-review-avatar-container {
    width: 40px;
    height: 40px;
    grid-column: 1;
    grid-row: 1;
  }

  .ppr-review-body {
    display: contents;
  }

  .ppr-review-header-flex {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
  }

  .ppr-review-meta-stack {
    display: flex;
    flex-direction: column;
    width: auto;
    gap: 0;
  }

  .ppr-review-author-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 140%;
    color: #111827;
  }

  .ppr-review-date {
    display: none;
  }

  .ppr-review-stars {
    display: flex;
    gap: 4px;
  }

  .ppr-review-stars svg,
  .ppr-review-stars img {
    width: 17px;
    height: 16px;
  }

  .ppr-review-content {
    grid-column: 1 / -1;
    font-size: 14px;
    line-height: 150%;
    color: #111827;
    margin-top: 0;
  }

  .ppr-review-attachments {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
  }

  .ppr-review-attachment-thumb {
    width: 98px;
    height: 98px;
  }

  /* Mobile Modal Form */
  .ppr-modal-content {
    margin: 12px;
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
  }

  .ppr-modal-header {
    padding: 16px;
  }

  .ppr-modal-title {
    font-size: 18px;
  }

  .ppr-modal-body {
    padding: 16px;
    overflow-y: auto;
  }

  .ppr-form-input,
  .ppr-form-textarea {
    padding: 10px 12px;
    font-size: 14px;
  }

  .ppr-form-submit {
    padding: 10px 20px;
    font-size: 14px;
  }

  .ppr-form-rating-stars label {
    width: 28px;
    height: 28px;
  }
}

/* Image Attachment Upload Styles */
.ppr-image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.ppr-image-upload-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed #cbcbcb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  color: #707f9b;
  transition:
    border-color 0.2s,
    color 0.2s;
  background: #f9f9f9;
  font-size: 14px;
}

.ppr-image-upload-trigger:hover {
  border-color: #0046af;
  color: #0046af;
}

.ppr-image-upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ppr-image-preview-item {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid #cbcbcb;
}

.ppr-image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ppr-image-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}

.ppr-image-preview-remove:hover {
  background: #0046af;
}

/* Comments List Attachments Styles */
.ppr-review-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.ppr-review-attachment-thumb {
  width: 117px;
  height: 115px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #bfc6d6;
  cursor: pointer;
  transition: transform 0.2s;
  background: #f8f8f8;
}

.ppr-review-attachment-thumb:hover {
  transform: scale(1.04);
}

.ppr-review-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox Modal Styles */
.ppr-lightbox-backdrop {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.ppr-lightbox-backdrop.ppr-show {
  display: flex;
}

.ppr-lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  object-fit: contain;
  animation: pprZoom 0.3s;
}

@keyframes pprZoom {
  from {
    transform: scale(0.9);
  }

  to {
    transform: scale(1);
  }
}

.ppr-lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  user-select: none;
}

.ppr-lightbox-close:hover,
.ppr-lightbox-close:focus {
  color: #0046af;
  text-decoration: none;
}

@media only screen and (max-width: 700px) {
  .ppr-lightbox-content {
    width: 100%;
  }
}
