/* ===========================================================
   Modal chung (contact form + 宿泊料金)
   =========================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
body.modal-open { overflow: hidden; }

.modal__box {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 60px);
  border: 1px solid #1F2937;
  border-radius: 2px;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.is-open .modal__box { transform: translateY(0); }
.modal__box--form {
  max-width: 700px;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url(../images/bg-modal.jpg) center/cover no-repeat;
}
.modal__box--price,
.modal__box--privacy {
  max-width: 1186px;
  background: linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.82)),
    url(../images/bg-modal-big.jpg) center/cover no-repeat;
}
.modal__scroll {
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
  /* scrollbar mảnh giống Figma (thumb 5px, bo tròn, #797979) — Firefox */
  scrollbar-width: thin;
  scrollbar-color: #797979 transparent;
}
/* WebKit (Chrome/Edge/Safari) */
.modal__scroll::-webkit-scrollbar { width: 5px; }
.modal__scroll::-webkit-scrollbar-track { background: transparent; }
.modal__scroll::-webkit-scrollbar-thumb {
  background: #797979;
  border-radius: 20px;
}
.modal__box--form .modal__scroll { padding: 32px; }
.modal__box--price .modal__scroll,
.modal__box--privacy .modal__scroll { padding: 56px 20px; }

/* nút X */
.modal__close {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 3;
  width: 36px; height: 36px;
  border: 0.5px solid var(--color-white);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.modal__close::before,
.modal__close::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 1px;
  background: var(--color-white);
}
.modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* tiêu đề modal (─ text ─) */
.modal__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.modal__title::before,
.modal__title::after {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--color-white);
}
.modal__title span {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.06em;
  color: var(--color-white);
}
/* tiêu đề trong modal 宿泊料金: Figma w700, SP 22px (PC 25px) */
.modal__box--price .modal__title span { font-weight: 700; font-size: 22px; }

/* ===========================================================
   Contact form
   =========================================================== */
.cform { display: flex; flex-direction: column; gap: 22px; margin-top: 50px; }  /* margin-top 50 = gap title→form (Figma) */
.cform__row { display: flex; flex-direction: column; gap: 6px; }
.cform__grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.cform__label {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--color-white);
}
.cform__label em { color: #DD0000; font-style: normal; margin-left: 3px; }
.cform input,
.cform select,
.cform textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(222, 222, 222, 0.2);
  border: 1px solid #374151;
  border-radius: 4px;
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.05em;
}
.cform input::placeholder,
.cform textarea::placeholder { color: #818181; }
.cform textarea { min-height: 110px; resize: vertical; }
.cform__select { position: relative; }
.cform__select::after {
  content: "▼";
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--color-white);
  pointer-events: none;
}
.cform select { appearance: none; -webkit-appearance: none; color: #818181; }
.cform__privacy {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  color: var(--color-white);
}
.cform__privacy a { text-decoration: underline; color: var(--color-white); }
.cform__agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.cform__agree input { width: 20px; height: 20px; accent-color: #374151; }
.cform__agree span {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--color-white);
}
.cform__agree em { color: #DD0000; font-style: normal; }
.cform__submit {
  align-self: center;
  margin-top: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}
.cform__submit::before,
.cform__submit::after { background: #FFE9E9; height: 32px; }
.cform__submit span { color: #FFE9E9; font-weight: 700; font-size: 18px; letter-spacing: 0.08em; }
.cform__submit:disabled { opacity: 0.5; cursor: default; }

/* ===========================================================
   Contact flow steps: 入力 → 確認 → 完了
   =========================================================== */
.cform-step[hidden] { display: none; }

/* note dưới tiêu đề (確認/完了) */
.cform__note,
.cform__thanks {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.9;
  text-align: center;
  color: var(--color-white);
}
.cform__thanks { margin-top: 36px; font-size: 15px; }

/* bảng xác nhận nội dung đã nhập */
.cform__summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 34px;
}
.cform__summary-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.22);
}
.cform__summary dt {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #C7C7C7;
}
.cform__summary dd {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.05em;
  line-height: 1.7;
  color: var(--color-white);
  word-break: break-word;
  white-space: pre-wrap; /* giữ xuống dòng của textarea */
}

/* lỗi gửi (hiện ở bước 確認) */
.cform__error {
  margin-top: 24px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  color: #FF8A8A;
}
.cform__error[hidden] { display: none; }

/* hàng nút 戻る / 送信する / 閉じる */
.cform__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}
.cform__actions .cform__submit { align-self: auto; margin-top: 0; }
.cform__back,
.cform__closebtn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}
.cform__back span,
.cform__closebtn span {
  color: var(--color-white);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.cform__back::before,
.cform__back::after,
.cform__closebtn::before,
.cform__closebtn::after { height: 32px; }

/* ===========================================================
   宿泊料金
   =========================================================== */
.price { display: flex; flex-direction: column; gap: 70px; }
.price__sec { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.price__subtitle {
  font-family: var(--font-serif);
  font-weight: 300;                   /* Figma: Light */
  font-size: 18px;                    /* Figma: 18px */
  letter-spacing: 0.04em;
  color: var(--color-white);
  margin-top: -18px;
  text-align: center;
}
/* subtitle 食事 "（宿泊料金に含む）": Figma w400 14px */
.price__subtitle--note { font-weight: 400; font-size: 14px; }
.price__zone,
.price__area { width: 100%; }
.price__zone + .price__zone { margin-top: 30px; }
.price__zone-name,
.price__area-name {
  font-family: var(--font-serif);
  font-size: 20px;                    /* Figma: ゾーン名 20px */
  letter-spacing: 0.03em;
  color: var(--color-white);
  padding-left: 12px;
  border-left: 1px solid var(--color-white);
  margin-bottom: 16px;
}
.price__area-name { font-weight: 600; font-size: 18px; }  /* Figma: エリア名 w600 18px */

/* tables */
.price__tablewrap { width: 100%; overflow-x: auto; }
.price__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}
.price__table th,
.price__table td {
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  padding: 13px 10px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--color-white);
  white-space: nowrap;
}
.price__table thead th { background: rgba(255, 255, 255, 0.12); font-weight: 500; }
.price__table tbody th { background: rgba(255, 255, 255, 0.06); font-weight: 400; }

.price__notes { width: 100%; }
.price__notes li {
  font-family: var(--font-serif);
  font-weight: 300;                   /* Figma: Light */
  font-size: 12px;                    /* Figma SP: 12px (PC 14px) */
  line-height: 1.9;
  color: var(--color-white);          /* Figma: #fff */
}

/* facility cards */
.price__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 0.5px solid rgba(255, 255, 255, 0.22);
  overflow: hidden; /* clip viền ngoài trái/phải/dưới, chỉ giữ đường kẻ bên trong */
}
.price__card {
  border-right: 0.5px solid rgba(255, 255, 255, 0.22);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.22);
  margin: 0 -0.5px -0.5px 0; /* đẩy viền cột cuối/hàng cuối ra ngoài để bị clip */
}
.price__card-h {
  background: rgba(255, 255, 255, 0.12);
  padding: 10px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--color-white);
}
.price__card-b {
  padding: 12px 12px 16px;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.7;
  color: #C7C7C7;
}
.price__area + .price__area { margin-top: 40px; }

.price__close { display: flex; justify-content: center; margin-top: 60px; }
.price__close .btn-bracket span { font-size: 18px; font-weight: 400; } /* Figma SP: 18px (PC 20px) */

/* ===========================================================
   プライバシーポリシー — Figma PC node 3371:126
   =========================================================== */
.privacy .modal__title { gap: 5px; margin-bottom: 0; }   /* Figma: 2 gạch "─ ─", gap 5px */
.privacy .modal__title::before,
.privacy .modal__title::after { width: 12px; }           /* Figma: dash 12px */

.privacy__lead {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 13px;                 /* SP; PC = 16px (Figma) */
  line-height: 1.9;
  color: var(--color-white);       /* Figma: #FFFFFF */
  margin-top: 31px;                /* Figma: gạch → lead 31px */
}

.privacy__sec { margin-top: 47px; }                    /* Figma: giữa các mục 47px */
.privacy__lead + .privacy__sec { margin-top: 67px; }   /* Figma: lead → mục đầu 67px */

/* tiêu đề mục: marker chữ nhật vàng + chữ đậm trắng */
.privacy__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;                 /* SP; PC = 20px (Figma) */
  color: var(--color-white);       /* Figma: #FFFFFF */
  margin-bottom: 10px;
}
.privacy__title::before {
  content: "";
  flex: none;
  width: 19px;
  height: 13px;
  background: #BDA054;             /* Figma: #BDA054, ~19.28×12.76 */
  clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%); /* hình bình hành nghiêng phải (CSS thuần) */
}

.privacy__body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 13px;                 /* SP; PC = 16px (Figma) */
  line-height: 1.9;
  color: var(--color-white);       /* Figma: #FFFFFF */
}

/* ===========================================================
   PC (≥1024px)
   =========================================================== */
@media (min-width: 1024px) {
  .modal__box--form .modal__scroll { padding: 32px; }  /* Figma: padding 32px */
  .modal__box--price .modal__scroll { padding: 70px 60px; }
  .modal__box--privacy .modal__scroll { padding: 70px 0; }  /* Figma: box padding 70px 0, nội dung tự canh giữa */

  /* プライバシー — Figma PC */
  .privacy { max-width: 897px; margin: 0 auto; }   /* Figma: nội dung rộng 897px canh giữa trong box 1186 */
  .privacy__lead,
  .privacy__body { font-size: 16px; }
  .privacy__title { font-size: 20px; }
  .privacy .price__close { margin-top: 90px; }      /* Figma: mục cuối → 閉じる 90px */
  .modal__title span { font-size: 25px; }                       /* Figma PC: 25px */
  .modal__box--price .modal__title span { font-size: 25px; }    /* Figma PC: 25px (w700) */

  .cform__grid { grid-template-columns: 1fr 1fr; }

  .price { gap: 90px; }
  .price__table { min-width: 0; }
  .price__table th, .price__table td { font-size: 18px; padding: 15px; }  /* Figma: 18px (header xác nhận từ ảnh; thân bảng đồng nhất) */
  .price__table thead th { font-weight: 400; }  /* Figma: header w400 (không đậm) */
  .price__notes li { font-size: 14px; }                         /* Figma PC: 14px */
  .price__close .btn-bracket span { font-size: 20px; }          /* Figma PC: 20px */
  .price__area--5 .price__cards { grid-template-columns: repeat(5, 1fr); }
  .price__area--4 .price__cards { grid-template-columns: repeat(4, 1fr); }
}
