/* 内見カレンダー（assets/js/viewing-calendar.js）と、
   エージェント側・買主側の内見パネルの共通スタイル。
   色の意味は仕様 §3 に合わせる。赤＝買主の希望／黄＝担当者対応可／緑＝選択中・確定。
   色だけで判断させないよう、各マスには文字も併記する。 */

.vcal { --vc-line: #e2e6ec; --vc-muted: #5b6470; font-size: 13px; }

.vcal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.vcal-range { font-weight: 700; }
.vcal-nav {
  border: 1px solid var(--vc-line);
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.vcal-nav:disabled { opacity: .4; cursor: default; }

/* 横幅の狭い端末では表だけ横スクロールさせる（ページ全体は横に伸ばさない）。 */
.vcal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.vcal-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  table-layout: fixed;
  user-select: none;
}
.vcal-table th, .vcal-table td {
  border: 1px solid var(--vc-line);
  text-align: center;
  padding: 0;
}
.vcal-time {
  width: 74px;
  font-size: 11px;
  font-weight: 600;
  color: var(--vc-muted);
  background: #fafbfc;
  padding: 4px 2px;
  line-height: 1.3;
}
.vcal-time span { display: block; font-weight: 400; }

.vcal-day { padding: 6px 2px; font-size: 12px; background: #fafbfc; }
.vcal-day__d { display: block; font-weight: 700; }
.vcal-day__w { display: block; font-size: 11px; color: var(--vc-muted); }
.vcal-day.is-sat .vcal-day__w, .vcal-day.is-sat .vcal-day__d { color: #2d6cdf; }
.vcal-day.is-sun .vcal-day__w, .vcal-day.is-sun .vcal-day__d,
.vcal-day.is-holiday .vcal-day__w, .vcal-day.is-holiday .vcal-day__d { color: #e8384f; }
.vcal-day.is-holiday { background: #fff5f6; }
.vcal-day.is-out { opacity: .45; }

.vcal-cell { height: 34px; background: #fff; position: relative; }
.vcal-cell.is-selectable { cursor: pointer; }
.vcal-cell.is-selectable:hover { background: #eef5ff; }
.vcal-cell.is-past { background: repeating-linear-gradient(45deg, #f4f5f7, #f4f5f7 4px, #eceef1 4px, #eceef1 8px); }
.vcal-cell.is-blocked { background: repeating-linear-gradient(45deg, #eceef1, #eceef1 4px, #e2e5ea 4px, #e2e5ea 8px); }
.vcal-cell.is-buyer  { background: #ffe8ea; }
.vcal-cell.is-agent  { background: #fff5d6; }
.vcal-cell.is-seller { background: #e2f6ea; }
.vcal-cell.is-confirmed { background: #e8384f; cursor: pointer; }
.vcal-cell.is-confirmed:hover { background: #d42a41; }

.vcal-cell__tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 34px;
  white-space: nowrap;
  overflow: hidden;
}
.vcal-cell.is-buyer  .vcal-cell__tag { color: #c2283c; }
.vcal-cell.is-agent  .vcal-cell__tag { color: #9a6d00; }
.vcal-cell.is-seller .vcal-cell__tag { color: #157a42; }
.vcal-cell.is-blocked .vcal-cell__tag { color: #7b828d; font-weight: 400; }
.vcal-cell.is-confirmed .vcal-cell__tag { color: #fff; }

.vcal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--vc-muted); }
.vcal-lg { display: inline-flex; align-items: center; gap: 5px; }
.vcal-lg::before {
  content: '';
  width: 12px; height: 12px;
  border: 1px solid var(--vc-line);
  border-radius: 3px;
}
.vcal-lg.is-buyer::before  { background: #ffe8ea; }
.vcal-lg.is-agent::before  { background: #fff5d6; }
.vcal-lg.is-seller::before { background: #e2f6ea; }
.vcal-lg.is-confirmed::before { background: #e8384f; }
.vcal-lg.is-blocked::before { background: repeating-linear-gradient(45deg, #eceef1, #eceef1 3px, #e2e5ea 3px, #e2e5ea 6px); }

/* ===== 選択した日時の一覧（カレンダー上部に出す） ===== */
.vcal-picked { margin-bottom: 10px; }
.vcal-picked__title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.vcal-picked__list { display: flex; flex-wrap: wrap; gap: 6px; }
.vcal-picked__item {
  font-size: 12px;
  border: 1px solid #f3b7bf;
  background: #ffe8ea;
  color: #a01526;
  border-radius: 999px;
  padding: 3px 10px;
}
.vcal-picked__empty { font-size: 12px; color: #5b6470; }

/* ===== 内見パネル（買主・エージェント共通の枠） ===== */
.vw-panel { font-size: 14px; }
.vw-panel__guide { font-size: 13px; color: #5b6470; margin: 0 0 10px; }
.vw-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 12px;
  background: #eef0f4;
  color: #4a5160;
  margin-bottom: 10px;
}
.vw-box {
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.vw-box--accent { border-color: #bcd9ff; background: #f5faff; }
.vw-box--warn { border-color: #ffd591; background: #fff7e6; }
.vw-box__title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.vw-dl { margin: 0; font-size: 13px; }
.vw-dl dt { font-weight: 600; color: #5b6470; }
.vw-dl dd { margin: 0 0 8px; }
.vw-pre { white-space: pre-wrap; word-break: break-word; }
.vw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vw-field { margin-bottom: 10px; }
.vw-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.vw-field textarea, .vw-field input[type="text"], .vw-field input[type="email"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #e2e6ec;
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: inherit;
}
.vw-hint { font-size: 12px; color: #5b6470; margin-top: 4px; }
.vw-fail { font-size: 12px; color: #a01526; }
/* 定休日の設定（エージェントの内見日程タブ） */
.vw-weekdays { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.vw-weekdays label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
