/* ============================================================
   REVIEWS SECTION — reviews.css
   ALL rules are scoped under #rvw-root.
   Nothing here will affect any other part of your website.
   ============================================================ */

/* ── Font import (safe to have even if Nunito already loaded) ── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');


/* ── Root wrapper ────────────────────────────────────────────── */
#rvw-root {
  all: initial; /* hard reset — blocks inheritance from your site */
  display: block;
  font-family: 'Nunito', Arial, sans-serif;
  color: #333;
  background: #fff;
  /* Contain horizontal overflow so 3D-translated cards never
     cause a horizontal scrollbar on mobile */
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Re-apply box-sizing inside root so nothing bleeds */
#rvw-root *,
#rvw-root *::before,
#rvw-root *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#rvw-root .rvw-accent {
  color: #09f999;
}


/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */
@keyframes rvwFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes rvwFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#rvw-root .rvw-anim-up {
  opacity: 0;
  animation: rvwFadeUp 0.6s ease forwards;
}

#rvw-root .rvw-d1 { animation-delay: 0.12s; }
#rvw-root .rvw-d2 { animation-delay: 0.24s; }
#rvw-root .rvw-d3 { animation-delay: 0.38s; }


/* ============================================================
   POPUP OVERLAY
   ============================================================ */
#rvw-root .rvw-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 99999; /* high enough to sit above your website's elements */
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#rvw-root .rvw-popup-overlay.rvw-active {
  display: flex;
  animation: rvwFadeIn 0.25s ease;
}

#rvw-root .rvw-popup-box {
  background: #fff;
  border-radius: 20px;
  padding: 38px 30px 30px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  animation: rvwFadeUp 0.32s ease forwards;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-popup-icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

#rvw-root .rvw-popup-title {
  font-size: 21px;
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-popup-msg {
  font-size: 14px;
  color: #555;
  line-height: 1.65;
  margin-bottom: 22px;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-popup-close-btn {
  display: inline-block;
  padding: 11px 30px;
  background: #09f999;
  border: 2px solid #09f999;
  border-radius: 10px;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #000;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  outline: none;
}

#rvw-root .rvw-popup-close-btn:hover {
  background: #000;
  color: #09f999;
  border-color: #000;
}


/* ============================================================
   FORM SECTION
   ============================================================ */
#rvw-root .rvw-form-section {
  display: flex;
  justify-content: center;
  padding: 52px 20px 44px;
  background: #fff;
}

#rvw-root .rvw-form-container {
  width: 100%;
  max-width: 520px;
}

#rvw-root .rvw-form-heading {
  font-size: 40px;
  font-weight: 800;
  color: #111;
  margin-bottom: 8px;
  text-align: center;
  font-family: 'Nunito', Arial, sans-serif;
  line-height: 1.25;
}

#rvw-root .rvw-subtitle {
  color: #777;
  font-size: 15px;
  margin-bottom: 30px;
  text-align: center;
  font-family: 'Nunito', Arial, sans-serif;
  line-height: 1.5;
}

#rvw-root .rvw-optional {
  font-weight: 400;
  color: #bbb;
  font-size: 12px;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-field-group {
  margin-bottom: 18px;
}

#rvw-root .rvw-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-input,
#rvw-root .rvw-textarea {
  display: block;
  width: 100%;
  padding: 11px 15px;
  border: 2px solid #09f999;
  border-radius: 11px;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 15px;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}

#rvw-root .rvw-input:focus,
#rvw-root .rvw-textarea:focus {
  border-color: #000000;
}

#rvw-root .rvw-input:hover,
#rvw-root .rvw-textarea:hover {
  border-color: #000000;
}

#rvw-root .rvw-textarea {
  resize: vertical;
  min-height: 106px;
  line-height: 1.5;
}

/* ── Photo Upload ── */
#rvw-root .rvw-upload-area {
  border: 2px dashed #09f999;
  border-radius: 11px;
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
}

#rvw-root .rvw-upload-area:hover {
  border-color: #000000;
  background: #f5fffb;
}

#rvw-root .rvw-upload-icon {
  font-size: 26px;
  margin-bottom: 6px;
  display: block;
}

#rvw-root .rvw-upload-text {
  font-size: 14px;
  font-weight: 700;
  color: #444;
  margin-bottom: 3px;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-upload-sub {
  font-size: 12px;
  color: #aaa;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-photo-preview-wrap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}

#rvw-root .rvw-photo-preview-img {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #09f999;
  display: block;
}

#rvw-root .rvw-remove-photo-btn {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 6px 13px;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  outline: none;
}

#rvw-root .rvw-remove-photo-btn:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* ── Star Rating ── */
#rvw-root .rvw-stars-input {
  display: flex;
  gap: 6px;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
}

#rvw-root .rvw-stars-input span {
  color: #ddd;
  transition: color 0.12s, transform 0.12s;
  user-select: none;
  display: inline-block;
}

#rvw-root .rvw-stars-input span:hover {
  transform: scale(1.2);
}

#rvw-root .rvw-stars-input span.rvw-star-active {
  color: #09f999;
}

/* ── Checkbox ── */
#rvw-root .rvw-checkbox-group {
  margin-bottom: 20px;
}

#rvw-root .rvw-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  line-height: 1.55;
}

#rvw-root .rvw-checkbox {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: #09f999;
  margin-top: 2px;
  cursor: pointer;
}

#rvw-root .rvw-checkbox-text {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  font-family: 'Nunito', Arial, sans-serif;
}

/* ── Submit Button ── */
#rvw-root .rvw-submit-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: #09f999;
  border: 2px solid #09f999;
  border-radius: 11px;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #000;
  cursor: pointer;
  /* Invert on hover: black background, green text */
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.1s;
  outline: none;
  text-align: center;
}

#rvw-root .rvw-submit-btn:hover {
  background: #000;
  color: #09f999;
  border-color: #000;
}

#rvw-root .rvw-submit-btn:active  { transform: scale(0.98); }
#rvw-root .rvw-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Error Message ── */
#rvw-root .rvw-msg {
  margin-top: 12px;
  padding: 12px 15px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  display: none;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-msg.rvw-error {
  background: #fff0f0;
  color: #c0392b;
  display: block;
}


/* ============================================================
   DISPLAY SECTION
   ============================================================ */
#rvw-root .rvw-display-section {
  padding: 32px 16px 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border-top: 1px solid #f0f0f0;
  /* Critical: clips 3D-translated cards from causing horizontal scroll */
  overflow: hidden;
  width: 100%;
  /* Prevent browser overscroll/bounce glow when swiping near edges */
  overscroll-behavior: none;
}

#rvw-root .rvw-display-header {
  text-align: center;
  margin-bottom: 18px;
}

#rvw-root .rvw-display-title {
  font-size: 40px;
  font-weight: 800;
  color: #111;
  margin-bottom: 7px;
  font-family: 'Nunito', Arial, sans-serif;
  line-height: 1.25;
}

#rvw-root .rvw-display-subtitle {
  font-size: 14px;
  color: #888;
  font-weight: 600;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-loading,
#rvw-root .rvw-no-reviews {
  font-size: 15px;
  color: #bbb;
  font-weight: 600;
  font-family: 'Nunito', Arial, sans-serif;
}


/* ── 3D Scene ── */
#rvw-root .rvw-scene {
  width: min(90vw, 660px);
  height: 300px;
  perspective: 1800px;
  position: relative;
  overflow: hidden;
  /* pan-y: browser owns vertical scroll; JS handles horizontal swipe only */
  touch-action: pan-y;
  overscroll-behavior: none;
}

#rvw-root .rvw-stack {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  cursor: grab;
  /* pan-y: vertical page scroll passes through natively */
  touch-action: pan-y;
  overscroll-behavior: none;
}

#rvw-root .rvw-stack:active { cursor: grabbing; }


/* ── Card ── */
#rvw-root .rvw-card {
  position: absolute;

  /* Fixed height, vw-based width capped tightly */
  width: min(80vw, 580px);
  height: 270px;

  left: 50%;
  top: 50%;
  /* margin-left = exactly half of width above */
  margin-left: calc(-1 * min(40vw, 290px));
  margin-top: -135px;

  border-radius: 18px;
  background: #fff;
  padding: clamp(16px, 2.8vw, 28px) clamp(16px, 3.2vw, 32px) clamp(12px, 2vw, 22px);
  box-shadow:
    0 18px 46px rgba(0,0,0,0.09),
    0 3px 12px rgba(9,249,153,0.13),
    0 0 0 1.5px rgba(9,249,153,0.20);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  will-change: transform;
  user-select: none;
  font-family: 'Nunito', Arial, sans-serif;
  /* pan-y: vertical scroll passes through; JS intercepts horizontal only */
  touch-action: pan-y;
  overscroll-behavior: none;
}

#rvw-root .rvw-card-rating {
  color: #09f999;
  font-size: clamp(13px, 2vw, 19px);
  letter-spacing: 2px;
  margin-bottom: 6px;
  display: block;
}

#rvw-root .rvw-card-text {
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.65;
  color: #333;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-card-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 9px 0 8px;
}

#rvw-root .rvw-card-reviewer {
  display: flex;
  align-items: center;
  gap: 10px;
}

#rvw-root .rvw-card-avatar {
  width: clamp(34px, 4.5vw, 48px);
  height: clamp(34px, 4.5vw, 48px);
  border-radius: 50%;
  background: #09f999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(13px, 1.8vw, 19px);
  color: #000;
  flex-shrink: 0;
  overflow: hidden;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

#rvw-root .rvw-card-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

#rvw-root .rvw-card-name {
  font-weight: 800;
  font-size: clamp(12px, 1.5vw, 15px);
  color: #111;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-card-role {
  font-size: clamp(10px, 1.2vw, 13px);
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Nunito', Arial, sans-serif;
}

/* ── LinkedIn Button ── */
#rvw-root .rvw-linkedin-btn {
  /* Forces the link to behave and be tappable */
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  padding: 4px 11px;
  background: #09f999;
  border: 2px solid #09f999;
  border-radius: 20px;
  font-family: 'Nunito', Arial, sans-serif;
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 700;
  color: #000 !important; /* override any link colors from parent site */
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  width: fit-content;
  /* Critical: ensures button is always clickable */
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
}

#rvw-root .rvw-linkedin-btn:hover {
  background: #000;
  color: #09f999 !important;
  border-color: #000;
}

#rvw-root .rvw-linkedin-btn:hover .rvw-linkedin-icon {
  fill: #09f999;
}

#rvw-root .rvw-linkedin-icon {
  width: 12px;
  height: 12px;
  fill: #000;
  transition: fill 0.2s;
  flex-shrink: 0;
}


/* ── Navigation Arrows ── */
#rvw-root .rvw-nav {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}

#rvw-root .rvw-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #09f999;
  background: #fff;
  color: #09f999;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
  outline: none;
  font-family: 'Nunito', Arial, sans-serif;
}

#rvw-root .rvw-nav-btn:hover {
  background: #09f999;
  color: #000;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  #rvw-root .rvw-form-section    { padding: 36px 14px 30px; }
  #rvw-root .rvw-form-heading    { font-size: 24px; }

  #rvw-root .rvw-display-section {
    padding: 24px 0 40px;
    overflow: hidden;
    max-width: 100vw;
  }

  #rvw-root .rvw-display-title   { font-size: 21px; }
  #rvw-root .rvw-display-header  { margin-bottom: 12px; }
  #rvw-root .rvw-popup-box       { padding: 28px 18px 24px; }
  #rvw-root .rvw-nav-btn         { width: 38px; height: 38px; font-size: 17px; }

  /* Scene fills viewport width, fixed height matching card */
  #rvw-root .rvw-scene {
    width: 100vw;
    height: 260px;
    overflow: hidden;
  }

  /* Card sized to fit comfortably within mobile viewport */
  #rvw-root .rvw-card {
    width: 82vw;
    height: 240px;
    margin-left: -41vw;
    margin-top: -120px;
    padding: 16px 18px 12px;
  }
}

@media (max-width: 380px) {
  #rvw-root .rvw-form-heading    { font-size: 20px; }
  #rvw-root .rvw-display-title   { font-size: 18px; }
  #rvw-root .rvw-stars-input     { font-size: 26px; }

  #rvw-root .rvw-scene {
    height: 240px;
  }

  #rvw-root .rvw-display-title {
  font-size: 26px;
  }

  #rvw-root .rvw-form-heading {
  font-size: 26px;
  }
  #rvw-root .rvw-card {
    width: 86vw;
    height: 220px;
    margin-left: -43vw;
    margin-top: -110px;
  }
}