/* 챗봇 플로팅 위젯 (외부 공통 챗봇 iframe 래퍼) */
.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 64px;
  border-radius: 16px;
  background: #2563eb;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37,99,235,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 8px;
  gap: 4px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.chatbot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37,99,235,0.5);
}
.chatbot-fab__label {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1;
}

/* 오버레이 — PC: 투명 통과, 모바일: dim 배경 */
.chatbot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  pointer-events: none;
}
.chatbot-overlay.is-open {
  display: block;
}

/* 컨테이너 — PC: 우하단 앵커 팝업 */
.chatbot-container {
  position: absolute;
  bottom: 96px;
  right: 24px;
  width: 400px;
  height: 680px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s, transform 0.2s;
}
.chatbot-overlay.is-open .chatbot-container {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chatbot-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── 모바일(≤480): dim 배경 + 바텀시트 ── */
@media (max-width: 480px) {
  .chatbot-overlay {
    background: rgba(0,0,0,0.45);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.25s;
  }
  .chatbot-overlay.is-open {
    opacity: 1;
  }

  .chatbot-container {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 88dvh;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
    opacity: 1;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
  }
  .chatbot-overlay.is-open .chatbot-container {
    transform: translateY(0);
  }

  .chatbot-fab {
    bottom: 16px;
    right: 16px;
    transition: opacity 0.2s;
  }
  /* 모바일에서 챗봇 열림 시 FAB 가 바텀시트 위로 떠 보이지 않도록 숨김 */
  body.chatbot-open .chatbot-fab {
    opacity: 0;
    pointer-events: none;
  }
}