/* ═══════════════════════════════════════════════════════════════════
   chat-widget-inquiry.css — 도입 상담 챗봇 스타일
   브랜드 컬러 #c8115a 정합 / Inter + Noto Sans KR
   ═══════════════════════════════════════════════════════════════════ */

/* ── 채팅 프레임 ── */
.ciq-frame {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 600px;
  max-height: 800px;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Inter", "Noto Sans KR", sans-serif;
}

/* ── 헤더 ── */
.ciq-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.ciq-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--brand, #c8115a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.ciq-head-info {
  flex: 1;
  min-width: 0;
}
.ciq-head-title {
  font-weight: 700;
  font-size: 14px;
  color: #111;
}
.ciq-head-status {
  font-size: 11px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.ciq-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
  animation: ciq-pulse 2s ease-in-out infinite;
}
@keyframes ciq-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ciq-restart {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ciq-restart:hover {
  background: #f9fafb;
  color: #111;
  border-color: #d4d4d4;
}

/* ── 진척도 바 ── */
.ciq-progress {
  padding: 8px 20px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.ciq-progress-bar {
  height: 4px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
}
.ciq-progress-fill {
  height: 100%;
  background: var(--brand, #c8115a);
  border-radius: 999px;
  transition: width 0.3s;
  width: 0;
}
.ciq-progress-label {
  font-size: 10px;
  color: #888;
  margin-top: 4px;
  text-align: right;
}

/* ── 본문 (메시지 영역) ── */
.ciq-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.ciq-body::-webkit-scrollbar { width: 6px; }
.ciq-body::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 999px;
}
.ciq-body::-webkit-scrollbar-track { background: transparent; }

/* ── 메시지 줄 ── */
.ciq-msg-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 100%;
}
.ciq-msg-wrap.user {
  flex-direction: row-reverse;
}
.ciq-msg-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand, #c8115a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}
.ciq-msg-wrap.user .ciq-msg-icon { display: none; }
.ciq-msg-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.ciq-msg-wrap.user .ciq-msg-content {
  align-items: flex-end;
}

/* ── 메시지 버블 ── */
.ciq-msg {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  word-wrap: break-word;
}
.ciq-msg.bot {
  background: #fff;
  border: 1px solid #e8e8e8;
  color: #111;
  border-top-left-radius: 4px;
}
.ciq-msg.user {
  background: var(--brand, #c8115a);
  color: #fff;
  border-top-right-radius: 4px;
}
.ciq-msg b { font-weight: 700; }
.ciq-msg a { color: var(--brand, #c8115a); text-decoration: none; }
.ciq-msg a:hover { text-decoration: underline; }

/* ── 빠른 답변 버튼 ── */
.ciq-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  max-width: 85%;
}
.ciq-quick-btn {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--brand, #c8115a);
  color: var(--brand, #c8115a);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ciq-quick-btn:hover {
  background: var(--brand, #c8115a);
  color: #fff;
}
.ciq-quick-btn.active {
  background: var(--brand, #c8115a);
  color: #fff;
}

/* ── 타이핑 인디케이터 ── */
.ciq-typing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  border-top-left-radius: 4px;
}
.ciq-typing .d {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #999;
  animation: ciq-typ 1s infinite;
}
.ciq-typing .d:nth-child(2) { animation-delay: 0.15s; }
.ciq-typing .d:nth-child(3) { animation-delay: 0.3s; }
@keyframes ciq-typ {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* ── 캘린더 (미팅) ── */
.ciq-calendar {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  max-width: 480px;
}
.ciq-cal-title {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}
.ciq-cal-subtitle {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}
/* 월별 달력 */
.ciq-cal-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ciq-cal-month-label {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}
.ciq-cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  font-family: inherit;
  transition: all 0.15s;
}
.ciq-cal-nav:hover {
  background: #f9fafb;
  border-color: var(--brand, #c8115a);
  color: var(--brand, #c8115a);
}
.ciq-cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.ciq-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #666;
  padding: 4px 0;
}
.ciq-cal-dow.sun { color: #ef4444; }
.ciq-cal-dow.sat { color: #3b82f6; }
.ciq-cal-grid-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
}
.ciq-cal-cell {
  aspect-ratio: 1;
  min-height: 32px;
}
.ciq-cal-cell.empty { background: transparent; }
.ciq-cal-cell-day {
  aspect-ratio: 1;
  min-height: 32px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #111;
  transition: all 0.15s;
  font-family: inherit;
}
.ciq-cal-cell-day:hover:not(.disabled) {
  border-color: var(--brand, #c8115a);
  background: rgba(200, 17, 90, 0.04);
}
.ciq-cal-cell-day.weekend { color: #aaa; }
.ciq-cal-cell-day.disabled {
  background: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
  border-color: #f0f0f0;
}
.ciq-cal-cell-day.active {
  background: var(--brand, #c8115a);
  border-color: var(--brand, #c8115a);
  color: #fff;
}
.ciq-cal-times { margin-top: 12px; }
.ciq-cal-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.ciq-cal-time {
  padding: 8px 4px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #111;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
}
.ciq-cal-time:hover {
  background: var(--brand, #c8115a);
  border-color: var(--brand, #c8115a);
  color: #fff;
}
.ciq-cal-time.active {
  background: var(--brand, #c8115a);
  border-color: var(--brand, #c8115a);
  color: #fff;
}
.ciq-cal-mtype-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ciq-cal-mtype {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
}
.ciq-cal-mtype:hover {
  background: var(--brand, #c8115a);
  border-color: var(--brand, #c8115a);
  color: #fff;
}

/* ── 하단 입력 영역 ── */
.ciq-foot {
  border-top: 1px solid #f0f0f0;
  padding: 12px 16px;
  background: #fff;
  flex-shrink: 0;
}
.ciq-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ciq-input {
  flex: 1;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  resize: none;
  height: 38px;
  max-height: 80px;
  font-family: inherit;
  color: #111;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.ciq-input:focus {
  outline: none;
  border-color: var(--brand, #c8115a);
}
.ciq-input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}
.ciq-send {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand, #c8115a);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s;
}
.ciq-send:hover { background: var(--brand-dark, #a00e49); }
.ciq-send:disabled { opacity: 0.4; cursor: not-allowed; }

.ciq-foot-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
}
.ciq-back-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  font-family: inherit;
  transition: color 0.15s;
}
.ciq-back-btn:hover { color: var(--brand, #c8115a); }
.ciq-foot-hint {
  color: #aaa;
  font-size: 10px;
}

/* ── 모바일 ── */
@media (max-width: 900px) {
  .ciq-frame {
    height: calc(100vh - 180px);
    min-height: 500px;
  }
  .ciq-msg { font-size: 13px; }
  .ciq-cal-time-grid { grid-template-columns: repeat(3, 1fr); }
}
