/* ========================================
   コスト増加グラフ
======================================== */

.cost-increase-chart-container {
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cost-chart-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

/* Y軸 */
.cost-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 80px;
}

.y-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #666;
  text-align: center;
  margin-bottom: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.y-values {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 300px;
  text-align: right;
  padding-right: 10px;
}

.y-values span {
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
}

/* グラフエリア */
.cost-chart-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cost-chart-svg {
  width: 100%;
  height: 300px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fafafa;
}

/* ライン アニメーション */
.other-company-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease-out forwards;
}

.maline-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease-out 0.3s forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* X軸 */
.cost-x-axis {
  display: flex;
  justify-content: space-between;
  padding: 10px 50px;
  margin-top: 10px;
}

.cost-x-axis span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
}

.x-axis-title {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #666;
  margin-top: 5px;
}

/* 凡例 */
.cost-chart-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-line {
  width: 40px;
  height: 4px;
  border-radius: 2px;
}

.legend-line.other-company {
  background: #FF6B6B;
}

.legend-line.maline {
  background: #5DADE2;
}

.legend-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .cost-increase-chart-container {
    padding: 20px;
  }
  
  .cost-chart-wrapper {
    gap: 10px;
  }
  
  .cost-y-axis {
    min-width: 60px;
  }
  
  .y-values {
    height: 250px;
  }
  
  .cost-chart-svg {
    height: 250px;
  }
  
  .cost-x-axis {
    padding: 10px 30px;
  }
  
  .cost-chart-legend {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .legend-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .cost-increase-chart-container {
    padding: 15px;
  }
  
  .y-values {
    height: 200px;
  }
  
  .cost-chart-svg {
    height: 200px;
  }
  
  .cost-x-axis span,
  .x-axis-title {
    font-size: 0.75rem;
  }
}
