/* --- Chart Tooltip --- */
.ea-chart-tooltip {
  background: #0B0B0B;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.5;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.ea-chart-tooltip strong {
  font-weight: 700;
}

/* --- Chart Legend --- */
.ea-chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ea-chart-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

.ea-chart-legend__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ea-chart-legend__count {
  color: #6B7280;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --- Wide chart variant --- */
.ea-discover-chart--wide {
  grid-column: 1 / -1;
}

/* --- SVG hover effects --- */
.ea-discover-chart__body svg rect:hover,
.ea-discover-chart__body svg path:hover,
.ea-discover-chart__body svg circle:hover {
  opacity: 1 !important;
  filter: brightness(1.08);
}

/* --- Timeline year filter --- */
.ea-timeline-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ea-timeline-filter__input {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #374151;
  background: #fff;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}

.ea-timeline-filter__input::-webkit-inner-spin-button,
.ea-timeline-filter__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ea-timeline-filter__input:focus {
  border-color: #2563EB;
}

.ea-timeline-filter__sep {
  color: #9CA3AF;
  font-weight: 600;
  font-size: 14px;
}

.ea-timeline-filter__btn {
  padding: 5px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  transition: background 0.12s, border-color 0.12s;
  margin-left: 4px;
}

.ea-timeline-filter__btn:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
}

/* --- Timeline rows (single-line layout) --- */
.ea-tl-list {
  display: flex;
  flex-direction: column;
}

.ea-tl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background 0.12s;
}

.ea-tl-row:hover {
  background: #F9FAFB;
}

.ea-tl-row:last-child {
  border-bottom: none;
}

.ea-tl-row__name {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
  min-width: 180px;
  font-size: 13px;
  font-weight: 650;
  color: #0B0B0B;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ea-tl-row__bar-area {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 16px;
}

.ea-tl-row__bar {
  height: 16px;
  border-radius: 3px;
  opacity: 0.75;
  min-width: 3px;
  flex-shrink: 0;
}

.ea-tl-row__period {
  width: 110px;
  min-width: 110px;
  text-align: right;
  font-size: 11px;
  color: #6B7280;
  font-weight: 600;
  white-space: nowrap;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .ea-tl-row__name {
    width: 120px;
    min-width: 120px;
    font-size: 12px;
  }
  .ea-tl-row__period {
    font-size: 10px;
  }
}

.ea-timeline-empty {
  text-align: center;
  color: #9CA3AF;
  padding: 40px 0;
  font-size: 13px;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

/* --- Scale / Workforce & Cost chart --- */
.ea-scale-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ea-scale-row {
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background 0.12s;
}

.ea-scale-row:hover {
  background: #F9FAFB;
}

.ea-scale-row:last-child {
  border-bottom: none;
}

.ea-scale-row__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #0B0B0B;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  margin-bottom: 6px;
}

.ea-scale-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ea-scale-row__bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.ea-scale-row__bar {
  height: 18px;
  border-radius: 3px;
  opacity: 0.75;
  min-width: 4px;
}

.ea-scale-row__dur {
  font-size: 11px;
  color: #6B7280;
  font-weight: 600;
  white-space: nowrap;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

.ea-scale-row__info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-left: 16px;
}

.ea-scale-row__metric {
  font-size: 12px;
  color: #374151;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.5;
}

.ea-scale-row__label {
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  margin-right: 4px;
}

.ea-scale-note {
  margin-top: 12px;
  font-size: 11px;
  color: #9CA3AF;
  line-height: 1.5;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

.ea-scale-toggle {
  display: block;
  margin-top: 8px;
  padding: 6px 0;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #2563EB;
  cursor: pointer;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  transition: opacity 0.15s;
}

.ea-scale-toggle:hover {
  opacity: 0.7;
}

/* --- Search input --- */
.ea-toolbar__search {
  position: relative;
  max-width: 320px;
}

.ea-toolbar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  pointer-events: none;
}

.ea-toolbar__search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
  color: #0B0B0B;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ea-toolbar__search-input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ea-toolbar__search-input::placeholder {
  color: #9CA3AF;
}
