/* ============================================================
   form-datepicker-3.css — DatePicker 3（Flatpickr ライブラリ版）
   ============================================================ */

/* デモコンテナ：複数パターン縦並び */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
}

/* ===== カラー変数（パターンカード内スコープ） ===== */
.dp-pattern {
  --dp-accent:  #2B7FE8;
  --dp-danger:  #E53E3E;
  --dp-text:    #1A2332;
  --dp-muted:   #9AA5B4;
  --dp-border:  #D0D7E0;
  --dp-bg:      #F4F6F9;
}

/* ===== パターンカード ===== */
.dp-pattern {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--dp-bg);
  border-radius: 8px;
  max-width: 520px;
}
.dp-pattern:last-child { margin-bottom: 0; }

.dp-pattern-label {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--dp-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===== 入力行 ===== */
.dp-input-row {
  display: flex;
  align-items: center;
}

.dp-input {
  width: 140px;
  padding: 7px 10px;
  font-size: 14px;
  border: 1px solid var(--dp-border);
  border-radius: 4px 0 0 4px;
  outline: none;
  font-family: sans-serif;
  color: var(--dp-text);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s;
}
.dp-input:focus { border-color: var(--dp-accent); }

/* 期間選択用：入力欄を広げる */
.dp-input--wide { width: 220px; }

/* カレンダーアイコンボタン */
.dp-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--dp-border);
  border-left: none;
  border-radius: 0;
  background: #fff;
  color: #5A6A7A;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.dp-icon-btn:hover { background: var(--dp-bg); }

/* ×クリアボタン */
.dp-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--dp-border);
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: #fff;
  color: var(--dp-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
.dp-clear-btn:hover { color: #5A6A7A; }

/* ===== 決定ボタン ===== */
.dp-confirm-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 24px;
  background: var(--dp-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: sans-serif;
  transition: opacity 0.15s;
}
.dp-confirm-btn:hover { opacity: 0.85; }

/* ===== 結果表示 ===== */
.dp-result {
  margin: 8px 0 0;
  font-size: 14px;
  min-height: 20px;
}
.dp-result.has-value {
  padding: 10px 14px;
  background: #F0F7FF;
  border: 1px solid var(--dp-accent);
  border-radius: 6px;
  color: #1A5EA8;
  font-weight: 600;
}
.dp-result.is-error { color: var(--dp-danger); }

/* ===== バニラJS版リンク notice ===== */
.dp3-vanilla-note {
  margin: 16px 0;
  padding: 12px 16px;
  background: #EFF4FD;
  border-left: 3px solid #2B7FE8;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  line-height: 1.7;
}
.dp3-vanilla-note a {
  color: #1A5EA8;
  font-weight: 600;
  text-decoration: none;
}
.dp3-vanilla-note a:hover { text-decoration: underline; }

/* ===== Powered by Flatpickr ===== */
.demo-powered-by {
  margin-top: 10px;
  text-align: right;
  font-size: 12px;
  color: var(--dp-muted, #9AA5B4);
}
.demo-powered-by a {
  color: #2B7FE8;
  text-decoration: none;
}
.demo-powered-by a:hover { text-decoration: underline; }

/* ===== Flatpickr デフォルトスタイル上書き ===== */
/* 月ドロップダウンのフォントサイズを本文に合わせる */
.flatpickr-monthDropdown-months {
  font-size: 14px;
}

/* ===== プロンプトブロック ===== */
.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: 540px) {
  .demo-container { padding: 16px; }
  .dp-input { width: 110px; }
  .dp-input--wide { width: 180px; }
}
