/* ================================================================
   review.css  —  고객후기 리스트 & 상세 공통 스타일
   ================================================================ */

/* ── 통계 배너 (review-list) ── */
.rv_summary {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: #1f1f1f;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.rv_summary .rv_score_box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.rv_summary .rv_score_num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: #1f1f1f;
}
.rv_summary .rv_score_stars {
  display: flex;
  gap: 2px;
}
.rv_summary .rv_score_stars i {
  font-size: 13px;
  color: #ffc107;
}
.rv_summary .rv_score_count {
  font-size: 12px;
  color: #888;
}

/* ── 정렬 셀렉트 ── */
.rv_filter_wrap {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.rv_sort_select {
  border: 1px solid #e2e5ea;
  background: #fff url("../images/icon/down.svg") no-repeat right 8px center /
    12px;
  border-radius: 100px;
  padding: 7px 26px 7px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #3b3b3b;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

/* ── 리뷰 카드 리스트 (review-list) ── */
.rv_list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── 가로 스크롤 변형 (main) ── */
.rv_list--hscroll {
  flex-direction: row;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  cursor: grab;
  user-select: none;
}
.rv_list--hscroll::-webkit-scrollbar {
  display: none;
}
.rv_list--hscroll.rv_list--dragging {
  cursor: grabbing;
}
.rv_list--hscroll .rv_card {
  flex-shrink: 0;
  width: 280px;
  display: flex;
  flex-direction: column;
}
.rv_list--hscroll .rv_admin_comment {
  margin-top: auto;
}
.rv_list--hscroll .rv_admin_txt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rv_list--hscroll .rv_admin_txt_expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
.rv_list--hscroll .rv_admin_more_btn {
  display: none;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}
.rv_card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #f0f0f0;
}
.rv_card_top {
  margin-bottom: 4px;
}
.rv_card_thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f2f4;
  flex-shrink: 0;
  position: relative;
}
.rv_card_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rv_card_thumb .rv_media_badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv_card_thumb .rv_media_badge i {
  font-size: 9px;
  color: #fff;
}
.rv_card_car {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rv_card_stars {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-right: 4px;
}
.rv_card_stars i {
  font-size: 12px;
  color: #e0e0e0;
}
.rv_card_stars i.on {
  color: #ffc107;
}
.rv_card_stars .rv_score_txt {
  font-size: 12px;
  font-weight: 600;
  color: #ffc107;
  margin-left: 2px;
}
.rv_card_info {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.rv_card_info .rv_card_user {
  margin-left: auto;
}
.rv_card_txt {
  font-size: 15px;
  color: #222222;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  margin-bottom: 6px;
}
.rv_card_txt.rv_card_txt_expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
.rv_card_more_btn {
  display: none;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  text-decoration: underline;
  text-decoration-color: #aaa;
  cursor: pointer;
  margin-bottom: 12px;
}
.rv_card_photos {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rv_card_photos::-webkit-scrollbar {
  display: none;
}
.rv_card_photos .rv_thumb {
  /* 고정폭(px)을 직접 계산하면 보더/스크롤바 등으로 오차가 생겨 마지막 사진이 잘릴 수 있어
     실제 부모 폭(100%) 기준 calc로 5장 + gap 4*6px이 항상 정확히 한 줄을 채우게 함 */
  width: calc((100% - 24px) / 5);
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f2f4;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
/* wrap_contents가 고정 500px에서 풀어지는 지점(common.css 기준)부터는
   썸네일을 고정폭으로 두어 줄어들지 않고 넘쳐서 좌우 스크롤되게 함 */
@media screen and (max-width: 500px) {
  .rv_card_photos .rv_thumb {
    width: 82px;
  }
}
.rv_card_photos .rv_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rv_card_photos .rv_thumb.rv_video_thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
}
.rv_card_photos .rv_thumb .rv_play_over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.rv_card_photos .rv_thumb .rv_play_over i {
  font-size: 20px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.rv_card_user {
  font-size: 12px;
  color: #888;
  font-weight: 500;
}
.rv_card_dot {
  font-size: 12px;
  color: #ddd;
}
.rv_card_date {
  font-size: 12px;
  color: #bbb;
}

/* ── 더보기 버튼 ── */
.rv_load_more {
  width: 100%;
  padding: 14px;
  border: 1px solid #e2e5ea;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  cursor: pointer;
}
.rv_load_more i {
  font-size: 14px;
}

/* ── 라이트박스 ── */
.rv_lightbox {
  display: none;
  position: fixed;
  /* 모바일: 전체 화면 */
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.96);
  flex-direction: column;
}
.rv_lightbox.open {
  display: flex;
}

.rv_lb_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  flex-shrink: 0;
}
.rv_lb_count {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}
.rv_lb_close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.rv_lb_close_x {
  position: relative;
  width: 14px;
  height: 14px;
}
.rv_lb_close_x::before,
.rv_lb_close_x::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: #fff;
  border-radius: 1px;
}
.rv_lb_close_x::before {
  transform: rotate(45deg);
}
.rv_lb_close_x::after {
  transform: rotate(-45deg);
}
.rv_lb_stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0 32px;
  overflow: hidden;
}
.rv_lb_stage .swiper {
  width: 100%;
}
.rv_lb_stage .swiper-slide {
  width: 100% !important;
}
.rv_lb_img_box {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}
.rv_lb_img_box img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}
.rv_lb_play_ico {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.rv_lb_prev,
.rv_lb_next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.rv_lb_prev {
  left: 12px;
}
.rv_lb_next {
  right: 12px;
}

/* ── 관리자 댓글 말풍선 ── */
.rv_admin_comment {
  position: relative;
  background: var(--primary-light);
  border-radius: 0 14px 14px 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.rv_card .rv_admin_comment {
  margin-bottom: 12px;
}
.rv_admin_comment::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 0px solid transparent;
  border-bottom: 10px solid var(--primary-light);
}
.rv_admin_comment_top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rv_admin_badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.rv_admin_date {
  font-size: 12px;
  color: #9ab4e8;
  margin-left: auto;
}
.rv_admin_txt {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  word-break: keep-all;
}

/* ── 리스트 페이지 레이아웃 보정 ── */
main.normal_b .nav .row .content.rv_page {
  height: auto;
  padding-bottom: 40px;
}

/* ================================================================
   rv_write_* — 후기 작성 페이지 (review-write.html)
   ================================================================ */

/* ── 작성 섹션 ── */
.rv_write_section {
  padding: 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.rv_write_section--last {
  border-bottom: none;
}
.rv_write_sec_ttl {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.rv_write_sec_sub {
  font-size: 12px;
  color: #bbb;
  margin-top: -6px;
  margin-bottom: 12px;
}
.rv_write_req {
  color: #e53e3e;
}

/* ── 인사 문구 ── */
.rv_write_greet {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  padding: 18px 16px 4px;
  background: #fff;
}

/* ── 라벨 ── */
.rv_write_label {
  font-size: 15px;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 14px;
}
.rv_write_label_sub {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  margin-left: 2px;
}

/* ── 차량 정보 카드 ── */
.rv_write_car_card {
  background: #f7f8fa;
  border-radius: 16px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rv_write_car_img {
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
}
.rv_write_car_info {
  width: 100%;
  text-align: left;
}
.rv_write_car_name {
  font-size: 17px;
  font-weight: 800;
  color: #111;
  margin-bottom: 4px;
}
.rv_write_car_trim {
  font-size: 13px;
  color: #999;
}

/* ── 별점 ── */
.rv_write_stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 2px;
}
.rv_write_stars input[type="radio"] {
  display: none;
}
.rv_write_stars label {
  cursor: pointer;
  line-height: 1;
}
.rv_write_stars label i {
  font-size: 32px;
  color: #e0e0e0;
  transition: color 0.12s;
}
.rv_write_stars input[type="radio"]:checked ~ label i,
.rv_write_stars label:hover i,
.rv_write_stars label:hover ~ label i {
  color: #ffc107;
}
.rv_write_star_hint {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 12px;
}

/* ── textarea ── */
.rv_write_textarea {
  width: 100%;
  min-height: 140px;
  resize: none;
  border: 1px solid #e7e8ec;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #3b3b3b;
  box-sizing: border-box;
  outline: none;
  line-height: 1.65;
}
.rv_write_textarea:focus {
  border-color: var(--primary);
}
.rv_write_char {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
}

/* ── 미디어 업로드 그리드 ── */
.rv_write_media_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.rv_write_upload_btn {
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 12px;
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.rv_write_upload_btn:hover {
  background: var(--primary-light);
}
.rv_write_upload_btn i {
  font-size: 20px;
  color: #9aa0aa;
}
.rv_write_upload_btn span {
  font-size: 12px;
  color: #9aa0aa;
  font-weight: 500;
}
.rv_write_thumb {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #eee;
}
.rv_write_thumb img,
.rv_write_thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rv_write_vid_over {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.rv_write_vid_over i {
  font-size: 22px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.rv_write_thumb_del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  padding: 0;
  font-size: 9px;
  line-height: 1;
}

/* ── 하단 고정 등록 버튼 ── */
.rv_write_fix_btn {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  z-index: 150;
}
.rv_write_submit {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

/* ── 리뷰 작성 레이블 간격 ── */
.rv_write_section .input_group label {
  margin-bottom: 14px;
}

/* ── 작성 페이지 레이아웃 보정 ── */
main.normal_b .nav .row .content.rv_write_page {
  height: auto;
  padding: 0 0 80px;
}
