/* =================================================================== */
/*  Mediapaou Testimonials - Compact Elegant Frontend v2.0             */
/* =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500&display=swap');

/* --- Testimonial Slider --- */
.rteh-testimonial-slider {
  font-family: 'DM Sans', sans-serif;
  max-width: 520px;
  margin: 1rem auto;
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 1rem 1.1rem 0.85rem;
  min-height: 130px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Progress bar */
.rteh-slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #888;
  opacity: 0.2;
  transition: width 0.1s linear;
}

/* Slide item */
.rteh-testimonial-slide-item {
  position: absolute;
  inset: 0;
  padding: 1rem 1.1rem 0.85rem;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
              transform 0.55s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.rteh-testimonial-slide-item.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.rteh-testimonial-slide-item.rteh-exit {
  opacity: 0;
  transform: translateX(-20px);
  position: absolute;
}

/* Quote text */
.rteh-testimonial-slider blockquote {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.65;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
}
.rteh-testimonial-slider blockquote::before { content: none; }
.rteh-testimonial-slider blockquote p { margin: 0; font-size: inherit; }

/* Footer row: avatar + name | stars */
.rteh-testimonial-avatar-name-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: auto;
  gap: 8px;
}

.rteh-testimonial-person {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rteh-testimonial-avatar { flex-shrink: 0; }

.rteh-testimonial-avatar-img {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: none;
}

.rteh-testimonial-author {
  font-size: 12px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0;
}

/* Stars */
.rteh-testimonial-ratings-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

body .rteh-testimonial-slider .rteh-stars span.dashicons {
  font-family: "dashicons" !important;
  font-size: 13px !important;
  width: 13px !important;
  height: 13px !important;
  line-height: 1 !important;
  margin: 0 1px !important;
  display: inline-block !important;
}
body .rteh-testimonial-slider .rteh-stars span.dashicons-star-filled { color: #F5A623 !important; }
body .rteh-testimonial-slider .rteh-stars span.dashicons-star-empty  { color: #ddd !important; }

/* Dot navigation */
.rteh-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0.6rem;
}

.rteh-slider-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.rteh-slider-dot.active { background: #1a1a1a; transform: scale(1.5); }

.rteh-slider-nav {
  background: none;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  padding: 0;
  line-height: 1;
}
.rteh-slider-nav:hover { border-color: rgba(0,0,0,0.3); color: #1a1a1a; transform: scale(1.08); }
.rteh-slider-nav:active { transform: scale(0.94); }

@media (max-width: 480px) {
  .rteh-testimonial-slider { padding: 0.85rem 0.9rem 0.7rem; margin: 0.5rem auto; }
}

/* =================================================================== */
/*  Submission Form                                                     */
/* =================================================================== */
.rteh-form-container {
  max-width: 520px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
}
.rteh-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rteh-form-group { margin-bottom: 14px; }
.rteh-testimonial-form label { display: block; font-weight: 500; font-size: 13px; color: #333; margin-bottom: 4px; }
.rteh-testimonial-form label .required { color: #c62828; font-weight: normal; margin-left: 2px; }
.rteh-testimonial-form input[type="text"],
.rteh-testimonial-form input[type="email"],
.rteh-testimonial-form textarea,
.rteh-testimonial-form select {
  width: 100%; padding: 8px 10px; font-size: 13px; color: #333;
  background: #fafafa; border: 1px solid #ddd; border-radius: 6px;
  box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s;
}
.rteh-testimonial-form input:focus,
.rteh-testimonial-form textarea:focus,
.rteh-testimonial-form select:focus {
  border-color: #1a1a1a; background: #fff;
  box-shadow: 0 0 0 2px rgba(26,26,26,0.08); outline: none;
}
.rteh-testimonial-form textarea { resize: vertical; min-height: 100px; }
.rteh-testimonial-form input[type="submit"] {
  width: 100%; padding: 9px 20px; font-size: 13px; font-weight: 500;
  color: #fff; background: #1a1a1a; border: none; border-radius: 6px;
  cursor: pointer; transition: background 0.2s;
}
.rteh-testimonial-form input[type="submit"]:hover { background: #333; }

.rteh-form-group.inline-label-select { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rteh-form-group.inline-label-select label { margin-bottom: 0; white-space: nowrap; }
.rteh-form-group.inline-label-select select { flex: 1; min-width: 150px; }

/* Success & Error */
.rteh-popup-message { position: relative; padding: 12px 30px 12px 12px; margin-bottom: 16px; border-radius: 6px; }
.rteh-testimonial-success.rteh-popup-message { color: #2e7d32; background: #e8f5e9; border: 1px solid #c8e6c9; }
.rteh-testimonial-success.rteh-popup-message p { font-size: 13px; margin: 0; color: #2e7d32; }
.rteh-popup-close { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); background: none; border: none; font-size: 20px; line-height: 1; color: #2e7d32; opacity: 0.7; cursor: pointer; padding: 4px; }
.rteh-popup-close:hover { opacity: 1; }
.rteh-testimonial-error { padding: 10px 12px; margin-bottom: 16px; border-radius: 6px; color: #c62828; background: #ffebee; border: 1px solid #ffcdd2; font-size: 13px; }
.rteh-testimonial-error ul { margin: 0; padding-left: 18px; list-style-position: inside; }

/* Spinner */
.rteh-form-submit-wrapper { position: relative; margin-top: 10px; }
.rteh-spinner-container { display: flex; justify-content: center; align-items: center; min-height: 42px; }
.rteh-spinner { border: 3px solid rgba(0,0,0,0.1); width: 24px; height: 24px; border-radius: 50%; border-left-color: #1a1a1a; animation: rteh-spin 0.9s linear infinite; }
@keyframes rteh-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .rteh-form-container { margin-left: 10px; margin-right: 10px; padding: 1rem; }
  .rteh-form-grid { grid-template-columns: 1fr; gap: 0; }
}
