@charset "UTF-8";

/* HomeBot のサイト埋め込み: ランチャー（入口）とページ内の質問コーナー。
   チャット窓の中身は共通ウィジェット（Shadow DOM）側＝ここでは触らない。
   配置は js/homebot-guide.js が計測する --homebot-offset-bottom（スマホの下部CTA）に合わせる。
   フォント（Noto Sans JP / Poppins）は common.css の読込をそのまま使う。 */

/* ===== ランチャー ===== */
/* 型は Hug Design と同じ横長のピル（ロゴの白丸 → 状態の点と補足・ラベル → 吹き出しの白丸）。色はテーマの #a91a48 */
.okhb-launcher {
  position: fixed;
  right: 20px; /* .banner_cta（下端 140px）より下に収まる高さ */
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 999; /* .banner_cta（888）より上、下部CTA（1000）・メニュー（1001）より下 */
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 8px 10px 8px 8px;
  border: 0;
  border-radius: 40px;
  background: #a91a48;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.35;
  text-align: left;
  box-shadow:
    0 6px 20px rgba(60, 20, 30, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.okhb-launcher[hidden] {
  display: none;
}
body:has(.header__content.open) .okhb-launcher {
  display: none;
}
.okhb-launcher:hover {
  background: #8e143b;
  box-shadow:
    0 8px 24px rgba(60, 20, 30, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.okhb-launcher:focus-visible {
  outline: 3px solid #333;
  outline-offset: 3px;
}

.okhb-launcher__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
}
/* ロゴ（チャット窓の見出しと同じオカムラホームのリフォームのマーク）。円の内接正方形に収めて切れないようにする */
.okhb-launcher__mark {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.okhb-launcher__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.okhb-launcher__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.okhb-launcher__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f6d3de;
}
.okhb-launcher__label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
/* 狭い画面では「、」の後で折り返す（途中で切らない） */
.okhb-launcher__phrase {
  display: inline-block;
  white-space: nowrap;
}

/* 吹き出しの白丸（飾り。ボタンは1つのまま） */
.okhb-launcher__go {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-left: 2px;
  border-radius: 50%;
  background: #fff;
}
.okhb-launcher__bubble {
  position: relative;
  display: block;
  width: 19px;
  height: 15px;
  margin-bottom: 3px; /* しっぽの分だけ上げて円の中央に見せる */
  border-radius: 7px;
  background: #a91a48;
}
/* 吹き出しの中の点 3 つ */
.okhb-launcher__bubble::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    5px 0 0 #fff,
    10px 0 0 #fff;
}
/* しっぽ（左下） */
.okhb-launcher__bubble::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 3px;
  border-style: solid;
  border-width: 5px 5px 0 0;
  border-color: #a91a48 transparent transparent transparent;
}

@media (max-width: 767px) {
  /* 右側は .banner_cta が使うため左下に置く。下部CTA（.cta）の高さは JS が計測 */
  .okhb-launcher {
    right: auto;
    left: 12px;
    bottom: calc(
      var(--homebot-offset-bottom, 0px) + 10px +
        env(safe-area-inset-bottom, 0px)
    );
    gap: 10px;
    min-height: 54px;
    max-width: calc(100vw - 24px);
    padding: 6px 8px 6px 6px;
  }
  .okhb-launcher__icon {
    width: 40px;
    height: 40px;
  }
  .okhb-launcher__mark {
    width: 27px;
    height: 27px;
  }
  .okhb-launcher__sub {
    font-size: 10px;
  }
  .okhb-launcher__label {
    font-size: 14px;
  }
  .okhb-launcher__go {
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 359px) {
  .okhb-launcher {
    gap: 8px;
  }
  .okhb-launcher__sub {
    white-space: normal;
  }
  .okhb-launcher__label {
    font-size: 13px;
  }
}

/* ===== チャット窓の見出し（共通ウィジェット側のサイト別オプトイン） =====
   見出しをテーマカラー（管理画面の設定）＋ロゴの白地にする。ウィジェット本体が対応する名前付きの値で、Shadow DOM の内部には触らない */
#homebot-widget {
  --homebot-soft-header-scheme: brand;
}

/* チャット窓の背景 */
.hb-soft .hb-header-avatar {
  background: #fff !important;
  border: 1px solid #a91a48 !important;
}

/* ===== ページ内の質問コーナー ===== */
.okhb-corner {
  position: relative;
  z-index: 3; /* トップページの各セクションと同じ重なり（背景の固定画像の上に出す） */
  background: #fff;
  color: #333;
}
.okhb-corner[hidden] {
  display: none;
}
.okhb-corner--top {
  padding: 100px 0 0;
}
.okhb-corner--work {
  margin-top: 60px;
}

.okhb-corner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 56px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 64px;
  background: #f6f2ec;
  box-sizing: border-box;
}
.okhb-corner--top .okhb-corner__inner {
  width: calc(100% - 40px);
}

.okhb-corner__en {
  margin: 0 0 12px;
  color: #a91a48;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}
.okhb-corner__title {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  color: #333;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.okhb-corner__title::before,
.okhb-corner__title::after {
  content: none;
}
.okhb-corner__copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: #555;
}

.okhb-corner__ask {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.okhb-corner__faq:empty {
  display: none;
}
.okhb-corner__faq .homebot-faq-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.okhb-corner__faq .homebot-faq-list li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.okhb-corner__faq .homebot-faq-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid #e3dbd0;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.okhb-corner__faq .homebot-faq-item::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-top: 1px solid #a91a48;
  border-right: 1px solid #a91a48;
  transform: rotate(45deg);
}
.okhb-corner__faq .homebot-faq-item:hover {
  border-color: #a91a48;
  color: #a91a48;
}
.okhb-corner__faq .homebot-faq-item:focus-visible {
  outline: 2px solid #a91a48;
  outline-offset: 2px;
}

/* 施工事例詳細の .single-work form / input[type=text]（common.css）より強くする */
.okhb-corner .okhb-corner__form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 6px 6px 16px;
  border: 1px solid #d8cfc3;
  border-radius: 4px;
  background: #fff;
}
.okhb-corner .okhb-corner__form:focus-within {
  border-color: #a91a48;
}
.okhb-corner .okhb-corner__form .okhb-corner__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
  color: #333;
  font-family: inherit;
  font-size: 16px; /* iOS の自動ズームを避ける */
  line-height: 1.5;
}
.okhb-corner .okhb-corner__input::placeholder {
  color: #8f8579;
}
.okhb-corner .okhb-corner__send {
  flex-shrink: 0;
  min-width: 72px;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 3px;
  background: #a91a48;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.okhb-corner .okhb-corner__send:hover {
  background: #8e143b;
}
.okhb-corner .okhb-corner__send:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}
.okhb-corner__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #6f665b;
}
.okhb-corner__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1023px) {
  .okhb-corner__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 44px 40px;
  }
}
@media (max-width: 767px) {
  .okhb-corner--top {
    padding: 60px 0 0;
  }
  .okhb-corner--top .okhb-corner__inner {
    width: calc(100% - 32px);
  }
  .okhb-corner--work {
    margin-top: 40px;
  }
  .okhb-corner__inner {
    gap: 24px;
    padding: 32px 20px;
  }
  .okhb-corner__en {
    font-size: 30px;
  }
  .okhb-corner__title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  .okhb-corner__copy {
    font-size: 14px;
    line-height: 1.8;
  }
  .okhb-corner__faq .homebot-faq-item {
    min-height: 48px;
    padding: 11px 14px;
    font-size: 14px;
  }
  .okhb-corner .okhb-corner__form {
    padding-left: 12px;
  }
  .okhb-corner .okhb-corner__send {
    min-width: 64px;
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .okhb-launcher,
  .okhb-corner__faq .homebot-faq-item,
  .okhb-corner .okhb-corner__send {
    transition: none;
  }
}
