/* ============================================================
   口コミ体験談ツール - フロントエンドCSS v1.0.0
   .rvt- スコープ（BEM命名）/ ミツケル配色（無彩色構造＋コーラル #E07B5A）
   ============================================================ */

.rvt-tool {
  --rvt-primary: #333333;   /* 構造色（枠線・ボタン・ドット）← ミツケル無彩色 */
  --rvt-good: #2F6E5A;      /* 良い口コミ ← cv-table --cvt-rt-good と同一 */
  --rvt-bad: #c0392b;
  --rvt-booking: #5b7fa4;
  --rvt-star: #E07B5A;      /* ★・評価分布バー ← コーラル統一 */
  --rvt-star-empty: #E5E5E5; /* 空の星 ← --cvt-frame-line と同一 */
  --rvt-text: #2c3e50;
  --rvt-text-sub: #7f8c8d;
  --rvt-border: #e8e8e8;
  --rvt-dash: #E5E5E5;       /* 点線区切り（旧 #B8E8EB ティール淡） */
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* ── サマリーブロック ── */
.rvt-summary {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1.5px solid var(--rvt-primary);
  overflow: hidden;
  margin-bottom: 20px;
}
.rvt-summary__header {
  padding: 14px 20px;
  border-bottom: 1px dashed var(--rvt-dash);
}
.rvt-summary__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--rvt-text);
  letter-spacing: 0.02em;
}
.rvt-summary__body {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
}
.rvt-summary__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 80px;
}
.rvt-summary__avg {
  font-size: 36px;
  font-weight: 700;
  color: var(--rvt-text);
  line-height: 1;
}
.rvt-summary__stars {
  display: flex;
  align-items: center;
  gap: 2px;
}
.rvt-summary__count {
  font-size: 12px;
  color: var(--rvt-text-sub);
  margin-left: 6px;
  white-space: nowrap;
}
.rvt-summary__dist { flex: 1; min-width: 0; }
.rvt-summary__dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.rvt-summary__dist-row:last-child { margin-bottom: 0; }
.rvt-summary__dist-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--rvt-text-sub);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.rvt-summary__dist-bar {
  flex: 1;
  height: 10px;
  background: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
}
.rvt-summary__dist-fill {
  height: 100%;
  background: var(--rvt-star);
  border-radius: 5px;
  transition: width 0.6s ease;
}
.rvt-summary__dist-pct {
  font-size: 12px;
  color: var(--rvt-text-sub);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ── リスト表示 ── */
.rvt-list .rvt-card { margin-bottom: 16px; }
.rvt-list .rvt-card:last-child { margin-bottom: 0; }

/* ── もっと見るボタン ── */
.rvt-more-wrap { text-align: center; margin-top: 20px; }
.rvt-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rvt-primary);
  background: #fff;
  border: 1.5px solid var(--rvt-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.rvt-more-btn:hover {
  background: var(--rvt-primary);
  color: #fff;
}
.rvt-more-btn svg { transition: transform 0.3s; }
.rvt-more-btn.is-open svg { transform: rotate(180deg); }

/* 折りたたみカード */
.rvt-card--hidden { display: none; }
.rvt-card--reveal {
  display: block;
  animation: rvtSlideIn 0.4s ease;
}
@keyframes rvtSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── カード内ヘッダーバー ── */
.rvt-card__header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px dashed var(--rvt-dash);
}
.rvt-card__header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--rvt-text);
  margin: 0;
  letter-spacing: 0.02em;
}
.rvt-card__header-count {
  font-size: 12px;
  color: var(--rvt-text-sub);
  margin-left: auto;
  white-space: nowrap;
}

/* ── カルーセル ── */
.rvt-carousel {
  position: relative;
}
.rvt-carousel__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.rvt-carousel__track::-webkit-scrollbar {
  display: none;
}

/* 矢印 */
.rvt-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--rvt-border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: box-shadow 0.2s, opacity 0.2s;
  color: var(--rvt-text);
  font-size: 16px;
  padding: 0;
}
.rvt-carousel__arrow:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.rvt-carousel__arrow--prev { left: -18px; }
.rvt-carousel__arrow--next { right: -18px; }
.rvt-carousel__arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}

/* ドットナビ */
.rvt-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.rvt-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rvt-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.rvt-carousel__dot.is-active {
  background: var(--rvt-primary);
  transform: scale(1.2);
}

/* ── カード ── */
.rvt-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1.5px solid var(--rvt-primary);
  scroll-snap-align: start;
  flex: 0 0 100%;
  min-width: 0;
}
/* 1件のみ（カルーセルなし） */
.rvt-tool > .rvt-card {
  margin-bottom: 20px;
}

/* ── 写真エリア ── */
.rvt-card__photos {
  display: flex;
  background: #f0f0f0;
  height: 100px;
  overflow: hidden;
}
.rvt-card__photo {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  touch-action: manipulation;
}
.rvt-card__photo + .rvt-card__photo {
  border-left: 2px solid #fff;
}
.rvt-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.rvt-card__photo:hover img {
  transform: scale(1.08);
}
.rvt-card--no-photo .rvt-card__photos {
  display: none;
}

/* ── カードヘッダー ── */
.rvt-card__head {
  padding: 20px 20px 16px;
  border-bottom: 1px dashed var(--rvt-dash);
}
.rvt-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.rvt-card__stars {
  display: flex;
  gap: 1px;
}
.rvt-tool svg.star-icon {
  width: 17px;
  height: 17px;
  display: block;
}
.rvt-card__rating-num {
  font-size: 21px;
  font-weight: 700;
  color: var(--rvt-text);
  line-height: 1;
}
/* ── 投稿者 ── */
.rvt-card__author {
  font-size: 13px;
  font-weight: 600;
  color: var(--rvt-text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* ── 詳細タグ ── */
.rvt-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rvt-card__tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  background: #f5f5f5;
  color: #555;
  border: 1px solid #eee;
  line-height: 1.4;
}

/* ── カードボディ ── */
.rvt-card__body {
  padding: 16px 20px 20px;
}
.rvt-card__section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  padding-left: 13px;
  position: relative;
  border-bottom: 1px dashed var(--rvt-dash);
}
.rvt-card__section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.rvt-card__section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
}
.rvt-card__section--good::before  { background: var(--rvt-good); }
.rvt-card__section--bad::before   { background: var(--rvt-bad); }
.rvt-card__section--booking::before { background: var(--rvt-booking); }

.rvt-card__section-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.rvt-card__section--good .rvt-card__section-label  { color: var(--rvt-good); }
.rvt-card__section--bad .rvt-card__section-label    { color: var(--rvt-bad); }
.rvt-card__section--booking .rvt-card__section-label { color: var(--rvt-booking); }

.rvt-card__section-text {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* ── モーダルギャラリー ── */
.rvt-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rvt-modal.is-active {
  display: flex;
}
.rvt-modal__inner {
  position: relative;
  max-width: min(600px, 90vw);
  width: 100%;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rvt-modal__viewport {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  background: #f5f5f5;
}
.rvt-modal__slide {
  width: 100%;
  display: block;
}
.rvt-modal__slide--hidden {
  display: none;
}
@keyframes rvtFadeIn { from { opacity: .3 } to { opacity: 1 } }
.rvt-modal__slide:not(.rvt-modal__slide--hidden) {
  animation: rvtFadeIn .25s ease;
}
.rvt-modal__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
  position: relative;
}
.rvt-modal__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.rvt-modal__arrow {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.2s;
  line-height: 1;
}
.rvt-modal__arrow:hover { background: #f0f0f0; }
.rvt-modal__counter {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  min-width: 48px;
  text-align: center;
  letter-spacing: 0.05em;
}
.rvt-modal__close {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  line-height: 1;
  transition: background 0.2s;
}
.rvt-modal__close:hover { background: #eee; }
.rvt-modal__thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px 14px;
  flex-shrink: 0;
}
.rvt-modal__thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.45;
  transition: all 0.2s;
}
.rvt-modal__thumb.is-active {
  border-color: var(--rvt-primary);
  opacity: 1;
}
.rvt-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── モバイル ── */
@media (max-width: 600px) {
  .rvt-summary__header { padding: 12px 16px; }
  .rvt-summary__title { font-size: 14px; }
  .rvt-summary__body { flex-direction: column; gap: 16px; padding: 16px; }
  .rvt-summary__score { flex-direction: row; gap: 12px; }
  .rvt-summary__avg { font-size: 30px; }
  .rvt-summary__dist { width: 100%; }
  .rvt-more-btn { padding: 10px 24px; font-size: 13px; }
  .rvt-card__header-bar { padding: 12px 16px; }
  .rvt-card__header-title { font-size: 14px; }
  .rvt-card__photos { height: 80px; }
  .rvt-card__head { padding: 16px 16px 12px; }
  .rvt-card__body { padding: 12px 16px 16px; }
  .rvt-card__rating-num { font-size: 18px; }
  .rvt-card__section-text { font-size: 13px; }
  .rvt-card__tag { font-size: 10px; padding: 2px 8px; }
  .rvt-card__author { font-size: 12px; }
  .rvt-tool svg.star-icon { width: 15px; height: 15px; }
  .rvt-carousel__arrow--prev { left: -6px; }
  .rvt-carousel__arrow--next { right: -6px; }
  .rvt-carousel__arrow { width: 32px; height: 32px; font-size: 14px; }
  .rvt-modal__inner { max-width: 95vw; }
  .rvt-modal__controls { padding: 8px 12px; }
  .rvt-modal__arrow { width: 28px; height: 28px; font-size: 16px; }
  .rvt-modal__close { width: 28px; height: 28px; font-size: 14px; left: 12px; }
  .rvt-modal__counter { font-size: 11px; min-width: 40px; }
  .rvt-modal__thumbs { gap: 6px; padding: 4px 12px 10px; }
  .rvt-modal__thumb { width: 40px; height: 40px; }
}
