/* Calm Chat 플로팅 위젯 — /plugin/calm_chat/chat_widget.css */

.cc-root {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 99999;
  font-family: 'Noto Sans KR', system-ui, sans-serif;
}

/* 동그라미 아이콘 */
.cc-bubble {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4f46e5;
  color: #fff;
  cursor: grab;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.cc-bubble svg { width: 28px; height: 28px; pointer-events: none; }

/* 채팅창 */
.cc-panel {
  position: relative;
  display: none;
  flex-direction: column;
  width: min(380px, calc(100vw - 16px));
  height: min(600px, calc(100vh - 16px));
  height: min(600px, calc(100dvh - 16px));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .32);
}
.cc-head {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 14px;
  background: #1f2937;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cc-min {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.cc-min:hover { background: rgba(255, 255, 255, .16); }
.cc-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #fff;
}

/* 열림 / 닫힘 전환 */
.cc-root.cc-open .cc-bubble { display: none; }
.cc-root.cc-open .cc-panel { display: flex; }

/* 드래그 중에는 iframe 이 마우스 이벤트를 가로채지 않게 */
.cc-root.cc-dragging .cc-frame { pointer-events: none; }
.cc-root.cc-dragging,
.cc-root.cc-dragging * { cursor: grabbing !important; }

/* 크기 조절: 채팅창 아래 막대(높이) + 오른쪽 아래 모서리(높이·너비) */
.cc-foot {
  flex: 0 0 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cc-pill {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .45);
  pointer-events: none;
}
.cc-foot:hover .cc-pill { background: rgba(255, 255, 255, .8); }
.cc-grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .7);
  cursor: nwse-resize;
  touch-action: none;
}
.cc-grip:hover { color: #fff; }
.cc-root.cc-resizing .cc-frame { pointer-events: none; }
.cc-root.cc-resizing, .cc-root.cc-resizing * { user-select: none; }
