/* ========================================
   チャット問い合わせ - kicchow
   ======================================== */

/* ===== FABボタン（お問い合わせページのみ表示） ===== */
.contact-fab {
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 9999;
  background: var(--green-main, #4A7A35);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(44, 58, 36, 0.35);
  cursor: pointer;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}
.contact-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 58, 36, 0.45);
}
@media (max-width: 768px) {
  .contact-fab {
    display: none;
  }
}

/* ===== オーバーレイ ===== */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.contact-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== パネル ===== */
.contact-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: #FAFAF5;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.contact-panel.active {
  transform: translateX(0);
}
@media (max-width: 480px) {
  .contact-panel {
    max-width: 100%;
  }
}

/* ===== パネルヘッダー ===== */
.cp-header {
  background: linear-gradient(135deg, #2C3A24 0%, #4A7A35 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.cp-header-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.cp-header-info { flex: 1; }
.cp-header-name { font-size: 14px; font-weight: 700; color: #fff; }
.cp-header-status { font-size: 11px; color: rgba(255,255,255,0.8); }
.cp-status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7FD76F;
  margin-right: 4px;
}
.cp-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.cp-close:hover { color: #fff; }

/* ===== メッセージエリア ===== */
.cp-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F5F2EC;
}

/* ===== バブル ===== */
.cp-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}
.cp-row.user { flex-direction: row-reverse; }

.cp-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A7A35, #8DB87A);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.cp-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.75;
  word-break: break-word;
  font-family: 'Zen Maru Gothic', sans-serif;
}
.cp-bubble.bot {
  background: #fff;
  border-radius: 4px 16px 16px 16px;
  color: #3A3A38;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.cp-bubble.user {
  background: #4A7A35;
  border-radius: 16px 4px 16px 16px;
  color: #fff;
}

/* ===== タイピング ===== */
.cp-typing {
  display: flex; gap: 4px; align-items: center; padding: 2px 0;
}
.cp-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #8DB87A;
  animation: cp-typing 1.2s infinite;
}
.cp-typing span:nth-child(2) { animation-delay: 0.2s; }
.cp-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cp-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ===== 入力エリア ===== */
.cp-input-area {
  background: #fff;
  border-top: 1.5px solid #E0D8C8;
  padding: 12px 14px;
  flex-shrink: 0;
}
.cp-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}
.cp-choice-btn {
  background: #EAF0E2;
  border: 1.5px solid #8DB87A;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-family: 'Zen Maru Gothic', sans-serif;
  color: #2C3A24;
  cursor: pointer;
  transition: all 0.15s;
}
.cp-choice-btn:hover, .cp-choice-btn:active {
  background: #4A7A35;
  color: #fff;
  border-color: #4A7A35;
}
.cp-text-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.cp-text-input {
  flex: 1;
  border: 1.5px solid #C4D4B4;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Zen Maru Gothic', sans-serif;
  resize: none;
  outline: none;
  background: #FAFAF5;
  transition: border-color 0.2s;
  min-height: 40px;
  max-height: 120px;
}
.cp-text-input:focus { border-color: #4A7A35; }
.cp-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #4A7A35;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.cp-send-btn:hover { background: #2C3A24; }
.cp-send-btn:disabled { background: #C4D4B4; cursor: default; }

/* ===== 完了メッセージ ===== */
.cp-done-note {
  text-align: center;
  padding: 14px;
  font-size: 13px;
  color: #4A7A35;
  font-weight: 700;
  font-family: 'Zen Maru Gothic', sans-serif;
  flex-shrink: 0;
  background: #EAF0E2;
  border-top: 1.5px solid #C4D4B4;
  display: none;
}
