/* ======================================================
   イベント管理システム：エリア別＆週間・月間2段タブ統合パッケージ
   ====================================================== */

/* --- 全体枠 --- */
.area-calendar-wrapper {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

/* ラジオボタン本体（非表示） */
.area-calendar-wrapper input[type="radio"] {
  display: none;
}

/* ==========================================
   第1段：エリア切り替えタブ
   ========================================== */
.area-tab-menu {
  display: flex;
  gap: 6px;
  border-bottom: 3px solid #111;
  margin-bottom: 20px;
}

.area-label {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  background-color: #f1f5f9;
  color: #475569;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
}

.area-label:hover {
  background-color: #e2e8f0;
}

#tab-west:checked ~ .area-tab-menu label[for="tab-west"],
#tab-north:checked ~ .area-tab-menu label[for="tab-north"],
#tab-central:checked ~ .area-tab-menu label[for="tab-central"],
#tab-east:checked ~ .area-tab-menu label[for="tab-east"] {
  background-color: #111;
  color: #ffffff;
}

.area-panel {
  display: none;
}

#tab-west:checked ~ .area-content-container .panel-west,
#tab-north:checked ~ .area-content-container .panel-north,
#tab-central:checked ~ .area-content-container .panel-central,
#tab-east:checked ~ .area-content-container .panel-east {
  display: block;
}

/* ==========================================
   第2段：週間 / 月間 切り替えタブ
   ========================================== */
.view-tab-menu {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.view-label {
  padding: 8px 22px;
  background-color: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.view-label:hover {
  background-color: #f1f5f9;
}

#west-view-weekly:checked ~ .view-tab-menu label[for="west-view-weekly"],
#west-view-monthly:checked ~ .view-tab-menu label[for="west-view-monthly"],
#north-view-weekly:checked ~ .view-tab-menu label[for="north-view-weekly"],
#north-view-monthly:checked ~ .view-tab-menu label[for="north-view-monthly"],
#central-view-weekly:checked ~ .view-tab-menu label[for="central-view-weekly"],
#central-view-monthly:checked ~ .view-tab-menu label[for="central-view-monthly"],
#east-view-weekly:checked ~ .view-tab-menu label[for="east-view-weekly"],
#east-view-monthly:checked ~ .view-tab-menu label[for="east-view-monthly"] {
  background-color: #0073aa;
  color: #ffffff;
  border-color: #0073aa;
}

.view-panel {
  display: none;
}

#west-view-weekly:checked ~ .view-weekly,
#west-view-monthly:checked ~ .view-monthly,
#north-view-weekly:checked ~ .view-weekly,
#north-view-monthly:checked ~ .view-monthly,
#central-view-weekly:checked ~ .view-weekly,
#central-view-monthly:checked ~ .view-monthly,
#east-view-weekly:checked ~ .view-weekly,
#east-view-monthly:checked ~ .view-monthly {
  display: block;
}

/* ==========================================
   1. 週間カレンダー（テーブル強制作成）
   ========================================== */
.weekly-table {
  table-layout: fixed !important;
  width: 100% !important;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
}

.weekly-table th, 
.weekly-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 14px;
  box-sizing: border-box;
  word-break: break-word;
}

.weekly-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: bold;
}

.col-date {
  width: 25% !important;
  font-weight: bold;
  color: #1e293b;
  white-space: nowrap;
}

.col-city {
  width: 20% !important;
  color: #475569;
  white-space: nowrap;
}

.col-event {
  width: 55% !important;
}

.weekly-table .sat { color: #0073aa; }
.weekly-table .sun { color: #d32f2f; }

.event-link-card {
  display: block;
  background: #e3f2fd;
  color: #0d47a1;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  border-left: 4px solid #111;
  transition: all 0.2s ease;
}

.event-link-card:hover {
  background: #1e88e5;
  color: #ffffff;
}

.event-time {
  font-weight: bold;
  margin-right: 6px;
}

/* ==========================================
   2. 月間カレンダー（ナビ＋月曜始まり）
   ========================================== */
.month-calendar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.calendar-header-nav {
  background: #111;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.calendar-title {
  font-size: 16px;
  font-weight: bold;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #e2e8f0;
  gap: 1px;
}

.day-name {
  background-color: #f8fafc;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
  font-weight: bold;
  color: #475569;
}

.day-name.sat { color: #0073aa; }
.day-name.sun { color: #d32f2f; }

.day-cell {
  background-color: #ffffff;
  min-height: 95px;
  padding: 6px;
  box-sizing: border-box;
}

.day-cell.dummy {
  background-color: #f8fafc;
  opacity: 0.5;
}

.day-cell .num {
  font-size: 12px;
  font-weight: bold;
  color: #475569;
  display: block;
  margin-bottom: 4px;
}

.day-cell.sat .num { color: #0073aa; }
.day-cell.sun .num { color: #d32f2f; }

.day-cell .evt {
  display: block;
  font-size: 11px;
  background-color: #e3f2fd;
  color: #0d47a1;
  padding: 3px 6px;
  border-radius: 3px;
  margin-bottom: 3px;
  line-height: 1.3;
  font-weight: bold;
  text-decoration: none;
  border-left: 3px solid #111;
}

.day-cell .evt:hover {
  background-color: #1e88e5;
  color: #ffffff;
}

/* ==========================================
   3. レスポンシブ対応
   ========================================== */
@media screen and (max-width: 768px) {
  .area-label {
    padding: 10px 0;
    font-size: 13px;
  }

  .view-label {
    padding: 6px 16px;
    font-size: 13px;
  }

  .weekly-table th, 
  .weekly-table td {
    padding: 10px 6px;
    font-size: 12px;
  }

  .col-date { width: 30% !important; }
  .col-city { width: 25% !important; }
  .col-event { width: 45% !important; }

  .day-cell {
    min-height: 60px;
    padding: 3px;
  }

  .day-cell .num {
    font-size: 11px;
  }

  .day-cell .evt {
    font-size: 10px;
    padding: 2px 3px;
  }
}