/* チャートセクション */

.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;
}

/* 関連指標リンク */

.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;
}

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

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

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

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

.port-cell, .port-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;
}

/* モーダル内 details/summary スタイル */
.scroll-container details {
  margin-bottom: 6px;
}

.scroll-container details summary {
  font-size: 14px;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  background-color: #f3f4ff;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  user-select: none;
  margin-bottom: 6px;
  list-style: none;
}

.scroll-container details summary::before {
  content: "▶ ";
  font-size: 11px;
  color: #888;
}

.scroll-container details[open] summary::before {
  content: "▼ ";
}

/* チェックボックスを flex でタイル状に並べる */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 6px 4px 8px;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 140px;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
}

.checkbox-group label:hover {
  background-color: #f0f4ff;
}

.checkbox-group input[type="checkbox"] {
  flex-shrink: 0;
}

@media screen and (max-width: 768px) {

  .filter-container {
    flex-direction: column;
      align-items: center;
    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%;
  }

}
