 /* ============================================================
   Review post form (public side)
   /assets/review-form.css

   Used by: /templates/therapist-review-post.php
   URL: /therapist/{id}/review/post/
   Colors follow the public theme via --gold variables.
   ============================================================ */


/* ============================================================
   投稿セクション（アコーディオン用ラッパー）
   ============================================================ */

.form_wapper{
    padding: 16px 0;
    overflow: hidden;
}

/* トグルボタン（ログイン時：開閉） */
.rv-post__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gold, #c9a86c);
  border-radius: 10px;
  background: transparent;
  color: var(--gold, #c9a86c);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

.rv-post__toggle:hover {
  background: rgba(201, 168, 108, .08);
}


/* 未ログイン時の誘導リンク */
.rv-post__login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gold, #c9a86c);
  border-radius: 10px;
  background: transparent;
  color: var(--gold, #c9a86c);
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  box-sizing: border-box;
}

.rv-post__login:hover {
  background: rgba(201, 168, 108, .08);
}


/* アコーディオン本体（初期は閉じる） */
.rv-post__panel {
  display: none;
  margin-top: 14px;
}

.rv-post.is-open .rv-post__panel {
  display: block;
}

.rv-post.is-open .rv-post__toggle {
  display: none;
}


/* 投稿完了メッセージ（成功後にフォームと差し替え） */
.rv-post__done {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--gold, #c9a86c);
  border-radius: 10px;
  background: rgba(201, 168, 108, .06);
  font-size: 14px;
  line-height: 1.6;
}

.rv-post.is-done .rv-post__done {
  display: flex;
}

.rv-post.is-done .rv-post__panel {
  display: none;
}

.rv-post.is-done .rv-post__toggle {
  display: none;
}

.rv-post__done i {
  color: var(--gold, #c9a86c);
  font-size: 20px;
  flex: 0 0 auto;
}


/* テンプレート挿入ボタン */
.rv-tmpl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 50%;
  margin: 0 0 8px;
  padding: 10px 12px;
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--gold);
  color: var(--bg-base);
  border: 0.5px solid var(--gold-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.rv-tmpl-btn:hover {
  opacity: 0.7;
}


/* ============================================================
   フォーム
   ============================================================ */
.rv-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0; /* 子のdate入力が親を押し広げないように */
}

.rv-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
  min-width: 0; /* flexアイテムのmin-width:auto解除＝はみ出し防止 */
}

.rv-field__label {
  font-size: 1.3rem;
  font-weight: bold;
}

.rv-req {
  font-size: 1.1rem;
  color: #e0506a;
  margin-left: 4px;
}


/* 入力欄 */
.rv-input,
.rv-textarea {
  width: 100%;
  max-width: 100%; /* date入力の内在幅でも親を超えない */
  min-width: 0;
  padding: 11px 13px;
  background: var(--ap-panel-dwn);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-radius);
  font-size: 1.4rem;
  color: var(--text-primary);
  font-family: inherit;
  box-sizing: border-box;
}

.rv-textarea {
  resize: vertical;
}

.rv-input:focus,
.rv-textarea:focus {
  outline: none;
  border-color: var(--gold, #c9a86c);
}




/* 星0.5刻みピッカー */
.rv-stars {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.rv-star {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
}

.rv-star__icon {
  font-size: 28px;
  color: var(--gold, #c9a86c);
  line-height: 32px;
  pointer-events: none;
}

.rv-star__half {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 2;
}

.rv-star__half--l {
  left: 0;
}

.rv-star__half--r {
  right: 0;
}

.rv-stars__value {
  margin-left: 10px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--gold, #c9a86c);
}


/* チェックボックス・注記 */
.rv-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.rv-form__note {
  font-size: 1.2rem;
  color: var(--shop-text-dim);
}

.rv-form__sumit_flex{
  display: flex;
  justify-content: space-between;
  align-items: center;
    gap: 10px;
    margin-top: 4px;
}

/* ── 匿名トグルスイッチ ── */
.rv-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* space-between → flex-start（左寄せ） */
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.rv-toggle__text {
    font-size: 1.4rem;
    color: var(--text-primary);
}

/* 実体のcheckboxは隠す（アクセシビリティのため残す） */
.rv-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* トラック（背景の溝） */
.rv-toggle__track {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: var(--bg-surface, #1a1510);
    border: 1px solid var(--gold-border, rgba(201, 168, 108, .3));
    transition: background .2s, border-color .2s;
}

/* つまみ */
.rv-toggle__thumb {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #888;
    transform: translateY(-50%);
    transition: transform .2s, background .2s;
}

/* ON状態（チェック時）：ゴールドに点灯＋つまみ右へ */
.rv-toggle__input:checked + .rv-toggle__track {
    background: linear-gradient(135deg, #a577e0 0%, #8a5cd8 55%, #7048c0 100%);
    border-color: #8a5cd8;
}

.rv-toggle__input:checked + .rv-toggle__track .rv-toggle__thumb {
    background: #fff;
    transform: translateY(-50%) translateX(22px);
}

.rv-toggle__input:focus-visible + .rv-toggle__track {
    box-shadow: 0 0 0 3px rgba(138, 92, 216, .3);
}
/* フォーム内エラーメッセージ */
.rv-form__msg {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.rv-form__msg.is-error {
  display: block;
  background: rgba(224, 80, 106, .08);
  border: 1px solid #e0506a;
  color: #e0506a;
}
/* キャンセルボタン */
.sumit_can{
    flex: 0 0 30%;
    background: var(--ap-panel-dwn);
    border: 0.5px solid var(--gold-border);
    border-radius: var(--ap-radius, 8px);
    color: var(--shop-text-dim);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, background 0.15s;
}
.sumit_can:hover {
    background: var(--gold-pale);
    color: var(--gold);
}
/* 送信ボタン */
.rv-submit {
    flex: 1;
    display: inline-flex;
    align-items: center;
    border-radius: var(--ap-radius, 8px);
    justify-content: center;
    gap: 6px;
    padding: 14px;
    margin: 0 auto;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: 0.5px solid transparent;  /* ← border:0 から変更 */
    background: linear-gradient(to bottom, #AD7EDB 0%, #8A5DB7 75%, #7F51AC 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(138, 92, 216, .35);
    transition: filter 0.15s, background 0.15s;
}

.rv-submit:hover {
  filter: brightness(1.05);
}

.rv-submit:disabled {
  opacity: .5;
  cursor: default;
}


/* ============================================================
   投稿セクション：見出し・上余白・アンカー位置補正
   ============================================================ */
.rv-post {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gold-border, rgba(201, 168, 108, .2));
  /* 固定ヘッダーに隠れないようアンカー着地点を下げる */
  scroll-margin-top: 90px;
}

.rv-post__heading {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 16px;
}

/* 口コミ投稿フォーム：アンカー着地時にヘッダー分ずらす */
#rvPost {
  scroll-margin-top: 280px;
}


/* ============================================================
   口コミ投稿モーダル
   （他ページの .mp-modal と同スタイルをコピー）
   review-form.css は公開ページ用で member CSS を読まないため独立定義
   ============================================================ */
body.rv-modal-open {
  overflow: hidden;
}

.rv-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow-y: auto;
  overflow-x: hidden; /* 横方向のはみ出しスクロールを殺す */
}

.rv-modal.is-open {
  display: flex;
}

.rv-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.rv-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  margin: auto;
  background: var(--bg-base, #14110d);
  border: 1px solid var(--gold-border, rgba(201, 168, 108, .3));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}


/* ヘッダー */
.rv-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--gold-border, rgba(201, 168, 108, .3));
  background: var(--bg-surface, #1a1510);
  position: sticky;
  top: 0;
  z-index: 1;
}

.rv-modal__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-primary, #fff);
  margin: 0;
}

.rv-modal__title .bi {
  color: var(--gold, #c9a86c);
}

.rv-modal__close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 0.5px solid var(--gold-border, rgba(201, 168, 108, .3));
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary, #fff);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.rv-modal__close:hover {
  color: var(--gold, #c9a86c);
  border-color: var(--gold, #c9a86c);
}


/* ボディ */
.rv-modal__body {
  padding: 18px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden; /* 念のため横はみ出し抑止 */
}


/* モーダル上部 セラピスト情報 */
.rv-modal__thera {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--ap-line);
    overflow: hidden;
}

.rv-modal__thera-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
}

.rv-modal__thera-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rv-modal__thera-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rv-modal__thera-age {
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 400;
  margin-left: 2px;
}

.rv-modal__thera-spec {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.rv-modal__thera-shop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.2rem;
    color: var(--shop-text-dim);
}


/* 投稿完了メッセージ（モーダル内表示用） */
.rv-modal__done {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--gold, #c9a86c);
  border-radius: 10px;
  background: rgba(201, 168, 108, .06);
  font-size: 1.4rem;
  line-height: 1.6;
}

.rv-modal__done i {
  color: var(--gold, #c9a86c);
  font-size: 20px;
  flex: 0 0 auto;
}


/* ===== 投稿トリガーボタン（ログイン時・アメジスト紫） ===== */
.rv-post__open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #a577e0 0%, #8a5cd8 55%, #7048c0 100%);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(138, 92, 216, .4);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.rv-post__open:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(138, 92, 216, .55);
}

.rv-post__open:active {
  transform: translateY(0);
}

.rv-post__open .bi {
  font-size: 18px;
}


/* ============================================================
   スマホ（〜767px）
   ============================================================ */
@media (max-width: 767px) {
  .rv-tmpl-btn{
    width: 100%;
    margin: 0;
  }
    .rv-form__sumit_flex {
        flex-direction: column-reverse;  /* column → column-reverse */
        align-items: stretch;
    }
  .rv-modal {
    padding: 0;
  }
  .rv-field__label {
    font-size: 1.2rem;
  }
  .rv-modal__dialog {
    max-width: none;
    min-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .rv-modal__body {
    max-height: calc(100vh - 60px);
  }
  .sumit_can{
    font-size: 1.3rem;
  }
  .rv-submit {
    font-size: 1.3rem;
    width: 100%;
  }

  .rv-post__open {
    font-size: 1.4rem;
  }
}

/* visit month: select and locked display */
.rv-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23c9a86c' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 34px;
  cursor: pointer;
}

.rv-visit-fixed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0.5px solid var(--gold-border);
  border-radius: 8px;
  background: rgba(201, 168, 108, .06);
  font-size: 1.4rem;
  color: var(--text-primary);
}

.rv-visit-fixed .bi {
  color: var(--gold, #c9a86c);
  font-size: 1.3rem;
}

.rv-visit-fixed__val {
  font-weight: 600;
}

.rv-visit-fixed__note {
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--shop-text-dim);
}

.rv-field__hint {
  margin-top: 6px;
  font-size: 1.2rem;
  color: #e0506a;
}
