/* ============================================
   template-common.css
   全テンプレート共通のコンポーネントCSS
   - datePicker フィールド
   - 例文パネル（サイドバー＋モバイル）
   ============================================ */

/* ===== datePicker フィールド ===== */
.date-picker-field {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.date-picker-field .date-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0 18px 0 0;
  min-width: 9.2em;
  box-sizing: border-box;
}

.date-input-right {
  text-align: right !important;
  field-sizing: content;
  min-width: 7em;
}

.date-clear-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #aaa;
  padding: 0 2px;
  line-height: 1;
  display: none;
}

.date-clear-btn:hover {
  color: #555;
}

/* ヘッダー日付のクリアボタンを非表示（テーブル内の日付セルは対象外） */
.top-date .date-clear-btn,
.top-part .date-clear-btn,
.company-right .date-clear-btn,
.from-block .date-clear-btn,
.apology-date .date-clear-btn,
.cdate .date-clear-btn,
.tdate .date-clear-btn {
  display: none !important;
}

.top-date .date-input,
.top-part .date-input,
.company-right .date-input,
.from-block .date-input,
.apology-date .date-input,
.cdate .date-input,
.tdate .date-input {
  padding-right: 3px !important;
}

.flatpickr-calendar {
  z-index: 9999 !important;
}

/* ===== 例文パネル（サイドバー内） ===== */
.example-panel {
  margin-bottom: 16px;
}

.example-panel h6 {
  font-weight: bold;
  margin-bottom: 10px;
}

.example-preview {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #555;
  max-height: 200px;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 8px 0;
  text-align: left;
  word-break: break-all;
}

.example-preview .ex-label {
  font-weight: bold;
  color: #333;
  font-size: 11px;
}

.example-preview .ex-section {
  margin-bottom: 6px;
}

.example-preview .ex-section:last-child {
  margin-bottom: 0;
}

/* ===== モバイル用例文パネル ===== */
.example-panel-mobile {
  background: #f9fafb;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.example-panel-mobile summary {
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.example-panel-mobile .example-mobile-body {
  margin-top: 8px;
}
