/* 研修一覧ページ (id=1512) 専用スタイル
 * 参照先: /assets/templates/first/css/training_1512.css
 * ========================================
 * 1. タブUI (.tab_container / .tab_spice_container)
 * 2. 検索UI (.oj-search-* / .oj-date-input / .oj-btn-*)
 * 3. Flatpickr カスタムテーマ
 * ======================================== */


/* ========================================
   1. タブUI
   ======================================== */

.tab_container {
  padding-bottom: 1em;
  background-color: #fff;
  border: 1px solid #2c2d97;
  margin: 0 auto;
}
.tab_item {
  width: calc(100% / 4);
  padding: 15px 0;
  border-bottom: 1px dashed #2c2d97;
  background-color: #ececec;
  text-align: center;
  color: #2c2d97;
  display: block;
  float: left;
  font-weight: bold;
  transition: all 0.2s ease;
}
.tab_item:hover {
  opacity: 0.75;
}
input[name="tab_item"] {
  display: none;
}
.tab_content {
  display: none;
  padding: 0;
  clear: both;
  overflow: hidden;
}
#tab1:checked ~ #tab1_content,
#tab2:checked ~ #tab2_content,
#tab3:checked ~ #tab3_content,
#tab4:checked ~ #tab4_content,
#tab5:checked ~ #tab5_content,
#tab6:checked ~ #tab6_content {
  display: block;
}
.tab_container input:checked + .tab_item {
  background-color: #2c2d97;
  color: #fff;
}

/* AUTOMOTIVE SPICE サブタブ */
.tab_spice_container {
  padding-bottom: 1em;
  background-color: #fff;
  border: 1px solid #adc12f;
  margin: 0 auto;
}
.tab_spice_item {
  width: calc(100% / 2);
  padding: 15px 0;
  border-bottom: 3px solid #adc12f;
  background-color: #ececec;
  text-align: center;
  color: #67731c;
  display: block;
  float: left;
  font-weight: bold;
  transition: all 0.2s ease;
}
.tab_spice_item:hover {
  opacity: 0.75;
}
input[name="tab_spice_item"] {
  display: none;
}
.tab_spice_content {
  display: none;
  padding: 1em 1em 0;
  clear: both;
  overflow: hidden;
}
#tab_spice_1:checked ~ #tab_spice_1_content,
#tab_spice_2:checked ~ #tab_spice_2_content {
  display: block;
}
.tab_spice_container input:checked + .tab_spice_item {
  background-color: #adc12f;
  color: #fff;
}


/* ========================================
   2. 検索UI
   ======================================== */

html { scroll-behavior: smooth; }
#search { scroll-margin-top: 90px; }
.event { margin: 16px 0; }
.event-schedule { margin: 4px 0 0 12px; }

/* カレンダーピッカー */
.oj-date-input {
  height: 40px;
  min-height: 40px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.oj-date-input:hover {
  border-color: #65a30d;
  box-shadow: 0 2px 8px rgba(101, 163, 13, 0.15);
}
.oj-date-input::-webkit-calendar-picker-indicator {
  width: 28px;
  height: 28px;
  cursor: pointer;
  filter: invert(35%) sepia(60%) saturate(500%) hue-rotate(50deg);
  transition: transform 0.2s ease;
}
.oj-date-input::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.15);
}
.oj-date-input::-webkit-datetime-edit {
  padding: 4px 8px;
}
.oj-date-input::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
.oj-date-input::-webkit-datetime-edit-text,
.oj-date-input::-webkit-datetime-edit-month-field,
.oj-date-input::-webkit-datetime-edit-day-field,
.oj-date-input::-webkit-datetime-edit-year-field {
  padding: 2px 4px;
}
.oj-date-input::-moz-calendar-picker-indicator {
  width: 28px;
  height: 28px;
}
.oj-date-input:invalid::-webkit-datetime-edit {
  color: #9ca3af;
}
@media (max-width: 768px) {
  .oj-date-input {
    height: 40px;
    min-height: 40px;
  }
}

/* 検索カード */
.oj-search-card {
  background: #fff;
  border: 1px solid rgba(84, 116, 67, .18);
  border-radius: 16px;
  padding: 18px;
}
.oj-search-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.oj-search-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: .02em;
}
.oj-search-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.oj-search-form { display: block; }
.oj-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 900px) {
  .oj-search-grid { grid-template-columns: 1fr; }
}
.oj-field { display: block; }
.oj-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 6px;
}
.oj-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(84, 116, 67, .20);
  background: #fff;
  color: #0f172a;
  outline: none;
}
.oj-input:focus {
  border-color: rgba(84, 116, 67, .55);
  box-shadow: 0 0 0 4px rgba(84, 116, 67, .14);
}

/* ボタン共通 */
.oj-btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.oj-btn-primary {
  background: #547443;
  color: #fff;
}
.oj-btn-primary:hover { filter: brightness(.95); }

.oj-btn-secondary {
  background: #fff;
  color: #1f3b1b;
  border: 1px solid rgba(84, 116, 67, .28);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.oj-btn-secondary:hover { background: rgba(84, 116, 67, .08); }

.oj-btn-ghost {
  background: #f5f8f3;
  color: #1f3b1b;
  border: 1px solid rgba(84, 116, 67, .20);
}
.oj-btn-ghost:hover { background: rgba(84, 116, 67, .12); }
.oj-btn-ghost.is-active {
  background: #547443;
  color: #fff;
  border-color: #547443;
}

/* ソート */
.oj-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(84, 116, 67, .12);
}
.oj-sort-label {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}
.oj-sort-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* アクション */
.oj-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}
@media (max-width: 900px) {
  .oj-actions { width: 100%; }
  .oj-actions .oj-btn { width: 100%; }
}


/* ========================================
   3. Flatpickr カスタムテーマ
   ======================================== */

.flatpickr-calendar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: none;
  font-family: inherit;
  width: 320px;
  padding: 8px;
}
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: #fff;
}
.flatpickr-months { padding: 8px 0; }
.flatpickr-months .flatpickr-month { height: 40px; }
.flatpickr-current-month {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 700; }
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  padding: 8px 12px;
  fill: #65a30d;
  transition: all 0.2s;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  fill: #4d7c0f;
  background: #f0fdf4;
  border-radius: 8px;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 14px;
  height: 14px;
}
.flatpickr-weekdays {
  background: transparent;
  padding: 8px 0;
}
.flatpickr-weekday {
  color: #65a30d;
  font-weight: 700;
  font-size: 0.85rem;
}
.flatpickr-days { width: 100%; }
.dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}
.flatpickr-day {
  max-width: none;
  width: 14.285%;
  height: 40px;
  line-height: 40px;
  border-radius: 8px;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s;
}
.flatpickr-day:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.flatpickr-day.today {
  border-color: #65a30d;
  background: #f0fdf4;
}
.flatpickr-day.today:hover {
  background: #dcfce7;
  border-color: #65a30d;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #65a30d;
  border-color: #65a30d;
  color: #fff;
  font-weight: 700;
}
.flatpickr-day.inRange {
  background: #ecfccb;
  border-color: #ecfccb;
  box-shadow: -5px 0 0 #ecfccb, 5px 0 0 #ecfccb;
}
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #65a30d;
  border-color: #65a30d;
  color: #fff;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: #d1d5db; }
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
  background: #f9fafb;
  border-color: #f9fafb;
}
.flatpickr-day.disabled { color: #e5e7eb; }
.numInputWrapper { width: 70px; }
.numInputWrapper input { font-weight: 700; }
.numInputWrapper span { border-color: #65a30d; }
.numInputWrapper span:hover { background: #f0fdf4; }
@media (max-width: 640px) {
  .flatpickr-calendar {
    width: 100%;
    max-width: 300px;
  }
  .flatpickr-day {
    height: 44px;
    line-height: 44px;
  }
}


/* ========================================
   4. 他タブ チャートホバーポップアップ
   ======================================== */

/* chart.css の .inner-summary-block が他タブでも機能するよう補完 */
.oj-chart-hover-wrap .inner-summary-block {
  margin-top: 12px;
  min-height: 0;
}

/* ツールチップ幅 */
.inner-summary-block .dg-chart-popup {
  width: 500px;
  max-width: 100%;
}
