/**
 * 市場カレンダー用スタイル
 */

/* カレンダーコンテナ */
.market-calendar-wrapper {
  margin-bottom: 30px;
}

.market-calendar {
  max-width: 100%;
  margin: 0 auto;
  font-family: inherit;
}

/* フィルターエリア */
.calendar-filters {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 5px;
}

.filter-label {
  font-weight: bold;
  margin-right: 10px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-options label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  margin-right: 5px;
}

/* カレンダーヘッダー */
#home.fc-header-toolbar {
  margin-bottom: 1em !important;
}

#home .fc-toolbar-title {
  font-size: 1.5em !important;
  font-weight: bold;
  margin-bottom: 0;
}

#home .fc-toolbar-title::before,#home .fc-toolbar-title::after {
  content: none;
}

/* ボタンスタイル */
.fc-button {
  background-color: #4a7aff !important;
  border-color: #4a7aff !important;
}

.fc-button-active {
  background-color: #1a56ff !important;
  border-color: #1a56ff !important;
}

/* 日付セル */
.fc-daygrid-day {
  cursor: default;
  height: 120px;
}

.fc-day-today {
  background-color: rgba(74, 122, 255, 0.1) !important;
}

/* イベントスタイル */
.fc-event {
  cursor: pointer;
  border-radius: 3px;
  padding: 2px 4px;
  margin-bottom: 2px;
  font-size: 0.85em;
  border: none !important;
}

/* ポップアップスタイル */
.calendar-event-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-width: 500px;
  width: 90%;
}

.calendar-event-popup h3 {
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.calendar-event-popup .event-date {
  margin-bottom: 10px;
  font-weight: bold;
}

.calendar-event-popup .event-category {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  color: white;
  margin-bottom: 15px;
}

.calendar-event-popup .pdf-links {
  margin-top: 15px;
}

.calendar-event-popup .pdf-links a {
  display: block;
  padding: 8px 12px;
  background-color: #f5f5f5;
  margin-bottom: 5px;
  border-radius: 3px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s;
}

.calendar-event-popup .pdf-links a:hover {
  background-color: #e5e5e5;
}

.calendar-event-popup .pdf-links a i {
  margin-right: 5px;
}

.calendar-event-popup .close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
  color: #999;
}

.calendar-event-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.fc .fc-view-harness {
  z-index: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .fc-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }

  .fc-daygrid-day {
    height: 80px;
  }

  .fc-event {
    font-size: 0.75em;
  }
}
