/* ========================================
   display-accordion-1.css   アコーディオン
======================================== */

:root {
  --ac-primary: #2B7FE8;
  --ac-border:  #E5E9EF;
  --ac-radius:  8px;
}

/* ===== デモコンテナ上書き ===== */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
  max-width: 640px;
}

/* ===== パターンブロック ===== */
.ac-pattern { margin-bottom: 32px; }
.ac-pattern:last-of-type { margin-bottom: 0; }

.ac-pattern-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* ===== アコーディオンルート ===== */
.ac-root {
  border: 1.5px solid var(--ac-border);
  border-radius: var(--ac-radius);
  overflow: hidden;
  background: #fff;
  max-width: 480px;
}

/* ===== アイテム ===== */
.ac-item { border-bottom: 1px solid var(--ac-border); }
.ac-item:last-child { border-bottom: none; }

/* ===== ヘッダーボタン ===== */
.ac-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1A2332;
  text-align: left;
  transition: background 0.15s;
}

.ac-header:hover { background: #F8FAFC; }

.ac-header[aria-expanded="true"] {
  color: var(--ac-primary);
  background: #EFF6FF;
}

/* ===== タイトル ===== */
.ac-title { flex: 1; line-height: 1.5; }

/* ===== アイコン（+/-）===== */
.ac-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #E5E9EF;
  color: #5A6A7A;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}

.ac-icon::before { content: '+'; }

.ac-header[aria-expanded="true"] .ac-icon {
  background: var(--ac-primary);
  color: #fff;
}

.ac-header[aria-expanded="true"] .ac-icon::before { content: '\2212'; }

/* ===== ボディ（開閉エリア）===== */
.ac-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* ===== コンテンツ ===== */
.ac-content {
  padding: 4px 20px 20px;
  font-size: 14px;
  color: #5A6A7A;
  line-height: 1.7;
}

.ac-content p { margin: 0; }

/* ===== リセットボタン ===== */
.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

.demo-controls { margin-top: 20px; text-align: right; }

/* ===== プロンプトブロック ===== */
.prompt-block { margin-bottom: 20px; }
.prompt-block:last-child { margin-bottom: 0; }

.prompt-block-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* ===== スマホ対応 ===== */
@media (max-width: 480px) {
  .ac-header { padding: 14px 16px; font-size: 13px; }
  .ac-content { padding: 4px 16px 16px; font-size: 13px; }
}
