/* 파란샘 상담 창 (chatbot.js). 색과 서체는 style.css의 변수를 쓴다. */
.pc-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 1100;
  display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--font-family); font-size: 1rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand-strong), #005D85);
  box-shadow: 0 10px 30px rgba(0, 119, 168, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.pc-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0, 119, 168, 0.42); }
.pc-launcher.is-open { opacity: 0; pointer-events: none; }
/* 말풍선 아이콘이 위아래로 둥둥 떠다닌다(카카오톡 버튼과 같은 움직임) */
.pc-launcher svg { animation: pcBob 2.4s ease-in-out infinite; }
@keyframes pcBob { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-4px) rotate(-6deg); } 60% { transform: translateY(1px) rotate(3deg); } }

.pc-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 1101;
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 48px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 64px rgba(7, 26, 43, 0.28); border: 1px solid var(--line);
  font-family: var(--font-family);
}
.pc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 20px; background: linear-gradient(135deg, var(--navy-700), var(--navy-800)); color: #fff; }
.pc-title { font-size: 1.0625rem; font-weight: 700; }
.pc-sub { font-size: 0.8125rem; color: var(--muted-on-dark); }
.pc-header-actions { display: flex; align-items: center; gap: 4px; }
.pc-icon-btn, .pc-text-btn { min-width: 40px; min-height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: #fff; cursor: pointer; display: inline-grid; place-items: center; }
.pc-text-btn { padding: 0 10px; font-size: 0.875rem; font-weight: 700; color: var(--muted-on-dark); }
.pc-icon-btn:hover, .pc-text-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.pc-kakao { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FFFBEA; }
.pc-kakao-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.9375rem; color: #191919; background: #FEE500;
}
.pc-kakao-btn:hover { background: #F5DC00; }
button.pc-kakao-btn { width: 100%; border: 0; font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer; }
.pc-kakao-hours { margin-top: 6px; font-size: 0.8125rem; color: var(--muted); text-align: center; }

.pc-ai { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-alt); overscroll-behavior: contain; }
.pc-msg { max-width: 86%; }
.pc-msg-body { padding: 10px 14px; border-radius: 16px; font-size: 0.9375rem; line-height: 1.65; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.pc-bot { align-self: flex-start; }
.pc-bot .pc-msg-body { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.pc-user { align-self: flex-end; }
.pc-user .pc-msg-body { background: var(--brand-strong); color: #fff; border-top-right-radius: 4px; }
.pc-error .pc-msg-body { border-color: #F0C2BE; background: #FFF6F5; }
.pc-fallback { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-fallback a { padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; color: var(--brand-strong); background: var(--surface); border: 1px solid var(--line); }
.pc-fallback a:hover { border-color: var(--brand-strong); }
.pc-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.pc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pc-blink 1.2s infinite ease-in-out; }
.pc-dots i:nth-child(2) { animation-delay: 0.15s; }
.pc-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pc-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.pc-chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--brand-strong); font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.pc-chip:hover { border-color: var(--brand-strong); background: var(--brand-soft); }

.pc-compose { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.pc-form { display: flex; align-items: flex-end; gap: 8px; }
.pc-input {
  flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; resize: none;
  border: 1px solid #B9C6D2; border-radius: 14px; font-size: 0.9375rem; line-height: 1.5; background: var(--surface);
}
.pc-input:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px rgba(0, 165, 220, 0.25); }
.pc-send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--brand-strong); cursor: pointer; }
.pc-send:hover { background: var(--brand-strong-hover); }
.pc-send:disabled { opacity: 0.5; cursor: wait; }
.pc-compose-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.pc-notice { font-size: 0.75rem; line-height: 1.5; color: var(--muted); white-space: pre-line; }
.pc-count { flex: none; font-size: 0.75rem; color: var(--muted); }

@media (max-width: 600px) {
  .pc-launcher { right: 16px; bottom: 16px; min-height: 52px; padding: 0 18px 0 14px; }
  .pc-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
  body.pc-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-launcher svg { animation: none; }
  .pc-dots i { animation: none; opacity: 0.6; }
}
