/* K-ETA申請フォーム 追加スタイル
   ベースは現行本番から取得した bootstrap.min.css + style.css（/formstatic/css/）。
   ここには現行がページ内 <style> で持っていた分と、自前実装のJSが使う
   わずかな補助スタイル（オーバーレイ・エラー表示切替など）だけを置く。 */

/* ---------- フォント: サイト側（keta-travel.com）と統一 ---------- */
/* サイトは html{font-family:"Roboto",sans-serif}（wp-content/themes/keta/style.css）。
   サイト側の Roboto の Google Fonts <link> は rel="preload"（as属性・rel=stylesheet 無し）で
   実際には読み込まれておらず、描画はOSの sans-serif フォールバック
   （Mac=ヒラギノ / Win=Yu Gothic系 / Android=ローカルRoboto）になっている。
   同じ描画にするため、webフォントは読み込まずサイトと同一の指定だけを行う。
   ※このファイルは style.css（body に !important 指定あり）より後に読み込まれるため後勝ちで優先される */
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Noto Sans JP", sans-serif !important;
}
/* フォーム部品にも同じフォントを明示（bootstrap は inherit だが確実にするため） */
input, button, select, optgroup, textarea {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Noto Sans JP", sans-serif !important;
}

/* ---------- アクセシビリティ: WCAG AAの文字コントラスト ---------- */
/* ベースCSSの #f00 / #999 は白・薄橙背景上で4.5:1を下回るため、
   意味と見た目を保ったまま濃い色へ寄せる。 */
.form-note .font-red {
  color: #b00020 !important;
}
.label-required {
  color: #b00020 !important;
  border-color: #b00020 !important;
}
.label-confirm,
.label-not-required {
  color: #595959 !important;
  border-color: #595959 !important;
}
/* UNKNOWNチェックのラベルはPC計測時にbodyの濃灰背景が透けた扱いになったため、
   通常チェックボックスだけ背景を明示する（ボタン型ラジオは対象外）。 */
.form-check:not(.form-check-button) > .form-check-label {
  color: #212529;
  background-color: #fff;
}

/* ---------- 現行のページ内スタイル（step1）の移植 ---------- */
input[type='file'] { display: none; }

.filename {
  font-size: 1.4rem;
  color: #555;
  background: url(/formstatic/images/attachment.png) no-repeat 1px 50%;
  padding-left: 18px;
  margin-bottom: 20px;
}
/* ファイル未選択の間は現行と同じく .attachment を空（高さ0）にする */
.attachment .filename:empty { display: none; }

.modal-question {
  width: 20px;
  height: 20px;
  background-color: #2c5697;
  border-radius: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-question > img { height: 15px; }

.modal-wrapper {
  z-index: 999;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  padding: 50px 10px;
  text-align: center;
  padding-top: 0px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
/* 現行は :target 方式。自前JSがクラスで開く場合（.open）も同じ見た目にする */
.modal-wrapper:target,
.modal-wrapper.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s, visibility 0.4s;
}
.modal-wrapper::after {
  display: inline-block;
  height: 100%;
  margin-left: -0.05em;
  vertical-align: middle;
  content: '';
}
.modal-wrapper .modal-window {
  box-sizing: border-box;
  display: inline-block;
  z-index: 20;
  position: relative;
  top: 20px;
  width: 90%;
  max-width: 1000px;
  max-height: 100%;
  padding: 20px 20px 40px 40px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  vertical-align: middle;
}
@media screen and (max-width: 768px) {
  .modal-wrapper .modal-window {
    width: 85%;
    padding: 15px;
  }
}
.modal-wrapper .modal-window .modal-sentences {
  height: calc(100vh - 100px);
  overflow-y: auto;
  text-align: left;
  color: #333333;
}
.modal-overlay {
  z-index: 10;
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.8);
}
.modal-wrapper .modal-close {
  z-index: 20;
  position: absolute;
  top: 0;
  right: 20px;
  width: 65px;
  color: #95979c !important;
  font-size: 45px;
  font-weight: 300;
  line-height: 65px;
  text-align: center;
  text-decoration: none;
  text-indent: 0;
}
.modal-wrapper .modal-close:hover { color: #2b2e38 !important; }
.modal-btn-box {
  padding-top: 20px;
  padding-right: 15px;
  display: flex;
  justify-content: flex-end;
}
.modal-h4 {
  font-size: 1.8rem !important;
  font-weight: bold;
  border: none;
  padding-left: 0;
  margin: 20px 0;
  color: #000;
}
.modal-header { font-size: 2rem; }
.modal-text {
  font-size: 1.4rem;
  padding-right: 40px;
  margin-top: 0px !important;
}
.form-control.unknown {
  background-color: #e9ecef;
  opacity: 1;
}
.width-217 { width: 217px; }
@media (max-width: 1020px) {
  .modal-header { font-size: 1.6rem; }
  .modal-text {
    font-size: 1.6rem;
    padding-top: 10px;
    margin-top: 0px !important;
  }
  .modal-height { max-height: 100% !important; }
}

/* ---------- SP版のページ内スタイル（現行SP実HTMLの<style>を移植） ----------
   現行はPCとSPで別ページ・別のページ内CSSを持つ。上のモーダル等の値はPC版のもの。
   SP版ページ（body[data-platform="sp"]）ではSP実測値で上書きする。 */
body[data-platform="sp"] h3.form-header { color: #000; }
/* .form-submit{margin-top:50px} は現行でstep1/step2/confirmのSPだけが持つ
   ページ内スタイルのため、build.jsが該当ページの<head>に直接出力する */
body[data-platform="sp"] .modal-wrapper .modal-window {
  width: 70%;
  max-width: 600px;
  max-height: 550px;
  padding: 30px 30px 15px;
}
@media screen and (max-width: 768px) {
  body[data-platform="sp"] .modal-wrapper .modal-window {
    width: 85%;
    padding: 30px 20px 20px 20px;
  }
  body[data-platform="sp"] #step1_submit_btn { font-size: 1.4rem; }
}
body[data-platform="sp"] .modal-wrapper .modal-window .modal-sentences {
  height: auto;
  max-height: 500px;
}
body[data-platform="sp"] .modal-wrapper .modal-window .modal-sentences p span { font-size: 1.4rem; }
body[data-platform="sp"] .modal-wrapper .modal-close {
  right: 8px;
  width: 35px;
  font-size: 20px;
  font-weight: 700;
  line-height: 35px;
}
body[data-platform="sp"] .modal-btn-box {
  padding-right: 0;
  justify-content: center;
}
body[data-platform="sp"] .modal-header { font-size: 1.6rem; }
body[data-platform="sp"] .modal-text {
  font-size: 1.4rem;
  padding-right: 10px;
  padding-top: 0;
  margin-top: 20px !important;
}

/* SP: step2 同意チェックのチェックマーク補正。
   style.css の .checkmark:after（left:5px/top:0/7×14px/太さ3px/rotate40deg）は
   チェックが19.5pxの枠から上へはみ出し、実機では絵文字の☑️のように見える。
   ネイティブのチェックボックス（青い角丸枠に収まった白チェック）と同じく
   枠内に収まる細めのチェックにする。青背景#007bffはstyle.cssのまま */
body[data-platform="sp"] .agree-checkbox .checkmark:after {
  left: 6.5px;
  top: 2.5px;
  width: 6px;
  height: 11px;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- 自前実装のJSが使う補助 ---------- */
/* エラー文はJSが .show を付けて表示する（現行はjQueryの.show()＝inline style） */
.form-error.show { display: block; }

/* パスポート画像プレビュー（現行はcanvas。ここではimgで同じ見た目にする） */
#preview_box .thumb {
  max-width: 200px;
  margin-top: 10px;
  border: solid 1px #ddd;
}


/* 旅行会社電話番号の国番号ドロップダウン（現行と同じ国旗リスト方式）。
   本体のスタイルは style.css（.form-tel / .tel-country-list 等）にある。
   ※現行CSSのハイライトは name="tel_country" 向けで、本番でもこのリストには
   効いていない（実測）ため、あえて補わず本番と同じ見た目にする */
.tel_country_selected { cursor: pointer; }

/* 「滞在先 郵便番号」等の幅217px枠内の注記は折り返さない */
.width-217 .asterisk { white-space: nowrap; }

/* プログレスの完了済みステップ: チェックマーク画像(checked.png)を丸枠の中央に */
.page-nav-pc li.checked .page-nav-pc-num {
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-nav li.checked {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* SPは✓の描画が丸枠に対して少し上に見えるため、実機指摘に合わせて下へ補正 */
.page-nav li.checked img {
  position: relative;
  top: 2px;
}

/* 完了画面 */
.complete-box { text-align: center; padding: 30px 0; }
.complete-box .mark { font-size: 44px; color: #198754; }

/* 決済画面（第2弾の自作デザイン。ブランドアイコンのみ本物画像 pay01〜05.jpg） */
.payment-box {
  max-width: 420px;
  margin: 40px auto;
  /* 枠線はカードブランドタイルと同じ紺色 */
  border: solid 1px #ced4da;  /* カード番号入力欄と同色 */
  background: #fafafa;
  padding: 40px;
}
@media (max-width: 728px) {
  .payment-box { padding: 20px 16px 24px; margin: 24px auto; }
}
.payment-box .list-pay-type {
  max-width: 300px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 26px;
  padding: 0;
  list-style: none;
}
.payment-box .list-pay-type li { list-style: none; line-height: 0; }
/* SP: ブランドマーク列と「カード番号」ラベルの間隔。
   style.css の @media(max-width:768px) .list-pay-type{margin:auto !important} が
   上の margin-bottom:26px を0に潰して密着していたため、!importantで取り戻す */
body[data-platform="sp"] .payment-box .list-pay-type { margin: 0 auto 26px !important; }
/* 各ブランドロゴは紺色の枠に入れる（第2弾デザインの枠+本物のロゴ画像）。
   タイルは正方形にする。style.css がSPで img に margin-bottom 25px を
   !important 付きで当てて枠が縦長になるため、ここで margin を打ち消す */
.payment-box .list-pay-type li.brand-frame {
  border: solid 1px #ced4da;  /* カード番号入力欄と同色 */
  border-radius: 3px;
  background: #fff;
  padding: 4px;
}
.payment-box .list-pay-type li.brand-frame img {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
}
.pay-btn {
  display: block;
  width: 300px;
  margin: 14px auto 0;
  background-color: #dc003b;
  border-color: #dc003b;
  color: #fff;
  font-weight: bold;
  font-size: 1.8rem;
  padding: 12px;
}
.pay-btn:hover { background-color: #c00034; border-color: #c00034; color: #fff; }
@media (max-width: 728px) {
  .pay-btn { width: 100%; margin-left: 0; }
}
.card-field { margin-bottom: 16px; }
.card-field label {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 5px;
}
#card-element, #expiry-element, #cvc-element {
  padding: 11px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  height: 44px;
}
/* カード名義のplaceholderはStripe枠の「月/年」等と同じ薄いグレー */
#card-name::placeholder { color: #aab7c4; }
/* SP: フォーカス時にiOS Safariが自動ズームしないよう16px以上を明示
   （16px未満の入力欄にフォーカスするとページ全体が拡大される） */
body[data-platform="sp"] #card-name { font-size: 16px; }
/* 有効期限とセキュリティコードはSPでも横並び（本物の card-form-flex と同じ） */
.card-row { display: flex; gap: 12px; }
.card-row > div { flex: 1; }
#payment-error { color: #f00; font-size: 1.4rem; margin-top: 10px; min-height: 1em; }

/* セキュリティコードの「？」ヘルプ（本物の help-icon / tool-tip を移植。
   アイコンは下に申請料金の記載があるため薄いグレーで控えめにする） */
.help-icon-wrapper { position: relative; }
.help-icon {
  width: 16px;
  height: 16px;
  position: absolute;
  right: 10px;
  bottom: 14px;
  cursor: pointer;
}
.tool-tip {
  display: none;
  position: absolute;
  bottom: 40px;
  right: -7px;
  background-color: rgba(51, 51, 51, 0.9);
  color: #fff;
  width: 210px;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px;
  border-radius: 3px;
  z-index: 5;
  text-align: left;
}
.tool-tip:after {
  content: '';
  position: absolute;
  top: 100%;
  right: 18px;
  width: 0;
  border: 6px solid transparent;
  border-top-color: rgba(51, 51, 51, 0.9);
}
.help-icon:hover + .tool-tip,
.tool-tip.show { display: block; }
.payment-note-error { width: auto; max-width: 800px; }

/* ローディングオーバーレイ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .8);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.overlay.open { display: flex; }
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top-color: #dc1616;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* キーボード操作時のフォーカスを見えるようにする */
.btn:focus-visible,
.form-control:focus-visible {
  outline: 2px solid #2e80ff;
  outline-offset: 1px;
}

/* 申請状況確認: 申請ID欄（.status_input_input は .form-control ではないため
   Bootstrapのエラー表示が効かない）。他の項目と同じ赤枠＋✖印にし、
   エラー文は欄の直下に出す（欄の下マージン40pxを打ち消す）。2026-09-08 */
.status_input_input.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");
  background-repeat: no-repeat;
  background-position: center right 12px;
  background-size: 18px 18px;
}
.form-error[data-error-for="st_app_code"] { margin: -34px 0 28px 10px; }
@media (max-width: 768px) { .form-error[data-error-for="st_app_code"] { margin-left: 0; } }

/* 申請状況確認の見出し: SPのみ 2.2rem（PCは style.css の 2.8rem のまま）。2026-09-08 釘崎さん指示 */
@media (max-width: 768px) { .status-title { font-size: 2.2rem; } }

/* SPのステップ見出しを h3→h2 に変更（見出し階層の是正, 2026-09-14）。
   旧 h3 に効いていた style.css の .page-nav h3{margin-top:30px} 相当を維持する */
.page-nav h2.sp-ttl { margin-top: 30px; }
