/* =========================================================
   追従フォーム（業種・エリアの対策ページ／PCのみ）2026-11-11
   1440px以上で右側に固定。本文はその分だけ左に寄せる。
   ========================================================= */
.bhe-aside-form {
  display: none;
}

@media screen and (min-width: 1440px) {
  body.has-aside-form {
    --bhe-aside-w: 320px;
    padding-right: var(--bhe-aside-w);
  }
  body.has-aside-form .header {
    right: 0;
  }
  .bhe-aside-form {
    display: block;
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 900;
    width: 320px;
    padding: 20px 20px 32px;
    overflow-y: auto;
    background: #fff8e1;
    box-shadow: -6px 0 18px -10px rgba(23, 23, 23, 0.25);
    font-family: "Noto Sans CJKjp", sans-serif;
  }
  body.admin-bar .bhe-aside-form {
    top: 104px;
  }
  .bhe-aside-form__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: #1a1a1a;
  }
  .bhe-aside-form__lead {
    margin-top: 2px;
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: #555;
  }

  /* フォームを縦1列・小さめに */
  .bhe-aside-form .contact__form {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .bhe-aside-form .contact__item {
    display: block;
    padding: 0;
    margin: 0 0 12px;
    border: 0;
  }
  .bhe-aside-form .contact__item-label,
  .bhe-aside-form .contact__item-flex-column {
    display: block;
    width: auto;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
  }
  .bhe-aside-form .contact__item-label .required {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 1.6;
  }
  .bhe-aside-form .contact__item p {
    font-size: 11px;
    line-height: 1.5;
    font-weight: 400;
    color: #666;
  }
  .bhe-aside-form .contact__item-body {
    display: block;
    width: 100%;
  }
  .bhe-aside-form input[type="text"],
  .bhe-aside-form input[type="email"],
  .bhe-aside-form input[type="tel"],
  .bhe-aside-form select,
  .bhe-aside-form textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #cfcabd;
    border-radius: 6px;
    background: #fff;
  }
  .bhe-aside-form textarea {
    height: 72px;
  }
  .bhe-aside-form .wpcf7-checkbox {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
  }
  .bhe-aside-form .wpcf7-list-item {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
  }
  .bhe-aside-form input[type="submit"],
  .bhe-aside-form .wpcf7-submit {
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 12px 10px;
    font-size: 15px;
  }

  /* 右端の追従ボタンと重なるので、追従フォームがあるページでは隠す */
  body.has-aside-form .banner--fixed {
    display: none !important;
  }
}

/* 2026-11-11 スクロールせずに収まるよう、余白と注記を詰める */
@media screen and (min-width: 1440px) {
  .bhe-aside-form {
    padding: 14px 18px 16px;
  }
  .bhe-aside-form__title {
    font-size: 20px;
  }
  .bhe-aside-form__lead {
    margin-bottom: 8px;
  }
  .bhe-aside-form .contact__item {
    margin-bottom: 7px;
  }
  .bhe-aside-form .contact__item-label,
  .bhe-aside-form .contact__item-flex-column {
    margin-bottom: 2px;
    font-size: 12px;
  }
  /* 入力欄の下・見出しの下の注記（※〜）は出さない */
  .bhe-aside-form .contact__item-body > p,
  .bhe-aside-form .contact__item-flex-column > p {
    display: none;
  }
  .bhe-aside-form input[type="text"],
  .bhe-aside-form input[type="email"],
  .bhe-aside-form input[type="tel"],
  .bhe-aside-form select,
  .bhe-aside-form textarea {
    padding: 6px 10px;
    font-size: 13px;
    min-height: 0;
    height: auto;
  }
  .bhe-aside-form textarea {
    height: 54px;
  }
  .bhe-aside-form .contact__form > p,
  .bhe-aside-form .contact__privacy,
  .bhe-aside-form .contact__form p {
    margin: 4px 0;
    font-size: 11px;
    line-height: 1.5;
  }
  .bhe-aside-form .contact__button {
    margin-top: 6px;
    padding: 0;
  }
  .bhe-aside-form input[type="submit"],
  .bhe-aside-form .wpcf7-submit {
    margin-top: 0;
    padding: 10px;
  }
  .bhe-aside-form .wpcf7-response-output {
    margin: 6px 0 0;
    font-size: 12px;
  }
}

/* 2026-11-11 背景は白に。入力欄は無料相談ページと同じ薄いグレー */
@media screen and (min-width: 1440px) {
  .bhe-aside-form {
    background: #fff;
    box-shadow: -8px 0 24px -12px rgba(23, 23, 23, 0.28);
  }
  .bhe-aside-form input[type="text"],
  .bhe-aside-form input[type="email"],
  .bhe-aside-form input[type="tel"],
  .bhe-aside-form select,
  .bhe-aside-form textarea {
    border-color: transparent;
    background-color: #f5f5f3;
  }
}

/* 2026-11-11 リード文を外したので、見出しの下に余白を持たせる */
@media screen and (min-width: 1440px) {
  .bhe-aside-form__title {
    margin-bottom: 10px;
  }
}

/* 2026-11-11 見出しに黄色の下線ハイライト（お客様の声の見出しと同じ色） */
@media screen and (min-width: 1440px) {
  .bhe-aside-form__title span {
    font-weight: 700;
    padding: 0 4px;
    background: linear-gradient(transparent 62%, #ffe45c 62%);
  }
}

/* 2026-11-11 入力欄の高さを少し低く（36px） */
@media screen and (min-width: 1440px) {
  .bhe-aside-form .contact__form input[type="text"],
  .bhe-aside-form .contact__form input[type="email"],
  .bhe-aside-form .contact__form input[type="tel"],
  .bhe-aside-form .contact__form select {
    height: 36px;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 36px;
  }
}

/* 予算のプルダウンは他の指定に負けるので、高さを強制的にそろえる */
@media screen and (min-width: 1440px) {
  .bhe-aside-form .contact__form select {
    height: 36px !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 36px !important;
  }
}

/* 2026-11-11 LPは画面幅に合わせて全体を拡大縮小する作り（html の font-size が vw 基準）。
   追従フォームの320pxぶん本文が狭くなるので、残りの幅を基準に縮小して、文字や画像が切れないようにする */
@media screen and (min-width: 1440px) {
  html:has(body.has-aside-form),
  html.has-aside-form {
    font-size: min(calc((100vw - 320px) * 0.005208333), 10px);
  }
}
