/* 指標説明セクション */

.filter-container {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: "Noto Sans JP", sans-serif;
}

.filter-container label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-container input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9fcff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-container input[type="date"]:focus {
    outline: none;
    border-color: #4a90e2;
}

.filter-container button {
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-container button:hover {
    background-color: #357ab8;
}

#areaForm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px 16px; /* 行間・列間 */
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f0f4ff;  /* 薄い青で強調 */
    border-radius: 8px;
}

.date-range-group label {
    font-weight: bold;
    color: #333;
    margin-right: 6px;
}

.date-range-group select,
.date-range-group button {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 6px;
}

.date-range-group span {
    font-weight: bold;
    margin: 0 6px;
}

/* 年月の単位表示 */
.unit-label {
    margin-right: 8px;
    font-size: 14px;
    color: #555;
}

/* 年月セレクトボックスをまとめる */
.date-select-block {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* セレクトが注目されやすいように枠や背景強調 */
.select-highlight {
    background-color: #f9fcff;
    border: 1px solid #bbb;
    padding: 6px;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.select-highlight:hover,
.select-highlight:focus {
    border-color: #4a90e2;
}

/* ラベル補足説明 */
.note {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

#confirmBtn_input {
  width: auto;      /* .confirm の width:100% を打ち消す */
  margin-top: 0;    /* 折り返し防止 */
  padding: 6px 14px;
}

/* 大分類・中分類・確定を横並びに（PC表示） */
.select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.area-col, .area-cell {
    width: 20%;
    min-width: 100px;
}

.big-category-col, .big-category-cell {
    width: 25%;
    min-width: 120px;
}

.date-col, .date-cell {
    width: 20%;
    min-width: 100px;
}

.year-cell, .date-cell {
    font-weight: 500;
    color: #495057;
}

.area-cell, .area-cell {
    color: #333;
    font-size: 12px;
    font-weight: 500;
}

.value {
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    min-width: 40px;
}

.value-na {
    color: #6c757d;
    font-style: italic;
}

/* 地域ブロック全体 */
.region-block {
  padding: 4px 0 12px;
  margin-bottom: 8px;
}

/* 地域名の見出し */
.region-title {
  font-size: 16px;          /* 少し大きめに */
  font-weight: 700;
  padding: 6px 30px;        /* 左右は modal-content の padding と合わせる */
  margin: 12px -30px 8px;   /* 左右のマイナスでモーダル内いっぱいに */
  background-color: #f3f4ff;/* 薄い青の帯 */
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

/* 一番上だけ少しマージンを詰める */
.region-block:first-child .region-title {
  margin-top: 0;
}

/* 国ラベルを横に並べる */
.region-block label {
  display: inline-flex;         /* 横並び＋チェックボックスとテキストを揃える */
  align-items: center;
  margin-right: 16px;
  margin-bottom: 4px;
  min-width: 140px;             /* 1つのラベルの幅 → 変えると列数が変わるイメージ */
  font-size: 14px;
}

/* チェックボックスと文字の間を少し空ける */
.region-block input[type="checkbox"] {
  margin-right: 4px;
}

@media screen and (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1em;
    }

    .date-range-group {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }

    .select-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .select-wrapper label {
        margin-top: 8px;
    }

    .select-wrapper select {
        width: 100%;
    }

    .region-col,
    .value-col,
    .region-cell, .country-cell {
        color: #333;
        font-size: 12px;
    }
}
