/* 相談ナビ（よくある質問ウィジェット） Dental Web Atelier */
/* 文字サイズはすべてpx指定（rem禁止）。書体はゴシック体を明示。 */

.dwa-faq-btn,
.dwa-faq-panel,
.dwa-faq-panel * {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", YuGothic, Meiryo, sans-serif;
  box-sizing: border-box;
  word-break: normal;
  overflow-wrap: break-word;
}

/* ---- 起動ボタン ---- */
.dwa-faq-btn {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 100001;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #1F4D6B;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  box-shadow: 0 6px 20px rgba(15, 35, 52, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.dwa-faq-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 35, 52, 0.45);
}
.dwa-faq-btn__icon {
  font-size: 20px;
  line-height: 1;
}
.dwa-faq-btn__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
}
.dwa-faq-btn__sub {
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

/* ---- 背景オーバーレイ ---- */
.dwa-faq-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(20, 32, 44, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.dwa-faq-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---- パネル ---- */
.dwa-faq-panel {
  position: fixed;
  right: 20px;
  bottom: 120px;
  z-index: 100002;
  width: min(390px, calc(100vw - 28px));
  max-height: min(640px, calc(100vh - 150px));
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 35, 52, 0.35);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}
.dwa-faq-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dwa-faq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: #1F4D6B;
  color: #ffffff;
}
.dwa-faq-head__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
}
.dwa-faq-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dwa-faq-close:hover { background: rgba(255, 255, 255, 0.28); }

.dwa-faq-body {
  overflow-y: auto;
  padding: 14px 14px 18px;
  -webkit-overflow-scrolling: touch;
}

.dwa-faq-greeting {
  font-size: 15px;
  line-height: 1.8;
  color: #1A1A1A;
  margin: 0 0 6px;
}
.dwa-faq-note {
  font-size: 12px;
  line-height: 1.7;
  color: #5C5C5C;
  margin: 0 0 14px;
}
.dwa-faq-note a {
  color: #2C5F7F;
  text-decoration: underline;
}

/* ---- Q&Aアイテム ---- */
.dwa-faq-item {
  border: 1px solid #DCE3E8;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.dwa-faq-item.is-open {
  border-color: #2C5F7F;
  background: #F2F7FA;
}

.dwa-faq-q {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 12px;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.dwa-faq-q__text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: #1A1A1A;
}
.dwa-faq-badge {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}
.dwa-faq-badge--q { background: #2C5F7F; }
.dwa-faq-badge--a { background: #E08A3C; }

.dwa-faq-q__mark {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 600;
  color: #2C5F7F;
  line-height: 1;
}

.dwa-faq-a {
  display: none;
  padding: 0 12px 14px;
}
.dwa-faq-item.is-open .dwa-faq-a { display: flex; gap: 10px; }
.dwa-faq-a__body {
  flex: 1;
  font-size: 16px;
  line-height: 1.8;
  color: #1A1A1A;
  margin: 0;
}
.dwa-faq-a__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: #2C5F7F;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dwa-faq-a__link:hover { color: #1F4D6B; }

/* ---- モバイル（既存の下部固定バーの上に配置） ---- */
@media (max-width: 900px) {
  .dwa-faq-btn {
    right: 12px;
    bottom: 96px;
    width: 76px;
    height: 76px;
  }
  .dwa-faq-btn__icon { font-size: 18px; }
  .dwa-faq-btn__title { font-size: 12px; }
  .dwa-faq-btn__sub { font-size: 8px; }
  .dwa-faq-panel {
    right: 12px;
    left: 12px;
    bottom: 96px;
    width: auto;
    max-height: calc(100vh - 170px);
  }
}
