/* -------------------------------------------------------------------------------------------------- */
/* -------------------------------------- WooCommerce Review Photos --------------------------------- */
/* -------------------------------------------------------------------------------------------------- */

.wpdsr-review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0 20px;
}

.wpdsr-review-photo {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wpdsr-review-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wpdsr-review-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Simple Lightbox */
.wpdsr-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.wpdsr-lightbox.active {
  display: flex;
}

.wpdsr-lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.wpdsr-lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
}

.wpdsr-lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10000;
}

.wpdsr-lightbox-close:hover,
.wpdsr-lightbox-close:focus {
  color: #bbb;
}

.wpdsr-lightbox-prev,
.wpdsr-lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0,0,0,0.5);
  z-index: 10000;
}

.wpdsr-lightbox-next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.wpdsr-lightbox-prev {
  left: 0;
}

.wpdsr-lightbox-prev:hover,
.wpdsr-lightbox-next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* -------------------------------------------------------------------------------------------------- */
/* ------------------------------- Helpful Voting & Sorting ----------------------------------------- */
/* -------------------------------------------------------------------------------------------------- */

.wpdsr-review-voting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  color: #666;
}

.wpdsr-voting-label {
  font-weight: 500;
}

.wpdsr-vote-btn {
  background: #f7f7f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #4a5568;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.wpdsr-vote-btn:hover:not(:disabled) {
  background: #edf2f7;
  border-color: #cbd5e0;
  transform: translateY(-1px);
}

.wpdsr-vote-btn:active:not(:disabled) {
  transform: translateY(0);
}

.wpdsr-vote-btn.active.up {
  background: #e6fffa;
  border-color: #319795;
  color: #234e52;
  box-shadow: 0 2px 4px rgba(49, 151, 149, 0.15);
}

.wpdsr-vote-btn.active.down {
  background: #fff5f5;
  border-color: #e53e3e;
  color: #742a2a;
  box-shadow: 0 2px 4px rgba(229, 62, 62, 0.15);
}

.wpdsr-vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wpdsr-review-sorting {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  background: #f8fafc;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.wpdsr-review-sorting label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.wpdsr-sort-select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #334155;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.wpdsr-sort-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}


/* -------------------------------------------------------------------------------------------------- */
/* -------------------------------------- Q&A Tab Styling ------------------------------------------- */
/* -------------------------------------------------------------------------------------------------- */

.wpdsr-qa-container {
  margin: 20px 0;
}

.wpdsr-qa-container h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #1e293b;
  font-weight: 700;
}

.wpdsr-questions-list {
  margin-bottom: 30px;
}

.wpdsr-qa-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wpdsr-qa-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.wpdsr-question-block,
.wpdsr-answer-block {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.wpdsr-answer-block {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #e2e8f0;
  margin-left: 30px;
}

.wpdsr-qa-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 12px;
}

.wpdsr-qa-badge.question {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.wpdsr-qa-badge.answer {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.wpdsr-qa-content {
  flex: 1;
}

.wpdsr-qa-text {
  font-size: 15px;
  color: #334155;
  margin: 0 0 5px 0 !important;
  line-height: 1.5;
}

.wpdsr-qa-meta {
  display: block;
  font-size: 12px;
  color: #64748b;
}

.wpdsr-answers-list {
  background: #f8fafc;
  border-radius: 8px;
  padding: 5px 15px 15px 15px;
  margin-top: 15px;
}

.wpdsr-no-answers {
  padding: 10px 0 0 30px;
  color: #94a3b8;
  font-size: 13px;
}

.wpdsr-no-qa {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
  border: 1px dashed #cbd5e1;
}

.wpdsr-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 35px 0;
}

/* Ask Question Form */
.wpdsr-ask-question-form {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.wpdsr-ask-question-form h4 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: #1e293b;
  font-weight: 600;
}

.wpdsr-form-row {
  margin-bottom: 15px;
}

.wpdsr-form-row.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px) {
  .wpdsr-form-row.inline {
    grid-template-columns: 1fr;
  }
}

.wpdsr-form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.wpdsr-form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #ffffff;
  color: #334155;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wpdsr-form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}

/* Custom button */
.wpdsr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wpdsr-button.primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
}

.wpdsr-button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.wpdsr-button.primary:active:not(:disabled) {
  transform: translateY(0);
}

.wpdsr-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Message status box */
.wpdsr-qa-message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 15px;
}

.wpdsr-qa-message.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.wpdsr-qa-message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
