
/* 背景画像 */
body {
    background-image: url('../../img/background-image_pc.jpg'); /* PC用画像のパスを指定 */
    background-size: cover; /* 画像が要素全体を覆うように拡大・縮小 */
    background-position: center center; /* 画像を中央に配置 */
    background-repeat: no-repeat; /* 画像の繰り返しなし */
    background-attachment: scroll; /* ページをスクロールしても背景画像を固定 */
}

/* デフォルトのフォーム上下のパディング削除 */
.wp-block-group {
 margin-top: 0px !important;
 padding-top: 0px !important;
 padding-bottom: 0px !important;
}
:root {
  --wp--style--global--content-size: none !important;
}

/* タイトル */
.wp-block-post-title {
  /* display: none; */
  display: flex;
  justify-content: center;

}

/* ------------ 入力フォーム ------------ */
/* フォーム全体のスタイル調整（必要に応じて） */
#casual-entry-form {
    max-width: 900px;
    margin: 20px auto;
    padding: 30px 25px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* フォーム冒頭の案内文 */
.casual-form-lead {
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.casual-form-lead p,
.casual-form-lead__text {
    display: block !important;
    margin: 0;
}

/* 希望日程の補足注記 */
.casual-schedule-note {
    margin: 0 0 10px 0;
    font-size: 12.5px;
    color: #555;
    line-height: 1.5;
}

/* 各フォーム行のスタイル */
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

/* ラベルエリア */
.label-area {
    display: flex;
    align-items: center;
    margin-right: 15px;
    width: 130px;
    flex-shrink: 0;
}

/* 「必須」ラベル */
.label-required {
    background-color: rgb(var(--ses-main-color));
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 「任意」ラベル */
.label-optional {
    background-color: #666666;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 項目名テキスト */
.label-text {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

/* 入力フォーム */
.input-area {
    flex-grow: 1;
    min-width: 200px;
}


/* プライバシーポリシーチェックボックス */
.priv-pol-chk {
  width: 100%;
  font-size: small;
  margin-bottom: 17px;
}

/* リキャプチャ */
/* .re-captcha-item {
  justify-content: center; 
  margin-bottom: 25px;
}

.error-g-recaptcha {
  margin-left: 0;
  text-align: center;
} */

/* 送信ボタン */
.submit-button-area {
    display: flex;
    justify-content: center; 
}
.entry-submit-button {
    font-weight: bold;      /* テキストを太字にする */
    color: #fff;            /* 文字色を白にする */
    background-color: rgb(var(--ses-main-color)); /* 「必須」ラベルと同じ背景色 */
    border: 1px solid rgb(var(--ses-main-color)); /* ボーダー色 */
    padding: 10px 20px;   /* 内側の余白 */
    border-radius: 28px;     /* 角丸（任意で調整してください） */
    cursor: pointer;        /* マウスカーソルをポインターに */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; /* トランジション */
}
/* マウスオーバー時のスタイル */
.entry-submit-button:hover {
    background-color: #fff !important; /* ホバー時の背景色を白に */
    color: rgb(var(--ses-main-color)); /* ホバー時の文字色をメインカラーに */
    border-color: rgb(var(--ses-main-color)); /* ホバー時のボーダー色をメインカラーに */
}

/* プライバシーポリシー */
.priv-pol {
    display: flex;
    justify-content: center;
    font-size: small;
    opacity: 0.8;
    text-decoration: none !important;
    outline:none;
}

.ui-datepicker-calendar .specific-disabled a {
    background-color: #fdd !important; /* 例: 薄い赤 */
    color: #888 !important; /* 例: 灰色 */
    cursor: default !important; /* カーソルをデフォルトにする */
}
.ui-datepicker-calendar .specific-disabled {
    opacity: 0.6; /* 少し透明にする */
}

@media (min-width: 599px) {
  
  .label-area.label-fixed-width {
      width: 190px; 
      margin-right: 20px; 
      flex-shrink: 0;
  }
  
  .input-area {
      flex-grow: 0;    
      flex-shrink: 0;  
      width: 400px;    
      margin-left: 0;  
      min-width: unset;
  }

  .input-area textarea,
  .input-area input[type="text"],
  .input-area input[type="email"],
  .input-area input[type="tel"],
  .input-area select {
      width: 100%;      /* 親要素である .input-area の幅 (上記例では400px) に合わせます */
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
  }

}
.input-area textarea,
.input-area input[type="text"],
.input-area input[type="email"],
.input-area input[type="tel"],
.input-area select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* エラーメッセージ */
.error-message {
    width: 100%;
    margin-left: 210px;
    font-size: 12px;
    color: red;
    padding-top: 3px;
    min-height: 1.2em;
}

.priv-pol-chk-err {
  margin-left: 0;
}



/* 送信ボタンの行 */
.submit-button-row {
    justify-content: center;
    margin-top: 20px;
}

#submit-button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#submit-button:hover {
    background-color: #0056b3;
}

/* バリデーション結果メッセージのスタイル */
#form-validation-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

#form-validation-message.success {
    color: #155724; /* 成功時：濃い緑の文字 */
}

#form-validation-message.error {
    color: #721c24; /* エラー時：濃い赤の文字 */
}

/* タイトルフォント指定 */
:root :where(.is-layout-constrained)> :first-child {
  font-family: Noto Sans JP;
}

/* ------------ 希望日程 ------------ */

.ui-datepicker {
  width: 250px !important;
  font-size: 16px;
}

/* 第１〜第３希望 */
.schedule-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.schedule-flex > div:first-child {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 65px;
  margin-right: 10px;
}

.schedule-inputs,
.schedule-flex .input-area.schedule-inputs {
  width: 175px;
  min-width: 120px;
  flex: 0 1 175px;
  margin-right: 10px;
}

.schedule-flex .error-message-container {
  width: 100%;
  padding-left: 75px;
}

.schedule-inputs select,
.interview-preference-form select {
  font-size: 14px;
}

/* 希望日程セクションのタイトル行用（オプション） */
.section-title-row {
    margin-bottom: 20px; /* タイトルと希望日時の間にスペース */
}
.section-title-row .label-area.no-indent {
    width: auto; /* 幅を自動に */
    margin-right: 0;
    /* label-area の flex-shrink: 0; が効いているため、100%幅にする必要がない */
}
.section-title-row .label-area .label-text {
    /* 必須ラベルと希望日程タイトルが横並びになるように調整 */
    display: flex;
    align-items: center;
}
.section-title-row .label-area .label-required,
.section-title-row .label-area .label-optional {
    margin-right: 10px; /* 必須ラベルとテキストの間のスペース */
}


/* 希望日程の全体コンテナをグリッドにする */
.schedule-grid-container {
    display: grid;
    /* 1列目: ラベル（第1希望など）、2列目: 日付、3列目: 時間、4列目: その他時間 */
    /* 各列の幅を自動調整しつつ、最小幅を確保する */
    grid-template-columns: minmax(100px, 130px) minmax(150px, 1fr) minmax(100px, 0.8fr) minmax(150px, 1.2fr);
    gap: 15px 10px; /* 行間と列間の隙間 */
    align-items: start; /* 各行の要素を上揃えにする */
    margin-bottom: 15px; /* 全体の下のマージン */
}

/* 各希望（第2希望、第3希望）の行のアイテム */
.schedule-grid-item {
    display: contents; /* 子要素が直接グリッドアイテムになるように */
}

/* 各希望のラベルエリア */
.schedule-grid-item .label-area {
    width: auto; /* グリッドの列幅に合わせる */
    margin-right: 0; /* flexのmargin-rightは不要 */
    padding-top: 10px; /* 入力欄と上端を揃えるための微調整 */
    padding-bottom: 5px; /* エラーメッセージと下のマージン */
    align-items: center; /* ラベルテキストが中央に来るように */
}
.schedule-label-text {
    font-weight: normal; /* 太字にしない */
    font-size: 14px; /* 通常のサイズに */
    margin-right: 0;
    white-space: nowrap;
}

/* 各希望の入力エリア */
.schedule-grid-item .input-area.schedule-inputs {
    display: contents; /* 子要素をグリッドアイテムとして直接配置 */
}

/* 各入力フィールド（日付、時間、その他時間） */
.schedule-grid-item .input-area.schedule-inputs .datepicker,
.schedule-grid-item .input-area.schedule-inputs .time-select,
.schedule-grid-item .input-area.schedule-inputs .other-time-input {
    width: 100%; /* グリッドの列幅いっぱいに */
    flex-grow: unset; /* flex-growはグリッドでは不要 */
    min-width: unset; /* グリッドの minmax() で制御するため不要 */
    margin-bottom: 0; /* マージンはgrid-gapで制御 */
    padding: 8px 10px; /* パディングを調整して高さを揃える */
}

/* エラーメッセージコンテナのスタイル */
.schedule-grid-item .error-message-container {
    padding-left: 0; /* インデントは不要 */
    gap: 10px; /* 複数のエラーメッセージがある場合の隙間 */
    flex-wrap: wrap; /* エラーメッセージが多い場合に折り返す */
}
.schedule-grid-item .error-message-container .error-message {
    width: auto; /* エラーメッセージ自体の幅は自動 */
    margin-left: 0; /* リセット */
    flex-shrink: 0; /* 縮まないように */
}

.error-message-container {
    padding-left: 0; /* インデントは不要 */
    display: flex; /* エラーメッセージを横並びにしてもいいようにflex */
    gap: 10px; /* 複数のエラーメッセージがある場合の隙間 */
    flex-wrap: wrap; /* エラーメッセージが多い場合に折り返す */
}

.error-message-container .error-message {
    width: auto; /* エラーメッセージ自体の幅は自動 */
    margin-left: 0; /* リセット */
    flex-shrink: 0; /* 縮まないように */
}

.flex-start {
  align-items: flex-start;
}

.schedule-item {
  width: calc(100% - 210px);
}

/* ------------ スマートフォン表示用　------------ */
@media (max-width: 599.98px) {
  /* 背景画像 */
  body {
    background-image: url('../../img/background-image_sp.jpg'); /* PC用画像のパスを指定 */
    background-size: cover; /* 画像が要素全体を覆うように拡大・縮小 */
    background-position: center center; /* 画像を中央に配置 */
    background-repeat: no-repeat; /* 画像の繰り返しなし */
    background-attachment: scroll; /* ページをスクロールしても背景画像を固定 */
  }

  /* ------------ 入力フォーム ------------ */
  /* ラベルエリア */
  .label-area {
      width: 100%;
      margin-right: 0;
      margin-bottom: 5px;
  }
  /* エラーメッセージ */
  .error-message {
      margin-left: 0;
  }
  /* 実施方法 */
  .interview-preference-form select {
      width: 100%;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
  }
  /* ------------ 希望日程 ------------ */
      .schedule-grid-container {
        grid-template-columns: 1fr; /* 1列にする */
        gap: 0; /* グリッドのギャップをリセット */
    }
    .schedule-grid-item {
        display: block; /* 各希望の項目を縦積みに */
        margin-bottom: 15px; /* 各希望の項目間にスペース */
    }
    .schedule-grid-item .label-area {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px; /* ラベルと入力欄の間にスペース */
        padding-top: 0; /* リセット */
        padding-bottom: 0; /* リセット */
    }
    .schedule-grid-item .input-area.schedule-inputs {
        display: flex; /* 日付、時間、その他時間は引き続き横並び（ただし折り返す） */
        flex-direction: column; /* 縦積みに変更 */
        align-items: stretch; /* 要素を親の幅に広げる */
        gap: 10px; /* 各入力要素間の隙間 */
    }
    .schedule-grid-item .input-area.schedule-inputs .datepicker,
    .schedule-grid-item .input-area.schedule-inputs .time-select,
    .schedule-grid-item .input-area.schedule-inputs .other-time-input {
        width: 100%; /* 縦積み時に幅を100%に */
        margin-bottom: 0; /* マージンリセット */
    }
    .schedule-grid-item .error-message-container {
      border: solid 1px;
        grid-column: auto; /* グリッド指定をリセット */
        padding-left: 0; /* スマホではインデントなし */
        display: block; /* エラーメッセージを縦積みに */
    }
    .schedule-grid-item .error-message-container .error-message {
        width: 100%; /* エラーメッセージ幅を100%に */
        border: solid 1px;
    }

    .schedule-flex {
      display: block;
      margin-bottom: 16px;
    }

    .schedule-flex > div:first-child {
      margin-bottom: 6px;
    }

    /* サイズ指定を解除 */
    .schedule-item {
      width: 100%;
    }

    .schedule-inputs,
    .schedule-flex .input-area.schedule-inputs {
      width: 100%;
      min-width: unset;
      margin-right: 0;
      margin-bottom: 8px;
    }

    .schedule-flex .error-message-container {
      padding-left: 0;
    }

  .schedule-inputs select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
}