/* ============================================================
   老犬介護ハピネス – contact.css（お問い合わせ ページ専用）
   PC-first / breakpoints: 1200px, 960px, 568px
   共通の変数・リセット・breadcrumbは common.css を継承して使用する
   ============================================================ */

/* --------------------------------------------------
   PAGE BASE
-------------------------------------------------- */
.contact_page {
  overflow: hidden;
}

/* --------------------------------------------------
   HERO
   共通のレイアウト（position/paws/inner/label/title/波)は
   common.css の .page_hero* を使用。ここでは高さ・背景色など
   このページ固有の差分のみを定義する。
-------------------------------------------------- */
.contact_hero {
  height: 320px;
  background: var(--color-teal-light);
}

@media only screen and (max-width: 1200px) {
  .contact_hero {
    height: 280px;
  }
}

@media only screen and (max-width: 960px) {
  .contact_hero {
    height: 240px;
  }
}

@media only screen and (max-width: 568px) {
  .contact_hero {
    height: 150px;
  }
}

/* --------------------------------------------------
   CONTENT
-------------------------------------------------- */
.contact_content {
  padding: 40px 0 100px;
}

.contact_intro {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 40px;
}

@media only screen and (max-width: 1200px) {
  .contact_content {
    padding: 32px 0 80px;
  }

  .contact_intro {
    font-size: 15px;
  }
}

@media only screen and (max-width: 960px) {
  .contact_content {
    padding: 28px 0 70px;
  }
}

@media only screen and (max-width: 568px) {
  .contact_content {
    padding: 24px 0 56px;
  }

  .contact_intro {
    font-size: 14px;
    margin-bottom: 28px;
  }
}

/* --------------------------------------------------
   FORM CARD
-------------------------------------------------- */
.contact_form_card {
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(31, 68, 43, 0.08);
  padding: 50px 60px 60px;
}

.contact_form_title {
  font-weight: 700;
  font-size: 32px;
  color: var(--color-text);
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 12px;
}

.contact_form_desc {
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 36px;
}

@media only screen and (max-width: 1200px) {
  .contact_form_card {
    padding: 40px 32px 48px;
  }

  .contact_form_title {
    font-size: 26px;
  }
}

@media only screen and (max-width: 960px) {
  .contact_form_card {
    padding: 32px 24px 40px;
  }

  .contact_form_desc {
    font-size: 14px;
  }
}

@media only screen and (max-width: 568px) {
  .contact_form_card {
    padding: 24px 15px 32px;
    border-radius: 0;
    margin: 0 -4.8vw;
  }

  .contact_form_title {
    font-size: 21px;
  }

  .contact_form_desc {
    font-size: 13px;
    margin-bottom: 24px;
  }
}

/* --------------------------------------------------
   FORM TABLE / ROW
-------------------------------------------------- */
.contact_table {
  border: 1px solid #d8d7d6;
  border-radius: 10px;
  overflow: hidden;
}

.contact_row {
  display: flex;
  border-bottom: 1px solid #d8d7d6;
}

.contact_row:last-child {
  border-bottom: none;
}

.contact_row_label {
  flex: 0 0 350px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #5db9bf;
  color: var(--color-white);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  padding: 20px 30px;
  border-right: 1px solid #d8d7d6;
}

.contact_row_field {
  flex: 1 1 auto;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.contact_badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 22px;
  padding: 1px 5px;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-teal);
}

.contact_badge--required {
  background: #efef4e;
}

.contact_badge--optional {
  background: var(--color-white);
}

.contact_input,
.contact_textarea {
  width: 100%;
  background: #f5f5f5;
  border: none;
  border-radius: 6px;
  padding: 15px 20px;
  font-family: inherit;
  font-size: 16px;
  color: var(--color-text);
}

.contact_input::placeholder,
.contact_textarea::placeholder {
  color: var(--color-text);
  opacity: 0.5;
}

.contact_textarea {
  min-height: 158px;
  resize: vertical;
  line-height: 1.8;
}

.contact_row_note {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
  opacity: 0.7;
}

/* --------------------------------------------------
   RADIO LIST（お問い合わせの種類）
-------------------------------------------------- */
.contact_radio_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

.contact_radio {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text);
  cursor: pointer;
}

.contact_radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.contact_radio input[type="radio"]:checked {
  border-color: var(--color-teal);
}

.contact_radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-teal);
}

@media only screen and (max-width: 1200px) {
  .contact_row_label {
    flex-basis: 280px;
    font-size: 16px;
    padding: 18px 24px;
  }

  .contact_row_field {
    padding: 18px 24px;
  }
}

@media only screen and (max-width: 960px) {
  .contact_row {
    flex-direction: column;
  }

  .contact_row_label {
    flex-basis: auto;
    border-right: none;
    border-bottom: 1px solid #d8d7d6;
    padding: 14px 20px;
  }

  .contact_row_field {
    padding: 20px;
  }
}

@media only screen and (max-width: 568px) {
  .contact_row_label {
    font-size: 15px;
    padding: 12px 16px;
  }

  .contact_row_field {
    padding: 16px;
  }

  .contact_input,
  .contact_textarea {
    font-size: 15px;
    padding: 13px 16px;
  }

  .contact_radio {
    font-size: 14px;
  }
}

/* --------------------------------------------------
   同意文・送信ボタン
-------------------------------------------------- */
.contact_agree {
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text);
  margin-top: 30px;
}

.contact_agree_link {
  color: var(--color-teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact_agree_link:hover {
  opacity: 0.75;
}

/*
  Contact Form 7 は送信ボタンを <input type="submit"> として出力する。
  input要素には ::before / ::after の生成コンテンツが描画されないため、
  矢印はボタン自身ではなく、疑似要素が使えるラッパー(div)側に付ける。
  ラッパーの幅は fit-content ではなく、ボタンと同じ固定値を明示的に指定する
  （CF7が併せて出力する <span class="wpcf7-spinner"> の分だけ fit-content の幅が
  ズレて矢印の位置が崩れる＝見えなくなる現象を避けるため）。
*/
div.contact_submit_wrap {
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  width: 310px !important;
  height: 84px !important;
  max-width: 100% !important;
  margin: 30px auto 0 !important;
}

/*
  Cocoon本体(親テーマ)の style.css に input[type=submit]{ background-color:#f5f8fa; border:1px solid ...; color:#333; width:100%; }
  という指定があり、詳細度(要素+属性=0,1,1)が .contact_submit 単体(クラスのみ=0,1,0)より高いため、
  読み込み順に関わらずCocoon側が勝ってしまう。input.contact_submit と要素セレクタ込みにして詳細度を
  引き上げても、Cocoonのスキンや管理画面側の追加CSS等、ファイル上では追えない箇所で同格以上のCSSが
  さらに後から出力されるケースがあるため、見た目に関わる指定は !important で確実に上書きする。
*/
input.contact_submit {
  width: 400px !important;
  height: 84px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 30px !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  background: var(--color-orange) !important;
  border: none !important;
  color: var(--color-white) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* ホバー時にボタンだけ浮き上がって矢印(::afterはwrap側)が置き去りにならないよう、浮き上がりアニメーションは無効化する */
input.contact_submit:hover {
  transform: none !important;
}

/* 共通コンポーネントの2本線矢印(::before/::after)はinput要素では描画されないため無効化 */
.contact_submit::before,
.contact_submit::after {
  content: none;
}

.contact_submit_wrap::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  right: 30px !important;
  transform: translateY(-50%) !important;
  width: 15px !important;
  height: 18px !important;
  background: url('../img/common/arrow_white_right.svg') no-repeat center / contain !important;
  pointer-events: none !important;
  z-index: 2;
}

@media only screen and (max-width: 1200px) {
  div.contact_submit_wrap {
    width: 480px !important;
    height: 88px !important;
  }

  input.contact_submit {
    width: 480px !important;
    height: 88px !important;
    font-size: 28px !important;
  }

  .contact_submit_wrap::after {
    right: 26px !important;
    width: 16px !important;
    height: 26px !important;
  }
}

@media only screen and (max-width: 960px) {
  div.contact_submit_wrap {
    width: 400px !important;
    height: 76px !important;
  }

  input.contact_submit {
    width: 400px !important;
    height: 76px !important;
    font-size: 24px !important;
  }

  .contact_submit_wrap::after {
    right: 22px !important;
    width: 14px !important;
    height: 22px !important;
  }
}

@media only screen and (max-width: 568px) {
  .contact_agree {
    font-size: 13px;
    margin-top: 20px;
  }

  div.contact_submit_wrap {
    width: 100% !important;
    height: 64px !important;
  }

  input.contact_submit {
    width: 100% !important;
    height: 64px !important;
    font-size: 20px !important;
  }

  .contact_submit_wrap::after {
    right: 18px !important;
    width: 11px !important;
    height: 18px !important;
  }
}

/* --------------------------------------------------
   送信完了ページ（page-sent.php）
-------------------------------------------------- */
.sent_card {
  display: flex;
  align-items: center;
  gap: 50px;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(31, 68, 43, 0.08);
  padding: 50px 60px;
}

.sent_card_body {
  flex: 1 1 auto;
}

.sent_title {
  font-weight: 700;
  font-size: 32px;
  color: var(--color-text);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.sent_text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}

.sent_card_img {
  flex: 0 0 380px;
}

.sent_card_img img {
  width: 100%;
  height: auto;
  display: block;
}

.sent_back_wrap {
  text-align: center;
  margin-top: 40px;
}

.sent_back_btn {
  min-width: 300px;
}

@media only screen and (max-width: 1200px) {
  .sent_card {
    gap: 32px;
    padding: 40px;
  }

  .sent_title {
    font-size: 26px;
  }

  .sent_text {
    font-size: 15px;
  }

  .sent_card_img {
    flex-basis: 320px;
  }
}

@media only screen and (max-width: 960px) {
  .sent_card {
    flex-direction: column-reverse;
    padding: 32px 24px;
  }

  .sent_card_img {
    flex-basis: auto;
    width: 100%;
    max-width: 320px;
  }

  .sent_title {
    margin-bottom: 16px;
  }

  .sent_back_wrap {
    margin-top: 32px;
  }
}

@media only screen and (max-width: 568px) {
  .sent_card {
    padding: 24px 16px;
    border-radius: 14px;
    gap: 24px;
  }

  .sent_title {
    font-size: 21px;
  }

  .sent_text {
    font-size: 14px;
  }

  .sent_card_img {
    max-width: 240px;
  }

  .sent_back_btn {
    width: 100%;
    min-width: 0;
  }
}
