/* ========================
   Review Popup (shared PC + Mobile)
   ======================== */
.rp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
  padding: 20px;
  overflow: hidden;
}
.rp-overlay.open {
  opacity: 1;
  visibility: visible;
}

.rp-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 30, 25, 0.35);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
.rp-modal > #rpContent {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.rp-overlay.open .rp-modal {
  transform: translateY(0) scale(1);
}

.rp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rp-hero {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #009178 0%, #00b894 100%);
  overflow: hidden;
  flex-shrink: 0;
}
.rp-slides {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  touch-action: pan-y;
}
.rp-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}
.rp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.rp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}
.rp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #222;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.15s, transform 0.15s;
}
.rp-arrow:hover { transform: translateY(-50%) scale(1.06); }
.rp-arrow-prev { left: 10px; }
.rp-arrow-next { right: 10px; }
.rp-arrow[disabled] { opacity: 0; pointer-events: none; }
.rp-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 3;
}
.rp-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}
.rp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}
.rp-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 3px;
}
.rp-hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 145, 120, 0.95);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 14px;
  letter-spacing: 0.04em;
}

.rp-body {
  padding: 18px 20px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.rp-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.rp-car-name {
  font-size: 19px;
  font-weight: 800;
  color: #111;
  line-height: 1.3;
}
.rp-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fff7e0;
  color: #f5a302;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rp-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}
.rp-meta-dot {
  margin: 0 5px;
  color: #ccc;
}

.rp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.rp-tag {
  font-size: 11px;
  font-weight: 600;
  color: #009178;
  background: rgba(0, 145, 120, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
}

.rp-quote {
  font-size: 13.5px;
  color: #444;
  line-height: 1.6;
  background: #f7faf9;
  border-left: 3px solid #009178;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.rp-section {
  margin-bottom: 14px;
}
.rp-section-label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.rp-product-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rp-product-btn {
  padding: 11px 0;
  border: 1.5px solid #e5e8e7;
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.rp-product-btn:hover {
  border-color: #00b894;
  color: #009178;
}
.rp-product-btn.active {
  border-color: #009178;
  background: #009178;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 145, 120, 0.25);
}

.rp-period-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.rp-period-btn {
  padding: 9px 0;
  border: 1.5px solid #e5e8e7;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.rp-period-btn:hover {
  border-color: #00b894;
  color: #009178;
}
.rp-period-btn.active {
  border-color: #009178;
  background: rgba(0, 145, 120, 0.08);
  color: #009178;
}

.rp-estimate {
  margin-top: 12px;
  background: linear-gradient(135deg, #f0fbf7 0%, #e5f5ef 100%);
  border: 1px solid rgba(0, 145, 120, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.rp-estimate-label {
  font-size: 12px;
  color: #5a6e6a;
  font-weight: 600;
}
.rp-estimate-value {
  font-size: 22px;
  font-weight: 800;
  color: #009178;
  letter-spacing: -0.01em;
}
.rp-estimate-unit {
  font-size: 13px;
  color: #009178;
  font-weight: 700;
  margin-left: 2px;
}
.rp-estimate-note {
  font-size: 11px;
  color: #8a9995;
  margin-top: 6px;
  text-align: right;
}

.rp-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.rp-input {
  padding: 11px 12px;
  border: 1.5px solid #e5e8e7;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
}
.rp-input:focus {
  border-color: #009178;
}

.rp-agree {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #666;
  margin-bottom: 14px;
  cursor: pointer;
}
.rp-agree input {
  width: 14px;
  height: 14px;
  accent-color: #009178;
}

.rp-privacy-link {
  color: #009178;
  text-decoration: none;
  font-weight: 500;
}
.rp-privacy-link:hover {
  text-decoration: underline;
}

.rp-privacy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}
.rp-privacy-overlay.active {
  display: flex;
}
.rp-privacy-modal {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 440px;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rp-privacy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 700;
  font-size: 15px;
}
.rp-privacy-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}
.rp-privacy-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 13px;
  color: #444;
  line-height: 1.7;
}
.rp-privacy-body h4 {
  margin: 16px 0 4px;
  font-size: 13.5px;
  color: #222;
}
.rp-privacy-body p {
  margin: 0 0 8px;
}

.rp-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid #f1f3f3;
  background: #fff;
  flex-shrink: 0;
}
.rp-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(110deg, #009178 0%, #00b894 50%, #009178 100%);
  background-size: 200% 100%;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(0, 145, 120, 0.35);
  transition: transform 0.15s, background-position 0.4s;
}
.rp-submit:hover {
  background-position: 100% 50%;
}
.rp-submit:active {
  transform: scale(0.98);
}
.rp-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.rp-success {
  text-align: center;
  padding: 40px 24px;
}
.rp-success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(0, 145, 120, 0.1);
  color: #009178;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rp-success h3 {
  font-size: 18px;
  font-weight: 800;
  color: #111;
  margin-bottom: 8px;
}
.rp-success p {
  font-size: 13px;
  color: #666;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .rp-modal {
    max-width: 520px;
  }
  .rp-hero {
    height: 240px;
  }
  .rp-car-name {
    font-size: 22px;
  }
}

/* 모바일 — 하단 풀 시트 */
@media (max-width: 767px) {
  .rp-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .rp-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    height: 92dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 30, 25, 0.35);
  }
  .rp-overlay.open .rp-modal {
    transform: translateY(0);
  }
  .rp-hero {
    height: 36vh;
    max-height: 240px;
    min-height: 160px;
  }
  .rp-modal::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    z-index: 6;
  }
  .rp-close {
    top: 18px;
  }
  .rp-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .rp-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 360px) {
  .rp-period-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
