/* ── 検索モーダル ── */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
}
.search-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.search-modal__dialog {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 2em;
  font-size: 16px;
}
.search-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5em;
  padding-bottom: 0.8em;
  border-bottom: 3px solid #002063;
}
.search-modal__title {
  font-size: 1.4em;
  font-weight: bold;
  color: #002063;
}
.search-modal__close {
  background: none;
  border: none;
  font-size: 2em;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0 0.2em;
}
.search-modal__close:hover {
  color: #111;
}

/* ── 検索パネル内容 ── */
.search-panel__section {
  margin-bottom: 1.5em;
}
.search-panel__section:last-of-type {
  margin-bottom: 0;
}
.search-panel__heading {
  font-size: 1.1em;
  font-weight: bold;
  color: #374151;
  margin-bottom: 0.8em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid #3366CC;
  display: inline-block;
}

/* 日付行 */
.search-panel__date-row {
  display: flex;
  align-items: center;
  gap: 0.8em;
  flex-wrap: wrap;
}
.search-panel__date-row label {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.search-panel__date-row label span {
  font-size: 1em;
  color: #374151;
  white-space: nowrap;
}
.search-panel__date-row input[type="date"] {
  padding: 0.5em 0.7em;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1em;
  background: #fff;
}
.search-panel__separator {
  font-size: 1.2em;
  color: #9ca3af;
}

/* チェックボックス群 */
.search-panel__checks {
  display: flex;
  gap: 0.8em;
  flex-wrap: wrap;
}
.search-panel__check-label {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 1.05em;
  color: #374151;
  cursor: pointer;
  padding: 0.45em 0.8em;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.search-panel__check-label:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
.search-panel__check-label:has(input:checked) {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 500;
}

/* ボタン */
.search-panel__actions {
  display: flex;
  gap: 1em;
  margin-top: 1.5em;
  padding-top: 1.2em;
  border-top: 1px solid #e5e7eb;
}
.search-panel__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 2em;
  font-size: 1.1em;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #3366CC;
  color: #fff;
  transition: background 0.15s;
}
.search-panel__btn:hover {
  background: #2050a8;
}
.search-panel__btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}
.search-panel__btn--sub {
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
}
.search-panel__btn--sub:hover {
  background: #f9fafb;
  color: #374151;
}

/* ── スマホ対応 ── */
@media screen and (max-width: 767px) {
  .search-modal__dialog {
    width: 95%;
    padding: 1.2em;
    max-height: 90vh;
  }
  .search-modal__title {
    font-size: 1.2em;
  }
  .search-panel__checks {
    gap: 0.5em;
  }
  .search-panel__check-label {
    font-size: 0.95em;
    padding: 0.35em 0.6em;
  }
  .search-panel__actions {
    flex-direction: column;
  }
  .search-panel__btn {
    width: 100%;
    justify-content: center;
  }
}
