/* ==========================================================================
   Store Testimonials (Відгуки про магазин) - UniShop2 Compatible Styles
   Author: OpenCart Lab
   ========================================================================== */

/* Overall Page Layout */
.testimonial-page-wrap {
  margin-bottom: 40px;
}
.testimonial-header-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 24px;
}
.testimonial-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.testimonial-sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.testimonial-sort-label {
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
}
.testimonial-sort-select {
  height: 38px;
  border-radius: 19px;
  border: 1px solid #cbd5e1;
  padding: 0 16px;
  font-size: 13px;
  color: #1e293b;
  background-color: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.testimonial-sort-select:focus {
  border-color: #396cf1;
}

/* Rating Summary Badge */
.testimonial-total-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avg-rating {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}
.testimonial-stars-gold {
  color: #f59e0b;
  font-size: 16px;
}
.testimonial-count-badge {
  font-size: 13px;
  color: #64748b;
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 12px;
  font-weight: 500;
}

/* Review Cards List */
.testimonial-card {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.testimonial-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}
.testimonial-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.testimonial-avatar-wrap {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.testimonial-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.testimonial-avatar-placeholder {
  font-size: 20px;
  font-weight: 700;
  color: #396cf1;
  background: #eff6ff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.testimonial-user-info {
  flex: 1;
}
.testimonial-user-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.testimonial-user-meta {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-user-meta i {
  margin-right: 4px;
}
.testimonial-rating-block {
  margin-left: auto;
  color: #f59e0b;
  font-size: 15px;
  white-space: nowrap;
}

/* Review Content */
.testimonial-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px 0;
}
.testimonial-text-body {
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 14px;
}
.testimonial-pros-block {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.testimonial-pros-block strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #15803d;
}
.testimonial-cons-block {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.testimonial-cons-block strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #b91c1c;
}
.testimonial-admin-reply {
  background: #f8fafc;
  border-left: 3px solid #396cf1;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  font-size: 13.5px;
  color: #334155;
  margin-top: 14px;
}
.testimonial-admin-reply-header {
  font-weight: 700;
  color: #396cf1;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* Write Review Form Card */
.testimonial-form-card,
#form-testimonial-card {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 28px 28px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.05);
  max-width: 580px !important;
  width: 100% !important;
  margin: 0 auto 30px !important;
  box-sizing: border-box !important;
}
.testimonial-form-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.testimonial-form-card .form-group {
  margin-bottom: 18px;
  clear: both;
}
.testimonial-form-card .form-group::after {
  content: "";
  display: table;
  clear: both;
}
.testimonial-form-card label.control-label,
.testimonial-form-card .control-label,
#form-testimonial .control-label {
  text-align: left !important;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
  float: none !important;
  padding-top: 0 !important;
}
.testimonial-form-card .form-control {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: none;
  font-size: 13.5px;
  padding: 8px 14px;
  transition: border-color 0.2s;
}
.testimonial-form-card textarea.form-control {
  margin-bottom: 4px;
}
.testimonial-form-card .form-control:focus {
  border-color: #396cf1;
  box-shadow: 0 0 0 3px rgba(57,108,241,0.12);
}

/* Interactive Star Rating in Form */
#testimonial-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
}
#testimonial-rating span {
  font-size: 26px;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease;
}
#testimonial-rating span i {
  color: #cbd5e1;
  transition: color 0.15s ease, transform 0.15s ease;
}
#testimonial-rating span.active,
#testimonial-rating span.active i,
#testimonial-rating span i.fas,
#testimonial-rating span i.active {
  color: var(--rating-star-c-active, #ffb502) !important;
}
#testimonial-rating span:hover,
#testimonial-rating span:hover i {
  color: var(--rating-star-c-active, #ffb502) !important;
  transform: scale(1.15);
}

/* Action Buttons */
.testimonial-form-actions {
  clear: both !important;
  margin-top: 32px !important;
  margin-bottom: 8px !important;
  text-align: center;
  display: block !important;
  width: 100% !important;
}
.btn-testimonial-primary {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px;
  border-radius: 22px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  background: var(--btn-primary-bg, #396cf1) !important;
  color: var(--btn-primary-c, #ffffff) !important;
  border: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(57,108,241,0.25) !important;
  transition: all 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
}
.btn-testimonial-primary:hover,
.btn-testimonial-primary:focus {
  background: var(--btn-primary-bg-hover, #3a63cf) !important;
  color: var(--btn-primary-c-hover, #ffffff) !important;
  box-shadow: 0 6px 18px rgba(57,108,241,0.35) !important;
  transform: translateY(-1px);
}
.btn-testimonial-toggle {
  height: 42px;
  border-radius: 21px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  color: #396cf1;
  border: 1.5px solid #396cf1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-testimonial-toggle:hover {
  background: #396cf1;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(57,108,241,0.25);
}

/* Video & Images in Reviews */
.testimonial-thumbnails img {
  border-radius: 8px;
  transition: opacity 0.2s;
}
.testimonial-thumbnails:hover img {
  opacity: 0.9;
}
.sm {
  vertical-align: middle;
  margin: 0 2px;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
  .testimonial-controls {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .testimonial-card {
    padding: 18px 16px;
    border-radius: 12px;
  }
  .testimonial-card-header {
    flex-wrap: wrap;
  }
  .testimonial-rating-block {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
  .testimonial-form-card {
    padding: 20px 16px;
    max-width: 100%;
    margin: 0 0 24px;
  }
  .testimonial-toggle-btn-wrap {
    width: 100%;
  }
  .btn-testimonial-primary,
  .btn-testimonial-toggle {
    width: 100%;
  }
}