/* chotto サポート問い合わせウィジェット
   クラスは cs- プレフィックスで UIKit / 既存スタイルと衝突を避ける。
   z-index は UIKit モーダル(1010)より下、既存ヘルプリンク(997)より上。 */

:root {
  --cs-primary: #1e87f0;
  --cs-primary-dark: #0f6ecd;
  --cs-text: #333;
  --cs-muted: #666666;
  --cs-border: #e5e5e5;
  --cs-bg: #ffffff;
  --cs-radius: 12px;
}

/* ランチャーボタン（丸型・吹き出しアイコン） */
.cs-launcher {
  position: fixed;
  right: 24px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cs-primary);
  color: #fff;
  border: 3px solid #fff;
  cursor: pointer;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}
.cs-launcher:hover {
  background: var(--cs-primary-dark);
  transform: translateY(-2px);
}
.cs-launcher svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

/* パネル */
.cs-panel {
  position: fixed;
  right: 24px;
  bottom: 30px;
  width: 360px;
  max-height: 500px;
  height: 70vh;
  background: var(--cs-bg);
  border-radius: var(--cs-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 14px;
  color: var(--cs-text);
  -webkit-font-smoothing: antialiased;
}

/* 下からのトランジション */
.cs-panel-enter-active,
.cs-panel-leave-active {
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.cs-panel-enter-from,
.cs-panel-leave-to {
  transform: translateY(24px);
  opacity: 0;
}

/* ヘッダー */
.cs-header {
  background: var(--cs-primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cs-header-title {
  font-size: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-header-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  opacity: 0.9;
}
.cs-header-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}
.cs-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ボディ（スクロール領域） */
.cs-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.cs-lead {
  color: var(--cs-muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

/* タイプ選択リスト */
.cs-type-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-size: 14px;
  color: var(--cs-text);
}
.cs-type-item:hover {
  border-color: var(--cs-primary);
  background: #f5faff;
}
.cs-type-emoji {
  font-size: 18px;
  line-height: 1;
}
.cs-help-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--cs-primary);
  text-decoration: none;
  font-size: 13px;
}
.cs-help-link:hover {
  text-decoration: underline;
}

/* フォーム */
.cs-field {
  margin-bottom: 14px;
}
.cs-label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
}
.cs-required {
  color: #f0506e;
  font-size: 11px;
  margin-left: 4px;
}
.cs-optional {
  color: var(--cs-muted);
  font-size: 11px;
  margin-left: 4px;
  font-weight: normal;
}
.cs-input,
.cs-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--cs-text);
  font-family: inherit;
}
.cs-input:focus,
.cs-textarea:focus {
  outline: none;
  border-color: var(--cs-primary);
}
.cs-textarea {
  min-height: 96px;
  resize: vertical;
}
.cs-input-row + .cs-input-row {
  margin-top: 8px;
}

/* 注意書き */
.cs-note {
  background: #fff8e6;
  border: 1px solid #ffe08a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #7a5b00;
  line-height: 1.6;
  margin-bottom: 14px;
}
.cs-note-desc {
  color: var(--cs-muted);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0 0 12px;
}

/* エラー */
.cs-error {
  background: #fef0f2;
  border: 1px solid #f7c6ce;
  color: #d0304a;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* honeypot（画面外に隠す） */
.cs-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* フッター（送信ボタン） */
.cs-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--cs-border);
  flex-shrink: 0;
}
.cs-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: var(--cs-primary);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cs-btn:hover {
  background: var(--cs-primary-dark);
}
.cs-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.cs-btn-ghost {
  background: #fff;
  color: var(--cs-primary);
  border: 1px solid var(--cs-primary);
}
.cs-btn-ghost:hover {
  background: #f5faff;
}

/* 完了画面 */
.cs-done {
  text-align: center;
  padding: 24px 12px;
}
.cs-done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f7ee;
  color: #2fa85a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}
.cs-done-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px;
}
.cs-done-text {
  color: var(--cs-muted);
  line-height: 1.7;
  margin: 0 0 18px;
  font-size: 13px;
}

/* モバイル：全画面 */
@media (max-width: 767px) {
  .cs-panel {
    right: 0;
    bottom: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .cs-launcher {
    right: 16px;
    bottom: 84px; /* SPフッターメニューと重ならないよう上げる */
  }
}

[v-cloak] {
  display: none;
}
