/* contact-form.css — form お問い合わせ, bố cục A (Phong chốt 06/11/2026): 1 cột giữa trang, mỗi ô 1 hàng.
   Chỉ trang /contact/ nạp file này, nạp SAU home-prototype.css (dùng chung, KHÔNG sửa) nên ghi đè được .cf__* cùng độ ưu tiên.
   Tương phản đã đo: #5A6B7C/trắng 5.5:1 · #66778A/trắng 4.6:1 · #B03224/#FDECEA 5.5:1 · #8E2A1F/#FDF1EF 7.6:1 (WCAG AA). */

/* Ô bẫy bot: đẩy ra ngoài màn hình (không dùng display:none — một số bot bỏ qua ô ẩn bằng display). */
.cf__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Khung 1 cột ------------------------------------------------------- */
.cform--single { display: block; max-width: 720px; margin: 0 auto; }
.cform__head .cform__title { margin-bottom: 8px; }
.cform__sub {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 40px;
  font-family: 'Noto Sans JP', sans-serif; font-size: 14px; line-height: 1.8; color: var(--muted);
}
.cform--single .cform__fields { gap: 32px; }
.cform__head[hidden], .cform__fields[hidden], .cf__done[hidden], .cf__summary[hidden] { display: none; }

/* --- Nhãn: 必須 nền hồng chữ đỏ đậm, 任意 chỉ là chữ xám ---------------- */
.cf__label { gap: 8px; }
.cf__req {
  padding: 4px 8px; border-radius: 3px; line-height: 1; letter-spacing: 0;
  color: #B03224; background: #FDECEA;
}
.cf__opt { padding: 0; line-height: 1; font-weight: 500; letter-spacing: 0; color: var(--muted); background: none; }

/* --- Ô nhập ------------------------------------------------------------ */
.cf__input, .cf__select, .cf__textarea {
  border-color: #C3CFDB;
  transition: border-color var(--dur-3, .25s), box-shadow var(--dur-3, .25s);
}
.cf__input, .cf__select { height: 56px; min-height: 56px; padding: 0 16px; }
.cf__textarea { min-height: 220px; padding: 14px 16px; line-height: 1.8; }
.cf__input::placeholder, .cf__textarea::placeholder { color: #66778A; opacity: 1; }
.cf__input:hover, .cf__select:hover, .cf__textarea:hover { border-color: #8FA3B7; }
.cf__input:focus, .cf__select:focus, .cf__textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 111, 179, .22);
}
.cf__input[aria-invalid="true"], .cf__select[aria-invalid="true"], .cf__textarea[aria-invalid="true"] {
  border-color: #C0392B; box-shadow: inset 0 0 0 1px #C0392B;
}
.cf__hint { color: var(--muted); }

/* Ô chọn: bỏ mũi tên mặc định của trình duyệt, đặt dấu ⌄ riêng (đây là ô chọn, không phải nút bấm). */
.cf__select-wrap { position: relative; }
.cf__select { padding-right: 48px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.cf__select-icon { position: absolute; right: 18px; top: 50%; margin-top: -6px; color: var(--navy); pointer-events: none; }

/* --- Lỗi theo ô: viền đỏ + 1 dòng chữ có biểu tượng, không tô nền hồng -- */
.cf__error {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Noto Sans JP', sans-serif; font-size: 14px; line-height: 1.7; font-weight: 700; color: #B03224;
}
.cf__error::before {
  content: ""; flex: 0 0 16px; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M8 4.5v4.2M8 11v.2' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M8 4.5v4.2M8 11v.2' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Đồng ý 個人情報: 1 dòng, cả dòng bấm được (cao ≥ 44px), ngăn với ô trên bằng 1 đường kẻ */
.cf__privacy { display: flex; flex-direction: column; gap: 6px; padding-top: 24px; border-top: 1px solid var(--line); }
.cf__check {
  align-items: center; gap: 12px; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif; font-size: 15px; line-height: 1.8; color: var(--ink);
}
.cf__check input { width: 22px; height: 22px; min-width: 22px; min-height: 22px; cursor: pointer; }
.cf__check input[aria-invalid="true"] { outline: 2px solid #C0392B; outline-offset: 2px; }
/* Điện thoại: câu đồng ý xuống 2 dòng thì flex bóp nhãn 必須 tới mức gãy 2 chữ dọc (đo 390px: 41×36). Giữ nhãn đủ rộng 1 dòng. */
.cf__check .cf__req { flex: none; white-space: nowrap; }

/* --- Hàng nút gửi: hộp tóm tắt lỗi / hộp trạng thái nằm ngay trên nút ---- */
.cf__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cf__summary, .cf__status {
  align-self: stretch; margin: 0; padding: 16px 20px; border: 1px solid #F1C4BE; border-radius: 6px; background: #FDF1EF;
  font-family: 'Noto Sans JP', sans-serif; font-size: 14px; line-height: 1.8; color: #8E2A1F;
}
.cf__summary-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.cf__summary ul { margin: 0; padding: 0 0 0 20px; }
.cf__summary a { display: inline-flex; align-items: center; min-height: 44px; color: #8E2A1F; text-decoration: underline; }
.cf__submit {
  width: 100%; max-width: 400px; height: 60px; padding: 0 32px; letter-spacing: .08em;
  transition: background var(--dur-3, .25s), border-color var(--dur-3, .25s);
}
.cf__submit:focus-visible { outline: 3px solid #F2B705; outline-offset: 3px; }
.cf__submit:disabled { cursor: progress; background: var(--muted); border-color: var(--muted); }

/* --- Đã gửi: thay chỗ form ------------------------------------------- */
.cf__done {
  display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 56px 48px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-strong);
}
.cf__done:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cf__done-mark { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); }
.cf__done-title { margin: 0; font-size: clamp(22px, 2.2vw, 26px); line-height: 1.5; font-weight: 700; color: var(--navy); }
.cf__done-text {
  margin: 0; max-width: 520px; font-family: 'Noto Sans JP', sans-serif; font-size: 16px; line-height: 2; color: var(--ink);
  word-break: auto-phrase; overflow-wrap: anywhere;
}
.cf__done-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 32px; margin-top: 8px; }
/* Link chữ gạch chân, KHÔNG mũi tên (quy chuẩn 06/11/2026: mọi chỗ bấm chỉ có chữ). */
.cf__done-links a {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700;
  color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--navy);
}
.cf__done-links a:hover { color: var(--blue); border-bottom-color: var(--blue); }

@media (max-width: 600px) {
  .cf__submit { max-width: none; }
  .cf__done { padding: 36px 20px; }
}
